-
-
Notifications
You must be signed in to change notification settings - Fork 316
Open
Description
What version of the package are you using?
v0.25.0
What are you trying to do?
Don't have misleading OCSP stapling logs.
While an attempt to fix it was taken in #353, it still did not catch all places where logs are produced.
What steps did you take?
Have OCSP enabled, with no actual errors produced.
What did you expect to happen, and what actually happened instead?
Expectation: No warning logs.
Reality: Tons of warning logs, with actually a nil error.
How do you think this should be fixed?
While this issue was correctly fixed here:
Lines 349 to 356 in 20b57b0
| err = stapleOCSP(ctx, cfg.OCSP, cfg.Storage, &cert, nil) | |
| if err != nil { | |
| if errors.Is(err, ErrNoOCSPServerSpecified) { | |
| cfg.Logger.Debug("stapling OCSP", zap.Error(err)) | |
| } else { | |
| cfg.Logger.Warn("stapling OCSP", zap.Error(err)) | |
| } | |
| } |
... this part still does a warning log even though the error is nil:
Lines 435 to 440 in 20b57b0
| err = stapleOCSP(ctx, cfg.OCSP, cfg.Storage, &cert, certPEMBlock) | |
| if errors.Is(err, ErrNoOCSPServerSpecified) { | |
| cfg.Logger.Debug("stapling OCSP", zap.Error(err), zap.Strings("identifiers", cert.Names)) | |
| } else { | |
| cfg.Logger.Warn("stapling OCSP", zap.Error(err), zap.Strings("identifiers", cert.Names)) | |
| } |
... and should rather look sth like this:
err = stapleOCSP(ctx, cfg.OCSP, cfg.Storage, &cert, certPEMBlock)
if errors.Is(err, ErrNoOCSPServerSpecified) {
cfg.Logger.Debug("stapling OCSP", zap.Error(err), zap.Strings("identifiers", cert.Names))
} else if err != nil {
cfg.Logger.Warn("stapling OCSP", zap.Error(err), zap.Strings("identifiers", cert.Names))
}Please link to any related issues, pull requests, and/or discussion
Metadata
Metadata
Assignees
Labels
No labels