mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-01 19:17:48 +08:00
Allow no SSL_CERTIFICATE when using init_ssl callback.
This commit is contained in:
parent
d864d72470
commit
61f5f0b725
@ -4741,8 +4741,10 @@ static int set_ssl_option(struct mg_context *ctx) {
|
|||||||
int i, size;
|
int i, size;
|
||||||
const char *pem;
|
const char *pem;
|
||||||
|
|
||||||
// If PEM file is not specified, skip SSL initialization.
|
// If PEM file is not specified and the init_ssl callback
|
||||||
if ((pem = ctx->config[SSL_CERTIFICATE]) == NULL) {
|
// is not specified, skip SSL initialization.
|
||||||
|
if ((pem = ctx->config[SSL_CERTIFICATE]) == NULL &&
|
||||||
|
ctx->callbacks.init_ssl == NULL) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user