diff options
| author | tb <> | 2023-03-04 21:08:14 +0000 |
|---|---|---|
| committer | tb <> | 2023-03-04 21:08:14 +0000 |
| commit | 5b21203ce56441bf02442a9dbc57d44a0a558cf3 (patch) | |
| tree | d1d1aa3589a838294ad5da342de429f97c75905a /src/lib/libc | |
| parent | 01b0ce78c17d3cb0caa4b9c31942bcfbcebc6c7d (diff) | |
| download | openbsd-5b21203ce56441bf02442a9dbc57d44a0a558cf3.tar.gz openbsd-5b21203ce56441bf02442a9dbc57d44a0a558cf3.tar.bz2 openbsd-5b21203ce56441bf02442a9dbc57d44a0a558cf3.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 '')
| -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)) |
