Fixed RSA generation for OpenSSL >= 1.1

This commit is contained in:
Armin Novak 2017-08-17 13:16:32 +02:00
parent 1e54fdb5c2
commit 7e32e90d4c

View File

@ -1018,6 +1018,12 @@ int makecert_context_process(MAKECERT_CONTEXT* context, int argc, char** argv)
if (!rsa)
return -1;
context->rsa = RSA_new();
if (!context->rsa)
{
BN_clear_free(rsa);
return -1;
}
BN_set_word(rsa, RSA_F4);
rc = RSA_generate_key_ex(context->rsa, key_length, rsa, NULL);
BN_clear_free(rsa);