[nginx-tests] Tests: fixed ssl_store.t on Windows.

Maxim Dounin mdounin at mdounin.ru
Mon Nov 10 23:26:00 UTC 2025


details:   http://freenginx.org/hg/nginx-tests/rev/5ab28d196497
branches:  
changeset: 2033:5ab28d196497
user:      Maxim Dounin <mdounin at mdounin.ru>
date:      Tue Nov 11 01:21:29 2025 +0300
description:
Tests: fixed ssl_store.t on Windows.

OpenSSL requires "file:..." store URIs to start with "/" as per RFC 8089,
which is not the case for %%TESTDIR%% on Windows.  Fix is to add "///"
before %%TESTDIR%%, which results in correct file URIs for both Windows
and Unix systems.

diffstat:

 ssl_store.t |  36 ++++++++++++++++++------------------
 1 files changed, 18 insertions(+), 18 deletions(-)

diffs (99 lines):

diff --git a/ssl_store.t b/ssl_store.t
--- a/ssl_store.t
+++ b/ssl_store.t
@@ -48,24 +48,24 @@ http {
         listen       127.0.0.1:8443 ssl;
         server_name  localhost;
 
-        ssl_certificate store:file:%%TESTDIR%%/localhost.crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/localhost.key;
+        ssl_certificate store:file:///%%TESTDIR%%/localhost.crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/localhost.key;
     }
 
     server {
         listen       127.0.0.1:8443 ssl;
         server_name  crt_key;
 
-        ssl_certificate store:file:%%TESTDIR%%/localhost.crt_key;
-        ssl_certificate_key store:file:%%TESTDIR%%/localhost.crt_key;
+        ssl_certificate store:file:///%%TESTDIR%%/localhost.crt_key;
+        ssl_certificate_key store:file:///%%TESTDIR%%/localhost.crt_key;
     }
 
     server {
         listen       127.0.0.1:8443 ssl;
         server_name  key_crt;
 
-        ssl_certificate store:file:%%TESTDIR%%/localhost.key_crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/localhost.key_crt;
+        ssl_certificate store:file:///%%TESTDIR%%/localhost.key_crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/localhost.key_crt;
     }
 
     server {
@@ -73,8 +73,8 @@ http {
         server_name  encrypted;
 
         ssl_password_file passwords;
-        ssl_certificate store:file:%%TESTDIR%%/encrypted.crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/encrypted.key;
+        ssl_certificate store:file:///%%TESTDIR%%/encrypted.crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/encrypted.key;
     }
 
     server {
@@ -82,8 +82,8 @@ http {
         server_name  encrypted_crt_key;
 
         ssl_password_file passwords;
-        ssl_certificate store:file:%%TESTDIR%%/encrypted.crt_key;
-        ssl_certificate_key store:file:%%TESTDIR%%/encrypted.crt_key;
+        ssl_certificate store:file:///%%TESTDIR%%/encrypted.crt_key;
+        ssl_certificate_key store:file:///%%TESTDIR%%/encrypted.crt_key;
     }
 
     server {
@@ -91,16 +91,16 @@ http {
         server_name  encrypted_key_crt;
 
         ssl_password_file passwords;
-        ssl_certificate store:file:%%TESTDIR%%/encrypted.key_crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/encrypted.key_crt;
+        ssl_certificate store:file:///%%TESTDIR%%/encrypted.key_crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/encrypted.key_crt;
     }
 
     server {
         listen       127.0.0.1:8443 ssl;
         server_name  dynamic no_password;
 
-        ssl_certificate store:file:%%TESTDIR%%/$ssl_server_name.crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/$ssl_server_name.key;
+        ssl_certificate store:file:///%%TESTDIR%%/$ssl_server_name.crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/$ssl_server_name.key;
     }
 
     server {
@@ -108,8 +108,8 @@ http {
         server_name  password;
 
         ssl_password_file password;
-        ssl_certificate store:file:%%TESTDIR%%/$ssl_server_name.crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/$ssl_server_name.key;
+        ssl_certificate store:file:///%%TESTDIR%%/$ssl_server_name.crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/$ssl_server_name.key;
     }
 
     server {
@@ -117,8 +117,8 @@ http {
         server_name  multiple;
 
         ssl_password_file passwords;
-        ssl_certificate store:file:%%TESTDIR%%/$ssl_server_name.crt;
-        ssl_certificate_key store:file:%%TESTDIR%%/$ssl_server_name.key;
+        ssl_certificate store:file:///%%TESTDIR%%/$ssl_server_name.crt;
+        ssl_certificate_key store:file:///%%TESTDIR%%/$ssl_server_name.key;
     }
 }
 


More information about the nginx-devel mailing list