mirror of
https://github.com/mjl-/mox.git
synced 2025-07-14 07:34:36 +03:00
Use consistent lower-case names when logging tls version and ciphersuite
Less shouty than upper case names.
This commit is contained in:
@ -628,9 +628,10 @@ func (c *conn) xtlsHandshakeAndAuthenticate(conn net.Conn) {
|
||||
}
|
||||
}
|
||||
|
||||
version, ciphersuite := moxio.TLSInfo(cs)
|
||||
attrs := []slog.Attr{
|
||||
slog.Any("version", tlsVersion(cs.Version)),
|
||||
slog.String("ciphersuite", tls.CipherSuiteName(cs.CipherSuite)),
|
||||
slog.String("version", version),
|
||||
slog.String("ciphersuite", ciphersuite),
|
||||
slog.String("sni", cs.ServerName),
|
||||
slog.Bool("resumed", cs.DidResume),
|
||||
slog.Int("clientcerts", len(cs.PeerCertificates)),
|
||||
@ -644,12 +645,6 @@ func (c *conn) xtlsHandshakeAndAuthenticate(conn net.Conn) {
|
||||
c.log.Debug("tls handshake completed", attrs...)
|
||||
}
|
||||
|
||||
type tlsVersion uint16
|
||||
|
||||
func (v tlsVersion) String() string {
|
||||
return strings.ReplaceAll(strings.ToLower(tls.VersionName(uint16(v))), " ", "-")
|
||||
}
|
||||
|
||||
// completely reset connection state as if greeting has just been sent.
|
||||
// ../rfc/3207:210
|
||||
func (c *conn) reset() {
|
||||
|
Reference in New Issue
Block a user