aboutsummaryrefslogtreecommitdiff
path: root/src/http/modules/ngx_http_ssl_module.c
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2019-02-25 16:42:23 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2019-02-25 16:42:23 +0300
commit8772a0e0892e632c37f3b92b1d287ed9b473cb13 (patch)
tree7f5c5a9db242028cee1f99abafe261c6bcc79a31 /src/http/modules/ngx_http_ssl_module.c
parent6e5a731edb6c1b8581c4b6fd2a2bf4ec0e768c24 (diff)
downloadnginx-8772a0e0892e632c37f3b92b1d287ed9b473cb13.tar.gz
nginx-8772a0e0892e632c37f3b92b1d287ed9b473cb13.zip
SSL: passwords support for dynamic certificate loading.
Passwords have to be copied to the configuration pool to be used at runtime. Also, to prevent blocking on stdin (with "daemon off;") an empty password list is provided. To make things simpler, password handling was modified to allow an empty array (with 0 elements and elts set to NULL) as an equivalent of an array with 1 empty password.
Diffstat (limited to 'src/http/modules/ngx_http_ssl_module.c')
-rw-r--r--src/http/modules/ngx_http_ssl_module.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http/modules/ngx_http_ssl_module.c b/src/http/modules/ngx_http_ssl_module.c
index 759762c5a..3134f0ec8 100644
--- a/src/http/modules/ngx_http_ssl_module.c
+++ b/src/http/modules/ngx_http_ssl_module.c
@@ -935,6 +935,11 @@ found:
}
}
+ conf->passwords = ngx_ssl_preserve_passwords(cf, conf->passwords);
+ if (conf->passwords == NULL) {
+ return NGX_ERROR;
+ }
+
return NGX_OK;
}