summaryrefslogtreecommitdiff
path: root/src/lib/libssl/ssl_lib.c
diff options
context:
space:
mode:
authortb <>2018-04-14 07:09:21 +0000
committertb <>2018-04-14 07:09:21 +0000
commita32b35170819e9b07e0183d19aee21b9a246943b (patch)
tree83fef660683163befc47beedefbc0b11b71b2756 /src/lib/libssl/ssl_lib.c
parent7eaeb0d1b3ae143b8adb8634c48219a657764be9 (diff)
downloadopenbsd-a32b35170819e9b07e0183d19aee21b9a246943b.tar.gz
openbsd-a32b35170819e9b07e0183d19aee21b9a246943b.tar.bz2
openbsd-a32b35170819e9b07e0183d19aee21b9a246943b.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 'src/lib/libssl/ssl_lib.c')
-rw-r--r--src/lib/libssl/ssl_lib.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 30aea263f6..5cae53041d 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_lib.c,v 1.183 2018/04/07 17:02:34 jsing Exp $ */ 1/* $OpenBSD: ssl_lib.c,v 1.184 2018/04/14 07:09:21 tb Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -1976,8 +1976,7 @@ SSL_CTX_free(SSL_CTX *ctx)
1976#endif 1976#endif
1977 1977
1978#ifndef OPENSSL_NO_ENGINE 1978#ifndef OPENSSL_NO_ENGINE
1979 if (ctx->internal->client_cert_engine) 1979 ENGINE_finish(ctx->internal->client_cert_engine);
1980 ENGINE_finish(ctx->internal->client_cert_engine);
1981#endif 1980#endif
1982 1981
1983 free(ctx->internal->tlsext_ecpointformatlist); 1982 free(ctx->internal->tlsext_ecpointformatlist);