Merge pull request #107 from smallstep/ssh-valid-after

Truncate to seconds ValidAfter
This commit is contained in:
Mariano Cano 2019-09-19 15:27:28 -07:00 committed by GitHub
commit 39b41b5e83
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,7 +216,7 @@ func (m *sshCertificateValidityModifier) Modify(cert *ssh.Certificate) error {
}
if cert.ValidAfter == 0 {
cert.ValidAfter = uint64(now().Unix())
cert.ValidAfter = uint64(now().Truncate(time.Second).Unix())
}
if cert.ValidBefore == 0 {
t := time.Unix(int64(cert.ValidAfter), 0)