Fix crash in MakeX509CSR when using ancient versions of OpenSSL

fixes #8844
This commit is contained in:
Gunnar Beutner 2015-03-26 08:23:24 +01:00
parent eba22b1522
commit c08aa37c99
1 changed files with 1 additions and 1 deletions

View File

@ -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 *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_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") Log(LogInformation, "base")
<< "Writing certificate signing request to '" << csrfile << "'."; << "Writing certificate signing request to '" << csrfile << "'.";