diff options
| author | tb <> | 2023-11-19 15:50:29 +0000 |
|---|---|---|
| committer | tb <> | 2023-11-19 15:50:29 +0000 |
| commit | 0822368d2c2280cffb45de621306b0a04716bb24 (patch) | |
| tree | 0d234d84614e17241b632cea940adce527af994a /src | |
| parent | 890d88b77e3c187cc5d11f2e9e51b6d534af555b (diff) | |
| download | openbsd-0822368d2c2280cffb45de621306b0a04716bb24.tar.gz openbsd-0822368d2c2280cffb45de621306b0a04716bb24.tar.bz2 openbsd-0822368d2c2280cffb45de621306b0a04716bb24.zip | |
Manually unifdef OPENSSL_NO_ENGINE in ssl_clnt.c
This allows us to simplify ssl_do_client_cert_cb() a bit.
ok jsing
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/ssl_clnt.c | 21 |
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) | |||
| 2527 | static int | 2524 | static int |
| 2528 | ssl_do_client_cert_cb(SSL *s, X509 **px509, EVP_PKEY **ppkey) | 2525 | ssl_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 | ||
| 2546 | static int | 2533 | static int |
