From 56ed6762d8015c95aad7487189b7bf64cdf8bd94 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 5 Dec 2024 12:08:07 -0800 Subject: [PATCH] Expose compatibility get_verify functions with openssl_extra. --- src/ssl.c | 7 ++++--- tests/api.c | 4 +++- wolfssl/ssl.h | 7 ++----- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index b11ed59a7..b6d287aa4 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -20888,11 +20888,12 @@ WOLFSSL_CTX* wolfSSL_get_SSL_CTX(const WOLFSSL* ssl) return ssl->ctx; } -#if defined(OPENSSL_ALL) || (defined(OPENSSL_EXTRA) && defined(HAVE_STUNNEL)) \ - || defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(WOLFSSL_NGINX) +#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(HAVE_STUNNEL) || \ + defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(WOLFSSL_NGINX) /* TODO: Doesn't currently track SSL_VERIFY_CLIENT_ONCE */ -int wolfSSL_get_verify_mode(const WOLFSSL* ssl) { +int wolfSSL_get_verify_mode(const WOLFSSL* ssl) +{ int mode = 0; WOLFSSL_ENTER("wolfSSL_get_verify_mode"); diff --git a/tests/api.c b/tests/api.c index e7b64124a..0c3a51ed2 100644 --- a/tests/api.c +++ b/tests/api.c @@ -72908,7 +72908,9 @@ static int test_wolfSSL_sk_DIST_POINT(void) static int test_wolfSSL_verify_mode(void) { EXPECT_DECLS; -#if defined(OPENSSL_ALL) && !defined(NO_RSA) +#if !defined(NO_RSA) && (defined(OPENSSL_ALL) || \ + defined(HAVE_STUNNEL) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \ + defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY)) WOLFSSL* ssl = NULL; WOLFSSL_CTX* ctx = NULL; diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 8989f5204..be1fecffe 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -5427,13 +5427,10 @@ WOLFSSL_API int wolfSSL_CTX_set1_curves_list(WOLFSSL_CTX* ctx, const char* names WOLFSSL_API int wolfSSL_set1_curves_list(WOLFSSL* ssl, const char* names); #endif -#if defined(OPENSSL_ALL) || \ - defined(HAVE_STUNNEL) || defined(WOLFSSL_MYSQL_COMPATIBLE) || \ - defined(WOLFSSL_NGINX) || defined(WOLFSSL_HAPROXY) - +#if defined(OPENSSL_ALL) || defined(OPENSSL_EXTRA) || defined(HAVE_STUNNEL) || \ + defined(WOLFSSL_MYSQL_COMPATIBLE) || defined(WOLFSSL_NGINX) WOLFSSL_API int wolfSSL_get_verify_mode(const WOLFSSL* ssl); WOLFSSL_API int wolfSSL_CTX_get_verify_mode(const WOLFSSL_CTX* ctx); - #endif #ifdef WOLFSSL_JNI