diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2023-07-03 10:06:01 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2023-07-03 10:06:01 +0000 |
commit | d20061e3afd8d6abba415027532955fbe8d2e67d (patch) | |
tree | 4f434a4b5c3e2c0ad0a442a4fda73a34fd14f887 /lib | |
parent | 2acd246ec0170ac3548adb98e1a6d64df3d71bb3 (diff) |
Split a bunch of unrelated checks
ok beck jsing
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/ecdsa/ecs_ossl.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libcrypto/ecdsa/ecs_ossl.c b/lib/libcrypto/ecdsa/ecs_ossl.c index 879027f56d8..f587028262e 100644 --- a/lib/libcrypto/ecdsa/ecs_ossl.c +++ b/lib/libcrypto/ecdsa/ecs_ossl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ecs_ossl.c,v 1.51 2023/07/03 10:04:05 tb Exp $ */ +/* $OpenBSD: ecs_ossl.c,v 1.52 2023/07/03 10:06:00 tb Exp $ */ /* * Written by Nils Larsch for the OpenSSL project */ @@ -464,8 +464,15 @@ ossl_ecdsa_verify_sig(const unsigned char *dgst, int dgst_len, const ECDSA_SIG * const BIGNUM *order; int ret = -1; - if (eckey == NULL || (group = EC_KEY_get0_group(eckey)) == NULL || - (pub_key = EC_KEY_get0_public_key(eckey)) == NULL || sig == NULL) { + if (eckey == NULL || sig == NULL) { + ECDSAerror(ECDSA_R_MISSING_PARAMETERS); + goto err; + } + if ((group = EC_KEY_get0_group(eckey)) == NULL) { + ECDSAerror(ECDSA_R_MISSING_PARAMETERS); + goto err; + } + if ((pub_key = EC_KEY_get0_public_key(eckey)) == NULL) { ECDSAerror(ECDSA_R_MISSING_PARAMETERS); goto err; } |