Skip to content

Commit 5efdc6b

Browse files
committed
Make mutual auth side check more robust
1 parent bd9f7b5 commit 5efdc6b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,7 +1830,7 @@ int wolfSSL_CTX_mutual_auth(WOLFSSL_CTX* ctx, int req)
18301830
{
18311831
if (ctx == NULL)
18321832
return BAD_FUNC_ARG;
1833-
if (ctx->method->side == WOLFSSL_CLIENT_END)
1833+
if (ctx->method->side != WOLFSSL_SERVER_END)
18341834
return SIDE_ERROR;
18351835

18361836
ctx->mutualAuth = (byte)req;
@@ -1850,7 +1850,7 @@ int wolfSSL_mutual_auth(WOLFSSL* ssl, int req)
18501850
{
18511851
if (ssl == NULL)
18521852
return BAD_FUNC_ARG;
1853-
if (ssl->options.side == WOLFSSL_CLIENT_END)
1853+
if (ssl->options.side != WOLFSSL_SERVER_END)
18541854
return SIDE_ERROR;
18551855

18561856
ssl->options.mutualAuth = (word16)req;

0 commit comments

Comments
 (0)