|
|
|
@ -168,11 +168,6 @@ func (c *Client) commandLoop(ctx context.Context) {
|
|
|
|
|
}
|
|
|
|
|
case <-fetchCRLTimer.C:
|
|
|
|
|
for _, crlInfo := range c.buildCRLInfo() {
|
|
|
|
|
announce, err := messages.BuildCommandAnnounce(messages.CmdFetchCRL)
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.logger.WithError(err).Error("could not build fetch CRL command announce")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var lastKnown []byte
|
|
|
|
|
|
|
|
|
|
if crlInfo.LastKnown != nil {
|
|
|
|
@ -180,7 +175,7 @@ func (c *Client) commandLoop(ctx context.Context) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c.commands <- &protocol.Command{
|
|
|
|
|
Announce: announce,
|
|
|
|
|
Announce: messages.BuildCommandAnnounce(messages.CmdFetchCRL),
|
|
|
|
|
Command: &messages.FetchCRLCommand{
|
|
|
|
|
IssuerID: crlInfo.Name,
|
|
|
|
|
LastKnownID: lastKnown,
|
|
|
|
@ -190,13 +185,8 @@ func (c *Client) commandLoop(ctx context.Context) {
|
|
|
|
|
|
|
|
|
|
fetchCRLTimer.Reset(c.config.FetchCRLInterval)
|
|
|
|
|
case <-healthTimer.C:
|
|
|
|
|
announce, err := messages.BuildCommandAnnounce(messages.CmdHealth)
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.logger.WithError(err).Error("could not build health command announce")
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
c.commands <- &protocol.Command{
|
|
|
|
|
Announce: announce,
|
|
|
|
|
Announce: messages.BuildCommandAnnounce(messages.CmdHealth),
|
|
|
|
|
Command: &messages.HealthCommand{},
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|