summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2023-11-19 15:50:29 +0000
committertb <>2023-11-19 15:50:29 +0000
commit063dc9cb05e933675041b472f4e18a7ab02413f1 (patch)
tree0d234d84614e17241b632cea940adce527af994a
parentf6bbfff95e316fdf0c89997fccd18cb63c6f05a5 (diff)
downloadopenbsd-063dc9cb05e933675041b472f4e18a7ab02413f1.tar.gz
openbsd-063dc9cb05e933675041b472f4e18a7ab02413f1.tar.bz2
openbsd-063dc9cb05e933675041b472f4e18a7ab02413f1.zip
Manually unifdef OPENSSL_NO_ENGINE in ssl_clnt.c
This allows us to simplify ssl_do_client_cert_cb() a bit. ok jsing
-rw-r--r--src/lib/libssl/ssl_clnt.c21
1 files changed, 4 insertions, 17 deletions
diff --git a/src/lib/libssl/ssl_clnt.c b/src/lib/libssl/ssl_clnt.c
index 441da643fd..76ed10f806 100644
--- a/src/lib/libssl/ssl_clnt.c
+++ b/src/lib/libssl/ssl_clnt.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssl_clnt.c,v 1.161 2023/07/08 16:40:13 beck Exp $ */ 1/* $OpenBSD: ssl_clnt.c,v 1.162 2023/11/19 15:50:29 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 *
@@ -161,9 +161,6 @@
161#include <openssl/objects.h> 161#include <openssl/objects.h>
162#include <openssl/opensslconf.h> 162#include <openssl/opensslconf.h>
163 163
164#ifndef OPENSSL_NO_ENGINE
165#include <openssl/engine.h>
166#endif
167#ifndef OPENSSL_NO_GOST 164#ifndef OPENSSL_NO_GOST
168#include <openssl/gost.h> 165#include <openssl/gost.h>
169#endif 166#endif
@@ -2527,20 +2524,10 @@ ssl3_check_finished(SSL *s)
2527static int 2524static int
2528ssl_do_client_cert_cb(SSL *s, X509 **px509, EVP_PKEY **ppkey) 2525ssl_do_client_cert_cb(SSL *s, X509 **px509, EVP_PKEY **ppkey)
2529{ 2526{
2530 int i = 0; 2527 if (s->ctx->client_cert_cb == NULL)
2528 return 0;
2531 2529
2532#ifndef OPENSSL_NO_ENGINE 2530 return s->ctx->client_cert_cb(s, px509, ppkey);
2533 if (s->ctx->client_cert_engine) {
2534 i = ENGINE_load_ssl_client_cert(
2535 s->ctx->client_cert_engine, s,
2536 SSL_get_client_CA_list(s), px509, ppkey, NULL, NULL, NULL);
2537 if (i != 0)
2538 return (i);
2539 }
2540#endif
2541 if (s->ctx->client_cert_cb)
2542 i = s->ctx->client_cert_cb(s, px509, ppkey);
2543 return (i);
2544} 2531}
2545 2532
2546static int 2533static int