Skip to content

Commit

Permalink
initca: Fill out NotBefore/NotAfter ts from the cert request
Browse files Browse the repository at this point in the history
This way users can pass these in so the csr and certificate end up with the
wanted dates.
  • Loading branch information
mmlb committed Jan 30, 2023
1 parent bdadff2 commit 5fd4c43
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion initca/initca.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,12 @@ func New(req *csr.CertificateRequest) (cert, csrPEM, key []byte, err error) {
return
}

signReq := signer.SignRequest{Hosts: req.Hosts, Request: string(csrPEM)}
signReq := signer.SignRequest{
Hosts: req.Hosts,
Request: string(csrPEM),
NotBefore: req.CA.NotBefore,
NotAfter: req.CA.NotAfter,
}
cert, err = s.Sign(signReq)

return
Expand Down

0 comments on commit 5fd4c43

Please sign in to comment.