diff options
author | tb <> | 2023-07-03 10:06:00 +0000 |
---|---|---|
committer | tb <> | 2023-07-03 10:06:00 +0000 |
commit | 480dd123899333e53ac9b7ec88f369a11cc609f9 (patch) | |
tree | 663ebe52a141aa2b3c6080c42dc9368610c7003a /src | |
parent | 57180443840ae4aeaeeb382e9c6cf8c3dc95705f (diff) | |
download | openbsd-480dd123899333e53ac9b7ec88f369a11cc609f9.tar.gz openbsd-480dd123899333e53ac9b7ec88f369a11cc609f9.tar.bz2 openbsd-480dd123899333e53ac9b7ec88f369a11cc609f9.zip |
Split a bunch of unrelated checks
ok beck jsing
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libcrypto/ecdsa/ecs_ossl.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_ossl.c b/src/lib/libcrypto/ecdsa/ecs_ossl.c index 879027f56d..f587028262 100644 --- a/src/lib/libcrypto/ecdsa/ecs_ossl.c +++ b/src/lib/libcrypto/ecdsa/ecs_ossl.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ecs_ossl.c,v 1.51 2023/07/03 10:04:05 tb Exp $ */ | 1 | /* $OpenBSD: ecs_ossl.c,v 1.52 2023/07/03 10:06:00 tb Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Nils Larsch for the OpenSSL project | 3 | * Written by Nils Larsch for the OpenSSL project |
4 | */ | 4 | */ |
@@ -464,8 +464,15 @@ ossl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len, const ECDSA_SIG * | |||
464 | const BIGNUM *order; | 464 | const BIGNUM *order; |
465 | int ret = -1; | 465 | int ret = -1; |
466 | 466 | ||
467 | if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL || | 467 | if (eckey == NULL || sig == NULL) { |
468 | (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || sig == NULL) { | 468 | ECDSAerror(ECDSA_R_MISSING_PARAMETERS); |
469 | goto err; | ||
470 | } | ||
471 | if ((group = EC_KEY_get0_group(eckey)) == NULL) { | ||
472 | ECDSAerror(ECDSA_R_MISSING_PARAMETERS); | ||
473 | goto err; | ||
474 | } | ||
475 | if ((pub_key = EC_KEY_get0_public_key(eckey)) == NULL) { | ||
469 | ECDSAerror(ECDSA_R_MISSING_PARAMETERS); | 476 | ECDSAerror(ECDSA_R_MISSING_PARAMETERS); |
470 | goto err; | 477 | goto err; |
471 | } | 478 | } |