Add pss field to RSA structure and free it.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 21 Nov 2016 01:34:56 +0000 (01:34 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 8 Jan 2017 01:42:46 +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_lib.c
crypto/rsa/rsa_locl.h

index e41644b0999518e2ab26fc3f19a29511c5056a91..8f934d8abccccbe5600ba952f222b51b35692df3 100644 (file)
@@ -152,6 +152,7 @@ void RSA_free(RSA *r)
     BN_clear_free(r->dmp1);
     BN_clear_free(r->dmq1);
     BN_clear_free(r->iqmp);
+    RSA_PSS_PARAMS_free(r->pss);
     BN_BLINDING_free(r->blinding);
     BN_BLINDING_free(r->mt_blinding);
     OPENSSL_free(r->bignum_data);
index e342ca8dfb62b61d1811265892b8ad16b4e1c963..fe55b35aae9f3696990fadba2acc9e1696ad0542 100644 (file)
@@ -28,6 +28,8 @@ struct rsa_st {
     BIGNUM *dmp1;
     BIGNUM *dmq1;
     BIGNUM *iqmp;
+    /* If a PSS only key this contains the parameter restrictions */
+    RSA_PSS_PARAMS *pss;
     /* be careful using this if the RSA structure is shared */
     CRYPTO_EX_DATA ex_data;
     CRYPTO_REF_COUNT references;