From d20061e3afd8d6abba415027532955fbe8d2e67d Mon Sep 17 00:00:00 2001 From: Theo Buehler Date: Mon, 3 Jul 2023 10:06:01 +0000 Subject: Split a bunch of unrelated checks ok beck jsing --- lib/libcrypto/ecdsa/ecs_ossl.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'lib') 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; } -- cgit v1.2.3