mirror of https://github.com/Icinga/icinga2.git
Fix crash in MakeX509CSR when using ancient versions of OpenSSL
fixes #8844
This commit is contained in:
parent
eba22b1522
commit
c08aa37c99
|
@ -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 << "'.";
|
||||||
|
|
Loading…
Reference in New Issue