From 61f5f0b72569eb71b80852e340de780db30adb83 Mon Sep 17 00:00:00 2001 From: John Safranek <john@wolfssl.com> Date: Wed, 17 Jul 2013 16:37:28 -0700 Subject: [PATCH] Allow no SSL_CERTIFICATE when using init_ssl callback. --- mongoose.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mongoose.c b/mongoose.c index 30de4f161..309d4a55f 100644 --- a/mongoose.c +++ b/mongoose.c @@ -4741,8 +4741,10 @@ static int set_ssl_option(struct mg_context *ctx) { int i, size; const char *pem; - // If PEM file is not specified, skip SSL initialization. - if ((pem = ctx->config[SSL_CERTIFICATE]) == NULL) { + // If PEM file is not specified and the init_ssl callback + // is not specified, skip SSL initialization. + if ((pem = ctx->config[SSL_CERTIFICATE]) == NULL && + ctx->callbacks.init_ssl == NULL) { return 1; } -- GitLab