Fix this constant name to match its value.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2021-03-08 13:31:16 -06:00
parent 389cd3486b
commit 8c0a073cb6
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D

View File

@ -40,7 +40,7 @@ import (
const (
impersonationProxyPort = "8444"
defaultHTTPSPort = 443
oneYear = 100 * 365 * 24 * time.Hour
oneHundredYears = 100 * 365 * 24 * time.Hour
caCommonName = "Pinniped Impersonation Proxy CA"
caCrtKey = "ca.crt"
caKeyKey = "ca.key"
@ -579,7 +579,7 @@ func (c *impersonatorConfigController) ensureCASecretIsCreated(ctx context.Conte
}
func (c *impersonatorConfigController) createCASecret(ctx context.Context) (*certauthority.CA, error) {
impersonationCA, err := certauthority.New(pkix.Name{CommonName: caCommonName}, oneYear)
impersonationCA, err := certauthority.New(pkix.Name{CommonName: caCommonName}, oneHundredYears)
if err != nil {
return nil, fmt.Errorf("could not create impersonation CA: %w", err)
}
@ -673,7 +673,7 @@ func (c *impersonatorConfigController) createNewTLSSecret(ctx context.Context, c
ips = []net.IP{ip}
}
impersonationCert, err := ca.Issue(pkix.Name{}, hostnames, ips, oneYear)
impersonationCert, err := ca.Issue(pkix.Name{}, hostnames, ips, oneHundredYears)
if err != nil {
return nil, fmt.Errorf("could not create impersonation cert: %w", err)
}