certificates/x509util/templates.go

16 lines
404 B
Go
Raw Normal View History

2020-07-02 01:30:41 +00:00
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"]
}`