|
|
@ -193,7 +193,7 @@ func (m *sshCertificateValidityModifier) Modify(cert *ssh.Certificate) error {
|
|
|
|
|
|
|
|
|
|
|
|
diff := time.Duration(cert.ValidBefore-cert.ValidAfter) * time.Second
|
|
|
|
diff := time.Duration(cert.ValidBefore-cert.ValidAfter) * time.Second
|
|
|
|
switch {
|
|
|
|
switch {
|
|
|
|
case diff < max:
|
|
|
|
case diff < min:
|
|
|
|
return errors.Errorf("ssh certificate duration cannot be lower than %s", min)
|
|
|
|
return errors.Errorf("ssh certificate duration cannot be lower than %s", min)
|
|
|
|
case diff > max:
|
|
|
|
case diff > max:
|
|
|
|
return errors.Errorf("ssh certificate duration cannot be greater than %s", max)
|
|
|
|
return errors.Errorf("ssh certificate duration cannot be greater than %s", max)
|
|
|
|