diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-11-20 04:17:30 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2017-01-08 01:42:46 +0000 |
commit | faa02fe25677a7a97160b301e4e7cf5ade039340 (patch) | |
tree | 20dec455bfda39379b23a9158e1117aa43e46e74 /crypto/rsa/rsa_pmeth.c | |
parent | 4e8ba7479df8c5fb23f59742f434ae0e78d1a42f (diff) |
Use method key type instead of EVP_PKEY_RSA
Make RSA method more flexible by using the key type from the
method instead of hard coding EVP_PKEY_RSA: by doing this the
same code supports both RSA and RSA-PSS.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)
Diffstat (limited to 'crypto/rsa/rsa_pmeth.c')
-rw-r--r-- | crypto/rsa/rsa_pmeth.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_pmeth.c b/crypto/rsa/rsa_pmeth.c index db4fb0fbf7..5878e89cf3 100644 --- a/crypto/rsa/rsa_pmeth.c +++ b/crypto/rsa/rsa_pmeth.c @@ -631,7 +631,7 @@ static int pkey_rsa_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY *pkey) ret = RSA_generate_key_ex(rsa, rctx->nbits, rctx->pub_exp, pcb); BN_GENCB_free(pcb); if (ret > 0) - EVP_PKEY_assign_RSA(pkey, rsa); + EVP_PKEY_assign(pkey, ctx->pmeth->pkey_id, rsa); else RSA_free(rsa); return ret; |