diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-11-08 19:30:39 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-11-08 19:30:39 +0000 |
commit | a2f0503bceaf8dc820e84d490de9ef1e6c8b2ed6 (patch) | |
tree | 4d459c6b2e0c5408abefa5c48b0b635095514dbd | |
parent | af00e861bac1ee6af3e4e7a48111804a07eac7a4 (diff) |
More minor cleanup in rsa_alg_set_oaep_padding()
Test and assign one more instance replace a useless comment by an empty
line.
-rw-r--r-- | lib/libcrypto/rsa/rsa_ameth.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/libcrypto/rsa/rsa_ameth.c b/lib/libcrypto/rsa/rsa_ameth.c index cbdf7a36e92..b5e96be61c3 100644 --- a/lib/libcrypto/rsa/rsa_ameth.c +++ b/lib/libcrypto/rsa/rsa_ameth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rsa_ameth.c,v 1.48 2023/11/08 19:14:43 tb Exp $ */ +/* $OpenBSD: rsa_ameth.c,v 1.49 2023/11/08 19:30:38 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -938,8 +938,7 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx) /* XXX - why do we not set oaep->maskHash here? */ if (labellen > 0) { - oaep->pSourceFunc = X509_ALGOR_new(); - if (oaep->pSourceFunc == NULL) + if ((oaep->pSourceFunc = X509_ALGOR_new()) == NULL) goto err; if ((ostr = ASN1_OCTET_STRING_new()) == NULL) goto err; @@ -949,7 +948,7 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkey_ctx) V_ASN1_OCTET_STRING, ostr); ostr = NULL; } - /* create string with pss parameter encoding. */ + if ((astr = ASN1_item_pack(oaep, &RSA_OAEP_PARAMS_it, NULL)) == NULL) goto err; X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, astr); |