diff options
| author | Adnan Maolood <[email protected]> | 2021-03-04 16:27:16 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-03-04 16:27:16 -0500 |
| commit | ce649ecc66ba390a5e9f95c027a15030f90c3b36 (patch) | |
| tree | 390216869ca2bdd44fcb79811b66a8a95b612200 /certificate/create.go | |
| parent | certificate: Fix deadlock in Store.Get (diff) | |
| download | go-gemini-ce649ecc66ba390a5e9f95c027a15030f90c3b36.tar.xz go-gemini-ce649ecc66ba390a5e9f95c027a15030f90c3b36.zip | |
certificate: Remove Subject from CreateOptions
Diffstat (limited to 'certificate/create.go')
| -rw-r--r-- | certificate/create.go | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/certificate/create.go b/certificate/create.go index 2d00ded..7bcb13b 100644 --- a/certificate/create.go +++ b/certificate/create.go @@ -9,7 +9,6 @@ import ( "crypto/rand" "crypto/tls" "crypto/x509" - "crypto/x509/pkix" "encoding/pem" "math/big" "net" @@ -28,13 +27,6 @@ type CreateOptions struct { // Should contain the IP addresses that the certificate is valid for. IPAddresses []net.IP - // Subject specifies the certificate Subject. - // - // Subject.CommonName can contain the DNS name that this certificate - // is valid for. Server certificates should specify both a Subject - // and a Subject Alternate Name. - Subject pkix.Name - // Duration specifies the amount of time that the certificate is valid for. Duration time.Duration @@ -100,7 +92,6 @@ func newX509KeyPair(options CreateOptions) (*x509.Certificate, crypto.PrivateKey BasicConstraintsValid: true, IPAddresses: options.IPAddresses, DNSNames: options.DNSNames, - Subject: options.Subject, } crt, err := x509.CreateCertificate(rand.Reader, &template, &template, pub, priv) |