From: tb Date: Mon, 3 Jul 2023 10:06:00 +0000 (+0000) Subject: Split a bunch of unrelated checks X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=f316530d59286679affb024a39bcd563e7fe6b51;p=openbsd Split a bunch of unrelated checks ok beck jsing --- 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; }