Add debug output for TLS cipher/version
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
DataHoarder 2022-06-10 11:38:45 +02:00
parent 55367393d5
commit 716333ea04
Signed by: DataHoarder
SSH key fingerprint: SHA256:OLTRf6Fl87G52SiR7sWLGNzlJt4WOX+tfI2yxo0z7xk

View file

@ -275,6 +275,9 @@ func handleQueryRequest(ctx httputils.RequestContext, identifier cid.Cid, extraA
case tls.VersionTLS13:
atomic.AddUint64(&globalStatistics.Tls.Version.Tls13, 1)
default:
if debugOutput {
log.Printf("Unknown TLS version %d", ctx.GetTLSVersion())
}
atomic.AddUint64(&globalStatistics.Tls.Version.Other, 1)
}
@ -302,6 +305,9 @@ func handleQueryRequest(ctx httputils.RequestContext, identifier cid.Cid, extraA
case tls.TLS_AES_256_GCM_SHA384:
atomic.AddUint64(&globalStatistics.Tls.Cipher.AES_256_GCM_SHA384, 1)
default:
if debugOutput {
log.Printf("Unknown TLS cipher %d", ctx.GetTLSCipher())
}
atomic.AddUint64(&globalStatistics.Tls.Cipher.Other, 1)
}