support organization in TLS cert gen

pull/1046/head
Darien Raymond 2018-04-12 21:43:05 +02:00
parent 290848cf4c
commit 0e1d2a924b
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 6 additions and 0 deletions

View File

@ -78,6 +78,12 @@ func KeyUsage(usage x509.KeyUsage) Option {
}
}
func Organization(org string) Option {
return func(c *x509.Certificate) {
c.Subject.Organization = []string{org}
}
}
func MustGenerate(parent *Certificate, opts ...Option) *Certificate {
cert, err := Generate(parent, opts...)
common.Must(err)