Add sample leaf template.

This commit is contained in:
Mariano Cano 2020-07-01 18:30:41 -07:00
parent 70c0af8200
commit 208c351a39

15
x509util/templates.go Normal file
View file

@ -0,0 +1,15 @@
package x509util
const DefaultLeafTemplate = `{
"subject": {{ toJson .Subject }},
"sans": [
{{- range $index, $san := initial .SANs }}
{"type": "{{ $san.Type }}", "value": "{{ $san.Value }}"},
{{- end }}
{{- with last .SANs }}
{"type": "{{ .Type }}", "value": "{{ .Value }}"}
{{- end }}
],
"keyUsage": ["keyEncipherment", "digitalSignature"],
"extKeyUsage": ["serverAuth", "clientAuth"]
}`