diff options
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 | } |
