-
-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
acmeserver: Add
sign_with_root
for Caddyfile (#6345)
* Added sign_with_root option available in the Caddyfile * Added tests for sign_with_root to validate the adapted JSON config
- Loading branch information
1 parent
f6d2c29
commit e6f46c8
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
67 changes: 67 additions & 0 deletions
67
caddytest/integration/caddyfile_adapt/acme_server_sign_with_root.caddyfiletest
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,67 @@ | ||
{ | ||
pki { | ||
ca internal { | ||
name "Internal" | ||
root_cn "Internal Root Cert" | ||
intermediate_cn "Internal Intermediate Cert" | ||
} | ||
} | ||
} | ||
|
||
acme.example.com { | ||
acme_server { | ||
ca internal | ||
sign_with_root | ||
} | ||
} | ||
---------- | ||
{ | ||
"apps": { | ||
"http": { | ||
"servers": { | ||
"srv0": { | ||
"listen": [ | ||
":443" | ||
], | ||
"routes": [ | ||
{ | ||
"match": [ | ||
{ | ||
"host": [ | ||
"acme.example.com" | ||
] | ||
} | ||
], | ||
"handle": [ | ||
{ | ||
"handler": "subroute", | ||
"routes": [ | ||
{ | ||
"handle": [ | ||
{ | ||
"ca": "internal", | ||
"handler": "acme_server", | ||
"sign_with_root": true | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"terminal": true | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"pki": { | ||
"certificate_authorities": { | ||
"internal": { | ||
"name": "Internal", | ||
"root_common_name": "Internal Root Cert", | ||
"intermediate_common_name": "Internal Intermediate Cert" | ||
} | ||
} | ||
} | ||
} | ||
} |
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