add parameter error
authorDr. Stephen Henson <steve@openssl.org>
Tue, 3 Jan 2017 16:00:04 +0000 (16:00 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 8 Jan 2017 01:42:49 +0000 (01:42 +0000)
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/2177)

crypto/rsa/rsa_ameth.c

index 37daed167bfa0d9b444c2c20475f8bbf61def5a4..9a8f82e44961e99321c446e7ac78fa5c267da038 100644 (file)
@@ -64,8 +64,10 @@ static int rsa_param_decode(RSA *rsa, const X509_ALGOR *alg)
         return 1;
     if (algptype == V_ASN1_UNDEF)
         return 1;
-    if (algptype != V_ASN1_SEQUENCE)
+    if (algptype != V_ASN1_SEQUENCE) {
+        RSAerr(RSA_F_RSA_PARAM_DECODE, RSA_R_INVALID_PSS_PARAMETERS);
         return 0;
+    }
     rsa->pss = rsa_pss_decode(alg);
     if (rsa->pss == NULL)
         return 0;