caddytls: add 'key_type' subdirective (#3956)

* caddytls: add 'key_type' subdirective

* Suggested change

* *string -> string

* test
This commit is contained in:
Jordi Masip 2021-01-06 20:02:58 +01:00 committed by GitHub
parent f0216967dc
commit 8b6fdc04da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 0 deletions

View file

@ -108,6 +108,10 @@ func (st ServerType) buildTLSApp(
ap.OnDemand = true
}
if keyTypeVals, ok := sblock.pile["tls.key_type"]; ok {
ap.KeyType = keyTypeVals[0].Value.(string)
}
// certificate issuers
if issuerVals, ok := sblock.pile["tls.cert_issuer"]; ok {
var issuers []certmagic.Issuer