certificates/x509util/templates.go
2020-07-21 14:18:04 -07:00

15 lines
404 B
Go

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"]
}`