Commit d0e66de2 authored by Daniel O'Connell's avatar Daniel O'Connell

Re-added ssl_ca_certificate option

parent f537670c
...@@ -1188,6 +1188,7 @@ enum { ...@@ -1188,6 +1188,7 @@ enum {
#endif #endif
#ifdef NS_ENABLE_SSL #ifdef NS_ENABLE_SSL
SSL_CERTIFICATE, SSL_CERTIFICATE,
SSL_CA_CERTIFICATE,
#endif #endif
URL_REWRITES, URL_REWRITES,
NUM_OPTIONS NUM_OPTIONS
...@@ -1228,6 +1229,7 @@ static const char *static_config_options[] = { ...@@ -1228,6 +1229,7 @@ static const char *static_config_options[] = {
#endif #endif
#ifdef NS_ENABLE_SSL #ifdef NS_ENABLE_SSL
"ssl_certificate", NULL, "ssl_certificate", NULL,
"ssl_ca_certificate", NULL,
#endif #endif
"url_rewrites", NULL, "url_rewrites", NULL,
NULL NULL
...@@ -4558,6 +4560,10 @@ const char *mg_set_option(struct mg_server *server, const char *name, ...@@ -4558,6 +4560,10 @@ const char *mg_set_option(struct mg_server *server, const char *name,
} else if (res == -1) { } else if (res == -1) {
error_msg = "SSL_CTX_new() failed"; error_msg = "SSL_CTX_new() failed";
} }
} else if (ind == SSL_CA_CERTIFICATE) {
if (ns_set_ssl_ca_cert(&server->ns_server, value) != 0) {
error_msg = "Error setting CA cert";
}
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment