diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index f718a8101a..ff673d5bd6 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.45 2023/11/08 16:07:59 tb Exp $ */ | 1 | /* $OpenBSD: rsa_ameth.c,v 1.46 2023/11/08 16:42:18 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 | */ |
| @@ -913,7 +913,7 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx) | |||
| 913 | { | 913 | { |
| 914 | const EVP_MD *md, *mgf1md; | 914 | const EVP_MD *md, *mgf1md; |
| 915 | RSA_OAEP_PARAMS *oaep = NULL; | 915 | RSA_OAEP_PARAMS *oaep = NULL; |
| 916 | ASN1_STRING *os = NULL; | 916 | ASN1_STRING *astr = NULL; |
| 917 | unsigned char *label; | 917 | unsigned char *label; |
| 918 | int labellen; | 918 | int labellen; |
| 919 | int ret = 0; | 919 | int ret = 0; |
| @@ -952,16 +952,16 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx) | |||
| 952 | V_ASN1_OCTET_STRING, los); | 952 | V_ASN1_OCTET_STRING, los); |
| 953 | } | 953 | } |
| 954 | /* create string with pss parameter encoding. */ | 954 | /* create string with pss parameter encoding. */ |
| 955 | if (!ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, &os)) | 955 | if ((astr = ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, NULL)) == NULL) |
| 956 | goto err; | 956 | goto err; |
| 957 | X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, os); | 957 | X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, astr); |
| 958 | os = NULL; | 958 | astr = NULL; |
| 959 | 959 | ||
| 960 | ret = 1; | 960 | ret = 1; |
| 961 | 961 | ||
| 962 | err: | 962 | err: |
| 963 | RSA_OAEP_PARAMS_free(oaep); | 963 | RSA_OAEP_PARAMS_free(oaep); |
| 964 | ASN1_STRING_free(os); | 964 | ASN1_STRING_free(astr); |
| 965 | 965 | ||
| 966 | return ret; | 966 | return ret; |
| 967 | } | 967 | } |
