[nginx-tests] Tests: tests for proxy_ssl_password_file issue.
Maxim Dounin
mdounin at mdounin.ru
Mon Apr 14 23:24:16 UTC 2025
details: http://freenginx.org/hg/nginx-tests/rev/0a913a10945b
branches:
changeset: 2007:0a913a10945b
user: Maxim Dounin <mdounin at mdounin.ru>
date: Sun Apr 13 05:13:42 2025 +0300
description:
Tests: tests for proxy_ssl_password_file issue.
diffstat:
proxy_ssl_certificate_vars.t | 27 ++++++++++++++++++++++++++-
1 files changed, 26 insertions(+), 1 deletions(-)
diffs (49 lines):
diff --git a/proxy_ssl_certificate_vars.t b/proxy_ssl_certificate_vars.t
--- a/proxy_ssl_certificate_vars.t
+++ b/proxy_ssl_certificate_vars.t
@@ -61,6 +61,20 @@ http {
proxy_ssl_certificate $arg_cert;
proxy_ssl_certificate_key $arg_cert;
}
+
+ location /complex/ {
+ proxy_ssl_certificate $arg_cert.example.com.crt;
+ proxy_ssl_certificate_key $arg_cert.example.com.key;
+ proxy_ssl_password_file password;
+
+ location /complex/1 {
+ proxy_pass https://127.0.0.1:8082/;
+ }
+
+ location /complex/2 {
+ proxy_pass https://127.0.0.1:8082/;
+ }
+ }
}
server {
@@ -133,7 +147,7 @@ sleep 1 if $^O eq 'MSWin32';
$t->write_file('password', '3.example.com');
$t->write_file('index.html', '');
-$t->run()->plan(4);
+$t->run()->plan(6);
###############################################################################
@@ -146,4 +160,15 @@ like(http_get('/encrypted?cert=3'),
like(http_get('/none'),
qr/X-Verify: NONE/ms, 'variable - no certificate');
+like(http_get('/complex/1?cert=3'),
+ qr/X-Verify: SUCCESS/ms, 'variable - inherited encrypted key 1st');
+
+SKIP: {
+skip 'leaves coredump', 1 unless $t->has_version('1.27.6')
+ or $ENV{TEST_NGINX_UNSAFE};
+
+like(http_get('/complex/2?cert=3'),
+ qr/X-Verify: SUCCESS/ms, 'variable - inherited encrypted key 2nd');
+}
+
###############################################################################
More information about the nginx-devel
mailing list