summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2023-06-25 19:35:56 +0000
committertb <>2023-06-25 19:35:56 +0000
commit90a1331e72c5f507ab8bee6cb7c49e0e5b0c2a9a (patch)
tree144b4ce02bc1e924799fd280fa4daa5dbbf08e20 /src
parentf9b83075010aefbd7b3db67c575c77e1a95f508a (diff)
downloadopenbsd-90a1331e72c5f507ab8bee6cb7c49e0e5b0c2a9a.tar.gz
openbsd-90a1331e72c5f507ab8bee6cb7c49e0e5b0c2a9a.tar.bz2
openbsd-90a1331e72c5f507ab8bee6cb7c49e0e5b0c2a9a.zip
Remove unneeded bn_local.h and drop a NULL check
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/ecdh/ech_key.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/lib/libcrypto/ecdh/ech_key.c b/src/lib/libcrypto/ecdh/ech_key.c
index aa831f2b87..e41092a411 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.18 2023/06/25 19:26:04 tb Exp $ */ 1/* $OpenBSD: ech_key.c,v 1.19 2023/06/25 19:35:56 tb Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED. 3 * Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
4 * 4 *
@@ -78,7 +78,6 @@
78#include <openssl/objects.h> 78#include <openssl/objects.h>
79#include <openssl/sha.h> 79#include <openssl/sha.h>
80 80
81#include "bn_local.h"
82#include "ec_local.h" 81#include "ec_local.h"
83 82
84/* 83/*
@@ -180,10 +179,9 @@ ossl_ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
180 ret = outlen; 179 ret = outlen;
181 } 180 }
182 181
183err: 182 err:
184 EC_POINT_free(tmp); 183 EC_POINT_free(tmp);
185 if (ctx) 184 BN_CTX_end(ctx);
186 BN_CTX_end(ctx);
187 BN_CTX_free(ctx); 185 BN_CTX_free(ctx);
188 free(buf); 186 free(buf);
189 return (ret); 187 return (ret);