Skip to content

Commit

Permalink
Remove OCSP debug log on reload (#4453)
Browse files Browse the repository at this point in the history
When reloading TLS we would always be logging the attempt to plug OCSP:

```
[42801] 2023/08/30 14:52:33.766638 [INF] Reloaded: authorization users
[42801] 2023/08/30 14:52:33.766648 [INF] Reloaded: accounts
[42801] 2023/08/30 14:52:33.766652 [INF] Reloaded: tls = enabled
[42801] 2023/08/30 14:52:33.766756 [DBG] Plugging TLS OCSP peer for [Client]
[42801] 2023/08/30 14:52:33.766763 [INF] Reloaded server configuration
```
  • Loading branch information
derekcollison committed Aug 30, 2023
2 parents 3be9e97 + 4109e42 commit 1de649a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/ocsp_peer.go
Expand Up @@ -139,13 +139,13 @@ func (s *Server) plugTLSOCSPPeer(config *tlsConfigKind) (*tls.Config, bool, erro
if config == nil || config.tlsConfig == nil {
return nil, false, errors.New(certidp.ErrUnableToPlugTLSEmptyConfig)
}
s.Debugf(certidp.DbgPlugTLSForKind, config.kind)
kind := config.kind
isSpoke := config.isLeafSpoke
tcOpts := config.tlsOpts
if tcOpts == nil || tcOpts.OCSPPeerConfig == nil || !tcOpts.OCSPPeerConfig.Verify {
return nil, false, nil
}
s.Debugf(certidp.DbgPlugTLSForKind, config.kind)
// peer is a tls client
if kind == kindStringMap[CLIENT] || (kind == kindStringMap[LEAF] && !isSpoke) {
if !tcOpts.Verify {
Expand Down

0 comments on commit 1de649a

Please sign in to comment.