From 5efdc6b7b6bc3bfec3294dc0a04be4b16b508bcb Mon Sep 17 00:00:00 2001 From: Juliusz Sosinowicz Date: Thu, 9 Oct 2025 20:08:25 +0200 Subject: [PATCH] Make mutual auth side check more robust --- src/ssl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index f02e47112..8794eb717 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -1830,7 +1830,7 @@ int wolfSSL_CTX_mutual_auth(WOLFSSL_CTX* ctx, int req) { if (ctx == NULL) return BAD_FUNC_ARG; - if (ctx->method->side == WOLFSSL_CLIENT_END) + if (ctx->method->side != WOLFSSL_SERVER_END) return SIDE_ERROR; ctx->mutualAuth = (byte)req; @@ -1850,7 +1850,7 @@ int wolfSSL_mutual_auth(WOLFSSL* ssl, int req) { if (ssl == NULL) return BAD_FUNC_ARG; - if (ssl->options.side == WOLFSSL_CLIENT_END) + if (ssl->options.side != WOLFSSL_SERVER_END) return SIDE_ERROR; ssl->options.mutualAuth = (word16)req;