Re-added ssl_ca_certificate option

This commit is contained in:
Daniel O'Connell committed 2014-05-13 12:30:30 +01:00
1 parent f537670ce2
commit d0e66de225
1 file changed
+6
+6
View File
@@ -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[] = {
#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,
} 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
} }