@@ -629,7 +629,7 @@ func MakeSelfSignedCAConfig(name string, lifetime time.Duration) (*TLSCertificat
629
629
func MakeSelfSignedCAConfigForSubject (subject pkix.Name , lifetime time.Duration ) (* TLSCertificateConfig , error ) {
630
630
if lifetime <= 0 {
631
631
lifetime = DefaultCACertificateLifetimeDuration
632
- fmt .Fprintf (os .Stderr , "Validity period of the certificate for %q is unset, resetting to %d years !\n " , subject .CommonName , lifetime )
632
+ fmt .Fprintf (os .Stderr , "Validity period of the certificate for %q is unset, resetting to %s !\n " , subject .CommonName , lifetime . String () )
633
633
}
634
634
635
635
if lifetime > DefaultCACertificateLifetimeDuration {
@@ -1018,7 +1018,7 @@ func newSigningCertificateTemplateForDuration(subject pkix.Name, caLifetime time
1018
1018
func newServerCertificateTemplate (subject pkix.Name , hosts []string , lifetime time.Duration , currentTime func () time.Time , authorityKeyId , subjectKeyId []byte ) * x509.Certificate {
1019
1019
if lifetime <= 0 {
1020
1020
lifetime = DefaultCertificateLifetimeDuration
1021
- fmt .Fprintf (os .Stderr , "Validity period of the certificate for %q is unset, resetting to %d years !\n " , subject .CommonName , lifetime )
1021
+ fmt .Fprintf (os .Stderr , "Validity period of the certificate for %q is unset, resetting to %s !\n " , subject .CommonName , lifetime . String () )
1022
1022
}
1023
1023
1024
1024
if lifetime > DefaultCertificateLifetimeDuration {
@@ -1105,7 +1105,7 @@ func CertsFromPEM(pemCerts []byte) ([]*x509.Certificate, error) {
1105
1105
func NewClientCertificateTemplate (subject pkix.Name , lifetime time.Duration , currentTime func () time.Time ) * x509.Certificate {
1106
1106
if lifetime <= 0 {
1107
1107
lifetime = DefaultCertificateLifetimeDuration
1108
- fmt .Fprintf (os .Stderr , "Validity period of the certificate for %q is unset, resetting to %d years !\n " , subject .CommonName , lifetime )
1108
+ fmt .Fprintf (os .Stderr , "Validity period of the certificate for %q is unset, resetting to %s !\n " , subject .CommonName , lifetime . String () )
1109
1109
}
1110
1110
1111
1111
if lifetime > DefaultCertificateLifetimeDuration {
0 commit comments