diff options
author | tb <> | 2023-03-04 21:08:14 +0000 |
---|---|---|
committer | tb <> | 2023-03-04 21:08:14 +0000 |
commit | 73e44beee499b22262049c3d41e658d53f9808ad (patch) | |
tree | d1d1aa3589a838294ad5da342de429f97c75905a /src/lib/libcrypto/dsa | |
parent | f09e38cd3517c1f0da9ca1c87cb3d08add98865c (diff) | |
download | openbsd-73e44beee499b22262049c3d41e658d53f9808ad.tar.gz openbsd-73e44beee499b22262049c3d41e658d53f9808ad.tar.bz2 openbsd-73e44beee499b22262049c3d41e658d53f9808ad.zip |
Small readability tweak in old_dsa_priv_decode()
Explicitly check against NULL and turn early return into goto err.
ok beck jsing
Diffstat (limited to 'src/lib/libcrypto/dsa')
-rw-r--r-- | src/lib/libcrypto/dsa/dsa_ameth.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/dsa/dsa_ameth.c b/src/lib/libcrypto/dsa/dsa_ameth.c index b7a05e72fa..495c32cbae 100644 --- a/src/lib/libcrypto/dsa/dsa_ameth.c +++ b/src/lib/libcrypto/dsa/dsa_ameth.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: dsa_ameth.c,v 1.40 2023/03/04 21:02:21 tb Exp $ */ | 1 | /* $OpenBSD: dsa_ameth.c,v 1.41 2023/03/04 21:08:14 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 | */ |
@@ -506,9 +506,9 @@ old_dsa_priv_decode(EVP_PKEY *pkey, const unsigned char **pder, int derlen) | |||
506 | BN_CTX *ctx = NULL; | 506 | BN_CTX *ctx = NULL; |
507 | BIGNUM *j, *p1, *newp1, *powg; | 507 | BIGNUM *j, *p1, *newp1, *powg; |
508 | 508 | ||
509 | if (!(dsa = d2i_DSAPrivateKey(NULL, pder, derlen))) { | 509 | if ((dsa = d2i_DSAPrivateKey(NULL, pder, derlen)) == NULL) { |
510 | DSAerror(ERR_R_DSA_LIB); | 510 | DSAerror(ERR_R_DSA_LIB); |
511 | return 0; | 511 | goto err; |
512 | } | 512 | } |
513 | 513 | ||
514 | if (!dsa_check_key(dsa)) | 514 | if (!dsa_check_key(dsa)) |