diff options
author | tb <> | 2023-11-08 16:05:18 +0000 |
---|---|---|
committer | tb <> | 2023-11-08 16:05:18 +0000 |
commit | 35a6c652dd7e7bb5883d9da433754b9ac0e9fb00 (patch) | |
tree | 2742fd61c31e29cb7586b1e42cd903f3851ccf13 /src/lib | |
parent | 9fa04fbedbeda808dd9b59b1805a6b562c6e53ba (diff) | |
download | openbsd-35a6c652dd7e7bb5883d9da433754b9ac0e9fb00.tar.gz openbsd-35a6c652dd7e7bb5883d9da433754b9ac0e9fb00.tar.bz2 openbsd-35a6c652dd7e7bb5883d9da433754b9ac0e9fb00.zip |
Some simple cosmetics in rsa_alg_set_oaep_padding()
Rename rv into ret and split it on its own line, move labellen a bit down
add some empty lines. To match style elsewhere.
Most of this was requested by jsing
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/rsa/rsa_ameth.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/lib/libcrypto/rsa/rsa_ameth.c b/src/lib/libcrypto/rsa/rsa_ameth.c index 43e66ce02a..d2d4683ec0 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.43 2023/11/08 16:02:41 tb Exp $ */ | 1 | /* $OpenBSD: rsa_ameth.c,v 1.44 2023/11/08 16:05: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 | */ |
@@ -914,8 +914,9 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkctx) | |||
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 *os = NULL; |
917 | int rv = 0, labellen; | ||
918 | unsigned char *label; | 917 | unsigned char *label; |
918 | int labellen; | ||
919 | int ret = 0; | ||
919 | 920 | ||
920 | if (EVP_PKEY_CTX_get_rsa_oaep_md(pkctx, &md) <= 0) | 921 | if (EVP_PKEY_CTX_get_rsa_oaep_md(pkctx, &md) <= 0) |
921 | goto err; | 922 | goto err; |
@@ -955,11 +956,14 @@ rsa_alg_set_oaep_padding(X509_ALGOR *alg, EVP_PKEY_CTX *pkctx) | |||
955 | goto err; | 956 | goto err; |
956 | X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, os); | 957 | X509_ALGOR_set0(alg, OBJ_nid2obj(NID_rsaesOaep), V_ASN1_SEQUENCE, os); |
957 | os = NULL; | 958 | os = NULL; |
958 | rv = 1; | 959 | |
960 | ret = 1; | ||
961 | |||
959 | err: | 962 | err: |
960 | RSA_OAEP_PARAMS_free(oaep); | 963 | RSA_OAEP_PARAMS_free(oaep); |
961 | ASN1_STRING_free(os); | 964 | ASN1_STRING_free(os); |
962 | return rv; | 965 | |
966 | return ret; | ||
963 | } | 967 | } |
964 | 968 | ||
965 | static int | 969 | static int |