Fix linter issues

This commit is contained in:
Herman Slatman
2025-02-18 11:04:54 +01:00
parent 86c04f0ce8
commit 27944b4eae
33 changed files with 308 additions and 112 deletions

View File

@@ -20,6 +20,7 @@ import (
"github.com/smallstep/certificates/authority/config"
"github.com/smallstep/certificates/authority/provisioner"
"github.com/smallstep/certificates/errs"
"github.com/smallstep/certificates/internal/cast"
"github.com/smallstep/certificates/templates"
)
@@ -331,8 +332,8 @@ func SSHSign(w http.ResponseWriter, r *http.Request) {
// Enforce the same duration as ssh certificate.
signOpts = append(signOpts, &identityModifier{
Identity: getIdentityURI(cr),
NotBefore: time.Unix(int64(cert.ValidAfter), 0),
NotAfter: time.Unix(int64(cert.ValidBefore), 0),
NotBefore: time.Unix(cast.Int64(cert.ValidAfter), 0),
NotAfter: time.Unix(cast.Int64(cert.ValidBefore), 0),
})
certChain, err := a.SignWithContext(ctx, cr, provisioner.SignOptions{}, signOpts...)