summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c
index cbdf7a36e9..b5e96be61c 100644
--- a/src/lib/libcrypto/rsa/rsa_ameth.c
+++ b/src/lib/libcrypto/rsa/rsa_ameth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: rsa_ameth.c,v 1.48 2023/11/08 19:14:43 tb Exp $ */ 1/* $OpenBSD: rsa_ameth.c,v 1.49 2023/11/08 19:30:38 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -938,8 +938,7 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx)
938 /* XXX - why do we not set oaep->maskHash here? */ 938 /* XXX - why do we not set oaep->maskHash here? */
939 939
940 if (labellen > 0) { 940 if (labellen > 0) {
941 oaep->pSourceFunc = X509_ALGOR_new(); 941 if ((oaep->pSourceFunc = X509_ALGOR_new()) == NULL)
942 if (oaep->pSourceFunc == NULL)
943 goto err; 942 goto err;
944 if ((ostr = ASN1_OCTET_STRING_new()) == NULL) 943 if ((ostr = ASN1_OCTET_STRING_new()) == NULL)
945 goto err; 944 goto err;
@@ -949,7 +948,7 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx)
949 V_ASN1_OCTET_STRING, ostr); 948 V_ASN1_OCTET_STRING, ostr);
950 ostr = NULL; 949 ostr = NULL;
951 } 950 }
952 /* create string with pss parameter encoding. */ 951
953 if ((astr = ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, NULL)) == NULL) 952 if ((astr = ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, NULL)) == NULL)
954 goto err; 953 goto err;
955 X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, astr); 954 X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, astr);