-/* $OpenBSD: ech_key.c,v 1.24 2023/07/01 14:53:48 tb Exp $ */
+/* $OpenBSD: ech_key.c,v 1.25 2023/07/01 14:56:12 tb Exp $ */
/* ====================================================================
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
*
if ((x = BN_CTX_get(ctx)) == NULL)
goto err;
- priv_key = EC_KEY_get0_private_key(ecdh);
- if (priv_key == NULL) {
+ if ((priv_key = EC_KEY_get0_private_key(ecdh)) == NULL) {
ECDHerror(ECDH_R_NO_PRIVATE_VALUE);
goto err;
}