summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/ecdh/ech_key.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c
index f0c760b8da..fc023af986 100644
--- a/src/lib/libcrypto/ecdh/ech_key.c
+++ b/src/lib/libcrypto/ecdh/ech_key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ech_key.c,v 1.23 2023/07/01 14:52:34 tb Exp $ */ 1/* $OpenBSD: ech_key.c,v 1.24 2023/07/01 14:53:48 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -121,7 +121,8 @@ ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
121 goto err; 121 goto err;
122 } 122 }
123 123
124 group = EC_KEY_get0_group(ecdh); 124 if ((group = EC_KEY_get0_group(ecdh)) == NULL)
125 goto err;
125 126
126 if (!EC_POINT_is_on_curve(group, pub_key, ctx)) 127 if (!EC_POINT_is_on_curve(group, pub_key, ctx))
127 goto err; 128 goto err;