Skip to content

Commit

Permalink
Skip verification callback if no errors were found
Browse files Browse the repository at this point in the history
  • Loading branch information
tobil4sk committed Nov 25, 2024
1 parent 5eeaab9 commit 6b84ade
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/mbedtls/mbedtls_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ static struct custom_operations ssl_config_ops = {

#ifdef _WIN32
static int verify_callback(void* param, mbedtls_x509_crt *crt, int depth, uint32_t *flags) {
if (*flags & MBEDTLS_X509_BADCERT_CN_MISMATCH) {
if (*flags == 0 || *flags & MBEDTLS_X509_BADCERT_CN_MISMATCH) {
return 0;
}

Expand Down

0 comments on commit 6b84ade

Please sign in to comment.