Add default templates for intermediate a root certificates.

This commit is contained in:
Mariano Cano 2020-07-08 16:39:19 -07:00
parent 0847af16cb
commit 534a6b6c4c

View file

@ -37,3 +37,22 @@ const DefaultLeafTemplate = `{
"keyUsage": ["keyEncipherment", "digitalSignature"],
"extKeyUsage": ["serverAuth", "clientAuth"]
}`
const DefaultIntermediateTemplate = `{
"subject": {{ toJson .Subject }},
"keyUsage": ["certSign", "crlSign"],
"basicConstraints": {
"isCA": true,
"maxPathLen": 0
}
}`
const DefaultRootTemplate = `{
"subject": {{ toJson .Subject }},
"issuer": {{ toJson .Subject }},
"keyUsage": ["certSign", "crlSign"],
"basicConstraints": {
"isCA": true,
"maxPathLen": 1
}
}`