summaryrefslogtreecommitdiffstats
path: root/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authortb <tb@openbsd.org>2018-04-14 07:09:21 +0000
committertb <tb@openbsd.org>2018-04-14 07:09:21 +0000
commit341fd9e0365d25e6e931af82db9dcc52a587c361 (patch)
treeb3b2db2a1c48d8b97f1ebbac427eef9f1cb68e4f /lib/libssl/ssl_lib.c
parentaccount for the meltdown pdir page in pmap stats (diff)
downloadwireguard-openbsd-341fd9e0365d25e6e931af82db9dcc52a587c361.tar.xz
wireguard-openbsd-341fd9e0365d25e6e931af82db9dcc52a587c361.zip
make ENGINE_finish() succeed on NULL and simplify callers as in
OpenSSL commit 7c96dbcdab9 by Rich Salz. This cleans up the caller side quite a bit and reduces the number of lines enclosed in #ifndef OPENSSL_NO_ENGINE. codesearch.debian.net shows that almost nothing checks the return value of ENGINE_finish(). While there, replace a few nearby 'if (!ptr)' with 'if (ptr == NULL)'. ok jsing, tested by & ok inoguchi
Diffstat (limited to 'lib/libssl/ssl_lib.c')
-rw-r--r--lib/libssl/ssl_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/ssl_lib.c b/lib/libssl/ssl_lib.c
index 30aea263f66..5cae53041df 100644
--- a/lib/libssl/ssl_lib.c
+++ b/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssl_lib.c,v 1.183 2018/04/07 17:02:34 jsing Exp $ */
+/* $OpenBSD: ssl_lib.c,v 1.184 2018/04/14 07:09:21 tb Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -1976,8 +1976,7 @@ SSL_CTX_free(SSL_CTX *ctx)
#endif
#ifndef OPENSSL_NO_ENGINE
- if (ctx->internal->client_cert_engine)
- ENGINE_finish(ctx->internal->client_cert_engine);
+ ENGINE_finish(ctx->internal->client_cert_engine);
#endif
free(ctx->internal->tlsext_ecpointformatlist);