1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-02-10 18:25:29 -05:00

support organization in TLS cert gen

This commit is contained in:
Darien Raymond
2018-04-12 21:43:05 +02:00
parent 290848cf4c
commit 0e1d2a924b

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)