-
-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Closed
Labels
triaged: bugThe issue/pr is/fixes a bugThe issue/pr is/fixes a bug
Description
After commit 2972af1 there is error in EVP_PKEY_keygen if ctx is created by EVP_PKEY_CTX_new. While it works good if ctx is created by EVP_PKEY_CTX_new_id.
Reproduction example (based on man EVP_PKEY_keygen):
#include <openssl/evp.h>
#include <openssl/rsa.h>
int main(void)
{
EVP_PKEY_CTX *ctx;
EVP_PKEY *pkey = NULL;
#if 0
ctx = EVP_PKEY_CTX_new_id(EVP_PKEY_RSA, NULL);
#else
EVP_PKEY *tkey;
tkey = EVP_PKEY_new();
EVP_PKEY_set_type(tkey, EVP_PKEY_RSA);
ctx = EVP_PKEY_CTX_new(tkey, NULL);
#endif
if (!ctx)
OpenSSLDie(__FILE__, __LINE__, "EVP_PKEY_CTX_new_id");
if (EVP_PKEY_keygen_init(ctx) <= 0)
OpenSSLDie(__FILE__, __LINE__, "EVP_PKEY_keygen_init");
if (EVP_PKEY_keygen(ctx, &pkey) <= 0)
OpenSSLDie(__FILE__, __LINE__, "EVP_PKEY_keygen");
return 0;
}
Produces an error:
OpenSSL internal error: EVP_PKEY_keygen
This error is mentioned in issue #11510 and found by gost-engine test suite.
@beldmit @levitte @slontis
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
triaged: bugThe issue/pr is/fixes a bugThe issue/pr is/fixes a bug