From 0e1d2a924b0343beb8806754d0a3311a767017a9 Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Thu, 12 Apr 2018 21:43:05 +0200 Subject: [PATCH] support organization in TLS cert gen --- common/protocol/tls/cert/cert.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/common/protocol/tls/cert/cert.go b/common/protocol/tls/cert/cert.go index 818a093bf..d12da482d 100644 --- a/common/protocol/tls/cert/cert.go +++ b/common/protocol/tls/cert/cert.go @@ -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)