From fb3a5a7d905978b5b1ce26ad3100294ee669dda1 Mon Sep 17 00:00:00 2001 From: Deomid Ryabkov Date: Wed, 21 Jun 2017 15:17:22 +0100 Subject: [PATCH] Disable cert verification when ssl_ca_cert is '*' PUBLISHED_FROM=578706e48a2c1fbbf5e9aaab3eba743e7d13fa61 --- mongoose.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mongoose.c b/mongoose.c index 3015c29f..ca80bd4b 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4695,6 +4695,7 @@ void mg_ssl_if_conn_free(struct mg_connection *nc) { static enum mg_ssl_if_result mg_use_ca_cert(struct mg_ssl_if_ctx *ctx, const char *ca_cert) { if (ca_cert == NULL || strcmp(ca_cert, "*") == 0) { + mbedtls_ssl_conf_authmode(ctx->conf, MBEDTLS_SSL_VERIFY_NONE); return MG_SSL_OK; } ctx->ca_cert = (mbedtls_x509_crt *) MG_CALLOC(1, sizeof(*ctx->ca_cert));