|
@@ -1,5 +1,6 @@
|
|
|
import re
|
|
|
import subprocess
|
|
|
+import os
|
|
|
|
|
|
import backoff
|
|
|
import docker
|
|
@@ -106,6 +107,22 @@ def cannot_negotiate_dhe_ciphersuite(sut_container):
|
|
|
assert "X25519" in r3
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+def can_verify_chain_of_trust(sut_container, ca_cert, fqdn):
|
|
|
+ openssl_params = f"-CAfile '{ca_cert}' -servername '{fqdn}'"
|
|
|
+
|
|
|
+ r = negotiate_cipher(sut_container, openssl_params, "Verify return code")
|
|
|
+ assert "Verify return code: 0 (ok)" in r
|
|
|
+
|
|
|
+
|
|
|
def should_be_equivalent_content(sut_container, expected, actual):
|
|
|
expected_checksum = sut_container.exec_run(f"md5sum {expected}").output.split()[0]
|
|
|
actual_checksum = sut_container.exec_run(f"md5sum {actual}").output.split()[0]
|
|
@@ -220,6 +237,15 @@ def test_custom_dhparam_is_supported_per_site(docker_compose):
|
|
|
|
|
|
can_negotiate_dhe_ciphersuite(sut_container, 2048, '-servername web2.nginx-proxy.tld')
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ can_verify_chain_of_trust(
|
|
|
+ sut_container,
|
|
|
+ ca_cert = f"{os.getcwd()}/certs/ca-root.crt",
|
|
|
+ fqdn = 'web2.nginx-proxy.tld'
|
|
|
+ )
|
|
|
+
|
|
|
|
|
|
|
|
|
|