summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authortb <>2023-07-03 11:10:28 +0000
committertb <>2023-07-03 11:10:28 +0000
commit49a38739893b2039d160a08a6cec9251c66082ed (patch)
tree9fef85d6a756744a0737327832ab3c55482742c6 /src/lib
parentf42a943d5c2aeb4048bf3d9e5aa674182cf3c79f (diff)
downloadopenbsd-49a38739893b2039d160a08a6cec9251c66082ed.tar.gz
openbsd-49a38739893b2039d160a08a6cec9251c66082ed.tar.bz2
openbsd-49a38739893b2039d160a08a6cec9251c66082ed.zip
sign_sig: test on assignment
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ecdsa/ecs_ossl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ecdsa/ecs_ossl.c b/src/lib/libcrypto/ecdsa/ecs_ossl.c
index 73aed6eb62..1dce05c35f 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.58 2023/07/03 11:06:28 tb Exp $ */ 1/* $OpenBSD: ecs_ossl.c,v 1.59 2023/07/03 11:10:28 tb Exp $ */
2/* 2/*
3 * Written by Nils Larsch for the OpenSSL project 3 * Written by Nils Larsch for the OpenSSL project
4 */ 4 */
@@ -278,10 +278,11 @@ ossl_ecdsa_sign_sig(const unsigned char *dgst, int dgst_len,
278 int attempts = 0; 278 int attempts = 0;
279 ECDSA_SIG *sig = NULL; 279 ECDSA_SIG *sig = NULL;
280 280
281 group = EC_KEY_get0_group(eckey); 281 if ((group = EC_KEY_get0_group(eckey)) == NULL) {
282 priv_key = EC_KEY_get0_private_key(eckey); 282 ECDSAerror(ERR_R_PASSED_NULL_PARAMETER);
283 283 goto err;
284 if (group == NULL || priv_key == NULL) { 284 }
285 if ((priv_key = EC_KEY_get0_private_key(eckey)) == NULL) {
285 ECDSAerror(ERR_R_PASSED_NULL_PARAMETER); 286 ECDSAerror(ERR_R_PASSED_NULL_PARAMETER);
286 goto err; 287 goto err;
287 } 288 }