From 13781e67ab1b2553598d0dd1a7153ce3cdbd4879 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Mon, 16 Nov 2020 11:05:55 -0700 Subject: caddytls: Support multiple issuers (#3862) * caddytls: Support multiple issuers Defaults are Let's Encrypt and ZeroSSL. There are probably bugs. * Commit updated integration tests, d'oh * Update go.mod --- .../integration/caddyfile_adapt/global_options.txt | 8 ++++--- .../caddyfile_adapt/global_options_acme.txt | 26 ++++++++++++---------- .../caddyfile_adapt/global_options_admin.txt | 8 ++++--- .../caddyfile_adapt/tls_automation_policies.txt | 24 ++++++++++++-------- 4 files changed, 39 insertions(+), 27 deletions(-) (limited to 'caddytest/integration') diff --git a/caddytest/integration/caddyfile_adapt/global_options.txt b/caddytest/integration/caddyfile_adapt/global_options.txt index 6562824..a0a7f0b 100644 --- a/caddytest/integration/caddyfile_adapt/global_options.txt +++ b/caddytest/integration/caddyfile_adapt/global_options.txt @@ -54,9 +54,11 @@ "automation": { "policies": [ { - "issuer": { - "module": "internal" - }, + "issuers": [ + { + "module": "internal" + } + ], "key_type": "ed25519" } ], diff --git a/caddytest/integration/caddyfile_adapt/global_options_acme.txt b/caddytest/integration/caddyfile_adapt/global_options_acme.txt index 500a723..0f1d78f 100644 --- a/caddytest/integration/caddyfile_adapt/global_options_acme.txt +++ b/caddytest/integration/caddyfile_adapt/global_options_acme.txt @@ -57,18 +57,20 @@ "automation": { "policies": [ { - "issuer": { - "ca": "https://example.com", - "email": "test@example.com", - "external_account": { - "key_id": "4K2scIVbBpNd-78scadB2g", - "mac_key": "abcdefghijklmnopqrstuvwx-abcdefghijklnopqrstuvwxyz12ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh" - }, - "module": "acme", - "trusted_roots_pem_files": [ - "/path/to/ca.crt" - ] - }, + "issuers": [ + { + "ca": "https://example.com", + "email": "test@example.com", + "external_account": { + "key_id": "4K2scIVbBpNd-78scadB2g", + "mac_key": "abcdefghijklmnopqrstuvwx-abcdefghijklnopqrstuvwxyz12ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefgh" + }, + "module": "acme", + "trusted_roots_pem_files": [ + "/path/to/ca.crt" + ] + } + ], "key_type": "ed25519" } ], diff --git a/caddytest/integration/caddyfile_adapt/global_options_admin.txt b/caddytest/integration/caddyfile_adapt/global_options_admin.txt index 9d0fb27..67cf5ad 100644 --- a/caddytest/integration/caddyfile_adapt/global_options_admin.txt +++ b/caddytest/integration/caddyfile_adapt/global_options_admin.txt @@ -62,9 +62,11 @@ "automation": { "policies": [ { - "issuer": { - "module": "internal" - }, + "issuers": [ + { + "module": "internal" + } + ], "key_type": "ed25519" } ], diff --git a/caddytest/integration/caddyfile_adapt/tls_automation_policies.txt b/caddytest/integration/caddyfile_adapt/tls_automation_policies.txt index 0a90e4a..c3fd489 100644 --- a/caddytest/integration/caddyfile_adapt/tls_automation_policies.txt +++ b/caddytest/integration/caddyfile_adapt/tls_automation_policies.txt @@ -54,24 +54,30 @@ foo.tld, www.foo.tld { "foo.tld", "www.foo.tld" ], - "issuer": { - "module": "internal" - } + "issuers": [ + { + "module": "internal" + } + ] }, { "subjects": [ "*.*.tld", "*.tld" ], - "issuer": { - "module": "internal" - }, + "issuers": [ + { + "module": "internal" + } + ], "on_demand": true }, { - "issuer": { - "module": "internal" - } + "issuers": [ + { + "module": "internal" + } + ] } ] } -- cgit v1.2.3