Skip to content

Commit

Permalink
mbedtls: fix verify_mode properly in LWS_HAVE_mbedtls_ssl_set_hs_auth…
Browse files Browse the repository at this point in the history
…mode as well
  • Loading branch information
ikicha authored and lws-team committed Nov 2, 2024
1 parent 84e640d commit 367ba7e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tls/mbedtls/wrapper/platform/ssl_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -981,9 +981,9 @@ void SSL_set_SSL_CTX(SSL *ssl, SSL_CTX *ctx)

#if defined(LWS_HAVE_mbedtls_ssl_set_hs_authmode)

if (ctx->verify_mode == SSL_VERIFY_PEER)
if ((ctx->verify_mode & SSL_VERIFY_PEER) > 0)
mode = MBEDTLS_SSL_VERIFY_REQUIRED;
else if (ctx->verify_mode == SSL_VERIFY_FAIL_IF_NO_PEER_CERT)
else if ((ctx->verify_mode & SSL_VERIFY_FAIL_IF_NO_PEER_CERT) > 0)
mode = MBEDTLS_SSL_VERIFY_REQUIRED;
else if (ctx->verify_mode == SSL_VERIFY_CLIENT_ONCE)
mode = MBEDTLS_SSL_VERIFY_UNSET;
Expand Down

0 comments on commit 367ba7e

Please sign in to comment.