@@ -19,6 +19,7 @@ import (
1919 "crypto/tls"
2020 "crypto/x509"
2121 "encoding/json"
22+ "errors"
2223 "fmt"
2324 "math/rand"
2425 "net"
@@ -346,7 +347,11 @@ func (cfg *Config) CacheUnmanagedTLSCertificate(ctx context.Context, tlsCert tls
346347 }
347348 err = stapleOCSP (ctx , cfg .OCSP , cfg .Storage , & cert , nil )
348349 if err != nil {
349- cfg .Logger .Warn ("stapling OCSP" , zap .Error (err ))
350+ if errors .Is (err , ErrNoOCSPServerSpecified ) {
351+ cfg .Logger .Debug ("stapling OCSP" , zap .Error (err ))
352+ } else {
353+ cfg .Logger .Warn ("stapling OCSP" , zap .Error (err ))
354+ }
350355 }
351356 cfg .emit (ctx , "cached_unmanaged_cert" , map [string ]any {"sans" : cert .Names })
352357 cert .Tags = tags
@@ -394,7 +399,9 @@ func (cfg Config) makeCertificateWithOCSP(ctx context.Context, certPEMBlock, key
394399 return cert , err
395400 }
396401 err = stapleOCSP (ctx , cfg .OCSP , cfg .Storage , & cert , certPEMBlock )
397- if err != nil {
402+ if errors .Is (err , ErrNoOCSPServerSpecified ) {
403+ cfg .Logger .Debug ("stapling OCSP" , zap .Error (err ), zap .Strings ("identifiers" , cert .Names ))
404+ } else {
398405 cfg .Logger .Warn ("stapling OCSP" , zap .Error (err ), zap .Strings ("identifiers" , cert .Names ))
399406 }
400407 return cert , nil
0 commit comments