-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: add nginx 1.24 specific tests
We want to test the `ssl_conf_command` directive, but this is only available in nginx 1.24+. This commit adds a 1.24 specific config file and updates the test runner so we can spin up and test a nginx 1.24 server with this config when available. For now we test the `MinProtocol` and `MaxProtocol` OpenSSL CONF_CTX commands that the compat shim supports.
- Loading branch information
Showing
2 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
daemon off; | ||
master_process off; | ||
pid nginx.pid; | ||
|
||
events { | ||
} | ||
|
||
http { | ||
# Default to both supported protocols enabled. | ||
ssl_protocols TLSv1.2 TLSv1.3; | ||
access_log access.log; | ||
|
||
server { | ||
# Custom configuration w/ ssl_conf_command: | ||
# * TLS 1.3 or greater only | ||
listen 8447 ssl; | ||
ssl_certificate ../../../test-ca/rsa/server.cert; | ||
ssl_certificate_key ../../../test-ca/rsa/server.key; | ||
server_name localhost; | ||
|
||
ssl_conf_command MinProtocol TLSv1.3; | ||
|
||
location = / { | ||
return 200 "hello world\n"; | ||
} | ||
|
||
location /ssl-agreed { | ||
return 200 "protocol:$ssl_protocol,cipher:$ssl_cipher\n"; | ||
} | ||
} | ||
|
||
server { | ||
# Custom configuration w/ ssl_conf_command: | ||
# * TLS 1.2 or less only | ||
listen 8448 ssl; | ||
ssl_certificate ../../../test-ca/rsa/server.cert; | ||
ssl_certificate_key ../../../test-ca/rsa/server.key; | ||
server_name localhost; | ||
|
||
ssl_conf_command MaxProtocol TLSv1.2; | ||
|
||
location = / { | ||
return 200 "hello world\n"; | ||
} | ||
|
||
location /ssl-agreed { | ||
return 200 "protocol:$ssl_protocol,cipher:$ssl_cipher\n"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters