forked from TrueCloudLab/certificates
Add sample leaf template.
This commit is contained in:
parent
70c0af8200
commit
208c351a39
1 changed files with 15 additions and 0 deletions
15
x509util/templates.go
Normal file
15
x509util/templates.go
Normal 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"]
|
||||
}`
|
Loading…
Reference in a new issue