Simplify default template.
This commit is contained in:
parent
abc0a63e32
commit
6eba0e0e0e
1 changed files with 7 additions and 8 deletions
|
@ -1,15 +1,14 @@
|
|||
package x509util
|
||||
|
||||
const (
|
||||
UserKey = "User"
|
||||
SubjectKey = "Subject"
|
||||
SANsKey = "SANs"
|
||||
)
|
||||
|
||||
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 }}
|
||||
],
|
||||
"sans": {{ toJson .SANs }},
|
||||
"keyUsage": ["keyEncipherment", "digitalSignature"],
|
||||
"extKeyUsage": ["serverAuth", "clientAuth"]
|
||||
}`
|
||||
|
|
Loading…
Reference in a new issue