From 5352e100dbc26db254fd69be15f389c5b09ab253 Mon Sep 17 00:00:00 2001 From: Ruby Martin Date: Thu, 22 May 2025 14:20:26 -0600 Subject: [PATCH] Add NO_OLD_TLS macroguard, remove dead code --- src/ssl.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 768bd4678..80e55cf86 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -13545,10 +13545,12 @@ static int Set_CTX_max_proto_version(WOLFSSL_CTX* ctx, int ver) } switch (ver) { +#ifndef NO_TLS +#ifndef NO_OLD_TLS case SSL2_VERSION: WOLFSSL_MSG("wolfSSL does not support SSLv2"); return WOLFSSL_FAILURE; -#ifndef NO_TLS +#endif case SSL3_VERSION: wolfSSL_CTX_set_options(ctx, WOLFSSL_OP_NO_TLSv1); FALL_THROUGH; @@ -13603,9 +13605,6 @@ static int Set_CTX_max_proto_version(WOLFSSL_CTX* ctx, int ver) } /* Update the method */ switch (ver) { - case SSL2_VERSION: - WOLFSSL_MSG("wolfSSL does not support SSLv2"); - return WOLFSSL_FAILURE; #ifndef NO_TLS case SSL3_VERSION: ctx->method->version.minor = SSLv3_MINOR;