From c08aa37c998f63b43156664714998820d183cdd5 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Thu, 26 Mar 2015 08:23:24 +0100 Subject: [PATCH] Fix crash in MakeX509CSR when using ancient versions of OpenSSL fixes #8844 --- lib/base/tlsutility.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/base/tlsutility.cpp b/lib/base/tlsutility.cpp index e69197529..5090d4d54 100644 --- a/lib/base/tlsutility.cpp +++ b/lib/base/tlsutility.cpp @@ -332,7 +332,7 @@ int MakeX509CSR(const String& cn, const String& keyfile, const String& csrfile, X509_NAME *name = X509_REQ_get_subject_name(req); X509_NAME_add_entry_by_txt(name, "CN", MBSTRING_ASC, (unsigned char *)cn.CStr(), -1, -1, 0); - X509_REQ_sign(req, key, NULL); + X509_REQ_sign(req, key, EVP_sha256()); Log(LogInformation, "base") << "Writing certificate signing request to '" << csrfile << "'."; -- 2.40.0