summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/rsa/rsa_ameth.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c
index 46681c6348..228793b05c 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.50 2023/11/09 08:20:10 tb Exp $ */ 1/* $OpenBSD: rsa_ameth.c,v 1.51 2023/11/09 08:29:53 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 */
@@ -941,14 +941,16 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx)
941 goto err; 941 goto err;
942 if (!ASN1_OCTET_STRING_set(ostr, label, labellen)) 942 if (!ASN1_OCTET_STRING_set(ostr, label, labellen))
943 goto err; 943 goto err;
944 X509_ALGOR_set0(oaep->pSourceFunc, OBJ_nid2obj(NID_pSpecified), 944 if (!X509_ALGOR_set0_by_nid(oaep->pSourceFunc, NID_pSpecified,
945 V_ASN1_OCTET_STRING, ostr); 945 V_ASN1_OCTET_STRING, ostr))
946 goto err;
946 ostr = NULL; 947 ostr = NULL;
947 } 948 }
948 949
949 if ((astr = ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, NULL)) == NULL) 950 if ((astr = ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, NULL)) == NULL)
950 goto err; 951 goto err;
951 X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, astr); 952 if (!X509_ALGOR_set0_by_nid(alg, NID_rsaesOaep, V_ASN1_SEQUENCE, astr))
953 goto err;
952 astr = NULL; 954 astr = NULL;
953 955
954 ret = 1; 956 ret = 1;