]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/rsa/rsa_ameth.c
RSA: Do not set NULL OAEP labels
[thirdparty/openssl.git] / crypto / rsa / rsa_ameth.c
index 6628e383428ebd53ab579860311fec479c494a57..22c06a2139e0e8a939e7fbd5f2fca61641e64455 100644 (file)
@@ -1007,7 +1007,8 @@ static int rsa_cms_decrypt(CMS_RecipientInfo *ri)
         goto err;
     if (EVP_PKEY_CTX_set_rsa_mgf1_md(pkctx, mgf1md) <= 0)
         goto err;
-    if (EVP_PKEY_CTX_set0_rsa_oaep_label(pkctx, label, labellen) <= 0)
+    if (label != NULL
+            && EVP_PKEY_CTX_set0_rsa_oaep_label(pkctx, label, labellen) <= 0)
         goto err;
     /* Carry on */
     rv = 1;