summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-07-01 15:10:28 +0000
committertb <>2023-07-01 15:10:28 +0000
commit08b6bd9f45777c2987874303323de008ab014629 (patch)
tree838ff5a0b04af7b84842d5e3ff9f892adb45b710
parent8267a78c2b8b038cd95c015e120730ea384cefc4 (diff)
downloadopenbsd-08b6bd9f45777c2987874303323de008ab014629.tar.gz
openbsd-08b6bd9f45777c2987874303323de008ab014629.tar.bz2
openbsd-08b6bd9f45777c2987874303323de008ab014629.zip
Reverse polarity to avoid an overlong line
-rw-r--r--src/lib/libcrypto/ecdh/ech_key.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c
index f7a73f795d..8418073f8a 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.28 2023/07/01 15:09:54 tb Exp $ */ 1/* $OpenBSD: ech_key.c,v 1.29 2023/07/01 15:10:28 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -185,10 +185,11 @@ ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
185 EC_KEY *eckey, 185 EC_KEY *eckey,
186 void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen)) 186 void *(*KDF)(const void *in, size_t inlen, void *out, size_t *outlen))
187{ 187{
188 if (eckey->meth->compute_key != NULL) 188 if (eckey->meth->compute_key == NULL) {
189 return eckey->meth->compute_key(out, outlen, pub_key, eckey, KDF); 189 ECerror(EC_R_NOT_IMPLEMENTED);
190 ECerror(EC_R_NOT_IMPLEMENTED); 190 return 0;
191 return 0; 191 }
192 return eckey->meth->compute_key(out, outlen, pub_key, eckey, KDF);
192} 193}
193 194
194int 195int