From 62f0afa2ecead02b1258dabab8097ca278a22f8f Mon Sep 17 00:00:00 2001 From: Mathieu Trudel-Lapierre Date: Wed, 21 Sep 2016 20:29:42 -0400 Subject: Import upstream version 0.9+1474479173.6c180c6 --- Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c') diff --git a/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c b/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c index cc9c3ce5..ddead3d7 100644 --- a/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c +++ b/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c @@ -270,7 +270,7 @@ static X509_ALGOR *rsa_mgf1_decode(X509_ALGOR *alg) { const unsigned char *p; int plen; - if (alg == NULL) + if (alg == NULL || alg->parameter == NULL) return NULL; if (OBJ_obj2nid(alg->algorithm) != NID_mgf1) return NULL; @@ -768,6 +768,7 @@ static int rsa_item_sign(EVP_MD_CTX *ctx, const ASN1_ITEM *it, void *asn, return 2; } +#ifndef OPENSSL_NO_CMS static RSA_OAEP_PARAMS *rsa_oaep_decode(const X509_ALGOR *alg, X509_ALGOR **pmaskHash) { @@ -791,7 +792,6 @@ static RSA_OAEP_PARAMS *rsa_oaep_decode(const X509_ALGOR *alg, return pss; } -#ifndef OPENSSL_NO_CMS static int rsa_cms_decrypt(CMS_RecipientInfo *ri) { EVP_PKEY_CTX *pkctx; @@ -864,9 +864,7 @@ static int rsa_cms_decrypt(CMS_RecipientInfo *ri) X509_ALGOR_free(maskHash); return rv; } -#endif -#ifndef OPENSSL_NO_CMS static int rsa_cms_encrypt(CMS_RecipientInfo *ri) { const EVP_MD *md, *mgf1md; -- cgit v1.2.3