summaryrefslogtreecommitdiff
path: root/Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2016-10-01 14:18:49 -0700
committerSteve Langasek <steve.langasek@canonical.com>2016-10-01 14:18:49 -0700
commitb65e78ec015a308c1798e602c94502327cc90cd9 (patch)
tree4185dc52bcba0af1f815b88e100cd68a626916ca /Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c
parent21ebe03556d7030055644f46efd3c165396a7a75 (diff)
parent86b44a70f0e22233427cef3e966869e59b5e9dd5 (diff)
downloadefi-boot-shim-b65e78ec015a308c1798e602c94502327cc90cd9.tar.gz
efi-boot-shim-b65e78ec015a308c1798e602c94502327cc90cd9.zip
Resync with Ubuntu, including patch to fix debian/copyright.
Diffstat (limited to 'Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c')
-rw-r--r--Cryptlib/OpenSSL/crypto/rsa/rsa_ameth.c6
1 files changed, 2 insertions, 4 deletions
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;