From 20a1bd2e4c8b019eb9ab9e11267e3f22c08b59f4 Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Fri, 12 Nov 2021 15:23:12 +0100 Subject: [PATCH] Fix issue with generation of new certificate --- src/lib/net/SecureUtils.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/net/SecureUtils.cpp b/src/lib/net/SecureUtils.cpp index c581dd49..d899249d 100644 --- a/src/lib/net/SecureUtils.cpp +++ b/src/lib/net/SecureUtils.cpp @@ -190,7 +190,7 @@ void generate_pem_self_signed_cert(const std::string& path) X509_sign(cert, private_key, EVP_sha256()); - auto fp = fopen_utf8_path(path.c_str(), "r"); + auto fp = fopen_utf8_path(path.c_str(), "w"); if (!fp) { throw std::runtime_error("Could not open certificate output path"); }