mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-17 10:49:47 +00:00
Disable cert verification when ssl_ca_cert is '*'
PUBLISHED_FROM=578706e48a2c1fbbf5e9aaab3eba743e7d13fa61
This commit is contained in:
1 parent
f374ac5f9a
commit
fb3a5a7d90
1 file changed
+1
@@ -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));
|
||||
|
||||
Reference in new issue
Block a user