summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-12-06 14:01:05 +0000
committerDr. Stephen Henson <steve@openssl.org>2017-01-08 01:42:49 +0000
commitb35b8d116b545656abe14f0dff19aededd7df986 (patch)
tree301910629a4f6661cae7d6a323c3ec5b3879613e /crypto
parent186e48cd1bdb3b75b76b5e73c3c9502e46d17197 (diff)
Decode parameters properly.
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')
-rw-r--r--crypto/rsa/rsa_ameth.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/rsa/rsa_ameth.c b/crypto/rsa/rsa_ameth.c
index 671719a3a4..74ff65fcb6 100644
--- a/crypto/rsa/rsa_ameth.c
+++ b/crypto/rsa/rsa_ameth.c
@@ -24,6 +24,8 @@ static int rsa_cms_decrypt(CMS_RecipientInfo *ri);
static int rsa_cms_encrypt(CMS_RecipientInfo *ri);
#endif
+static RSA_PSS_PARAMS *rsa_pss_decode(const X509_ALGOR *alg);
+
/* Set any parameters associated with pkey */
static int rsa_param_encode(const EVP_PKEY *pkey,
ASN1_STRING **pstr, int *pstrtype)
@@ -64,7 +66,7 @@ static int rsa_param_decode(RSA *rsa, const X509_ALGOR *alg)
return 1;
if (algptype != V_ASN1_SEQUENCE)
return 0;
- rsa->pss = ASN1_item_unpack(algp, ASN1_ITEM_rptr(RSA_PSS_PARAMS));
+ rsa->pss = rsa_pss_decode(alg);
if (rsa->pss == NULL)
return 0;
return 1;