diff options
| author | Adnan Maolood <[email protected]> | 2021-03-04 20:04:46 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-03-04 20:04:46 -0500 |
| commit | 649b20659b02f0adc2595692ffa2854b19871f8c (patch) | |
| tree | 59de8bdbe316ff565391d981043ca7c58e5c2c74 /certificate/store.go | |
| parent | Revert "certificate.Store: Allow using '*' in DNSNames" (diff) | |
| download | go-gemini-649b20659b02f0adc2595692ffa2854b19871f8c.tar.xz go-gemini-649b20659b02f0adc2595692ffa2854b19871f8c.zip | |
Revert "certificate: Remove Subject from CreateOptions"v0.1.19
This reverts commit ce649ecc66ba390a5e9f95c027a15030f90c3b36.
Diffstat (limited to 'certificate/store.go')
| -rw-r--r-- | certificate/store.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/certificate/store.go b/certificate/store.go index 067dfcc..83e4ffe 100644 --- a/certificate/store.go +++ b/certificate/store.go @@ -3,6 +3,7 @@ package certificate import ( "crypto/tls" "crypto/x509" + "crypto/x509/pkix" "errors" "fmt" "io/fs" @@ -169,6 +170,9 @@ func (s *Store) createCertificate(scope string) (tls.Certificate, error) { } return Create(CreateOptions{ DNSNames: []string{scope}, + Subject: pkix.Name{ + CommonName: scope, + }, Duration: 250 * 365 * 24 * time.Hour, }) } |