diff options
| author | Adnan Maolood <[email protected]> | 2021-03-04 16:55:06 -0500 |
|---|---|---|
| committer | Adnan Maolood <[email protected]> | 2021-03-04 16:55:09 -0500 |
| commit | d6d02e398eeaaf671f6bdaaf7fb9962c734674fa (patch) | |
| tree | 6448f5a0c0c3195001b0875e2a3a71a011519c4e /certificate/store.go | |
| parent | certificate.Store: Allow using '*' in DNSNames (diff) | |
| download | go-gemini-d6d02e398eeaaf671f6bdaaf7fb9962c734674fa.tar.xz go-gemini-d6d02e398eeaaf671f6bdaaf7fb9962c734674fa.zip | |
certificate.Store: Bump default duration to 250 years
Diffstat (limited to 'certificate/store.go')
| -rw-r--r-- | certificate/store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/certificate/store.go b/certificate/store.go index ed95561..e39f52b 100644 --- a/certificate/store.go +++ b/certificate/store.go @@ -99,7 +99,7 @@ func (s *Store) write(scope string, cert tls.Certificate) error { // If no matching scope has been registered, Get returns an error. // Get generates new certificates as needed and rotates expired certificates. // It calls CreateCertificate to create a new certificate if it is not nil, -// otherwise it creates certificates with a duration of 1 year. +// otherwise it creates certificates with a duration of 250 years. // // Get is suitable for use in a gemini.Server's GetCertificate field. func (s *Store) Get(hostname string) (*tls.Certificate, error) { @@ -168,7 +168,7 @@ func (s *Store) createCertificate(scope string) (tls.Certificate, error) { } return Create(CreateOptions{ DNSNames: []string{scope}, - Duration: 365 * 24 * time.Hour, + Duration: 250 * 365 * 24 * time.Hour, }) } |