forked from TrueCloudLab/certificates
Merge pull request #107 from smallstep/ssh-valid-after
Truncate to seconds ValidAfter
This commit is contained in:
commit
39b41b5e83
1 changed files with 1 additions and 1 deletions
|
@ -216,7 +216,7 @@ func (m *sshCertificateValidityModifier) Modify(cert *ssh.Certificate) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
if cert.ValidAfter == 0 {
|
if cert.ValidAfter == 0 {
|
||||||
cert.ValidAfter = uint64(now().Unix())
|
cert.ValidAfter = uint64(now().Truncate(time.Second).Unix())
|
||||||
}
|
}
|
||||||
if cert.ValidBefore == 0 {
|
if cert.ValidBefore == 0 {
|
||||||
t := time.Unix(int64(cert.ValidAfter), 0)
|
t := time.Unix(int64(cert.ValidAfter), 0)
|
||||||
|
|
Loading…
Reference in a new issue