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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user