diff options
author | Klooven <Klooven@users.noreply.github.com> | 2021-06-08 23:10:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-08 14:10:37 -0600 |
commit | 1e92258dd670dc62a55b100d1e68e7f482da14a1 (patch) | |
tree | b9e506ef6d60cadcd4534e0b3f0570a96de35e1b /caddytest/integration/caddyfile_adapt | |
parent | 76913b19ff053bc5b0848ce4d0bbf73698f30d93 (diff) |
httpcaddyfile: Add `preferred_chains` global option and issuer subdirective (#4192)
* Added preferred_chains option to Caddyfile
* Caddyfile adapt tests for preferred_chains
Diffstat (limited to 'caddytest/integration/caddyfile_adapt')
-rw-r--r-- | caddytest/integration/caddyfile_adapt/global_options_preferred_chains.txt | 56 | ||||
-rw-r--r-- | caddytest/integration/caddyfile_adapt/tls_acme_preferred_chains.txt | 57 |
2 files changed, 113 insertions, 0 deletions
diff --git a/caddytest/integration/caddyfile_adapt/global_options_preferred_chains.txt b/caddytest/integration/caddyfile_adapt/global_options_preferred_chains.txt new file mode 100644 index 0000000..893b34b --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/global_options_preferred_chains.txt @@ -0,0 +1,56 @@ +{ + preferred_chains smallest +} + +localhost +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":443" + ], + "routes": [ + { + "match": [ + { + "host": [ + "localhost" + ] + } + ], + "terminal": true + } + ] + } + } + }, + "tls": { + "automation": { + "policies": [ + { + "subjects": [ + "localhost" + ], + "issuers": [ + { + "module": "acme", + "preferred_chains": { + "smallest": true + } + }, + { + "module": "zerossl", + "preferred_chains": { + "smallest": true + } + } + ] + } + ] + } + } + } +} diff --git a/caddytest/integration/caddyfile_adapt/tls_acme_preferred_chains.txt b/caddytest/integration/caddyfile_adapt/tls_acme_preferred_chains.txt new file mode 100644 index 0000000..d6242d7 --- /dev/null +++ b/caddytest/integration/caddyfile_adapt/tls_acme_preferred_chains.txt @@ -0,0 +1,57 @@ +localhost + +tls { + issuer acme { + preferred_chains { + any_common_name "Generic CA 1" "Generic CA 2" + } + } +} +---------- +{ + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":443" + ], + "routes": [ + { + "match": [ + { + "host": [ + "localhost" + ] + } + ], + "terminal": true + } + ] + } + } + }, + "tls": { + "automation": { + "policies": [ + { + "subjects": [ + "localhost" + ], + "issuers": [ + { + "module": "acme", + "preferred_chains": { + "any_common_name": [ + "Generic CA 1", + "Generic CA 2" + ] + } + } + ] + } + ] + } + } + } +} |