TLSNextProto: make(map[string]func(string, *tls.Conn) http.RoundTripper),
DialTLSContext: dialTLS,
}
+ sessionCache = tls.NewLRUClientSessionCache(1024)
CmdDWebP = "dwebp"
CmdDJXL = "djxl"
) error {
return verifyCert(host, nil, rawCerts, verifiedChains)
},
+ ClientSessionCache: sessionCache,
}
conn, dialErr := tls.Dial(network, addr, &cfg)
if dialErr != nil {
}
}
connState := conn.ConnectionState()
- sinkTLS <- fmt.Sprintf(
+ msg := fmt.Sprintf(
"%s\t%s %s\t%s",
strings.TrimSuffix(addr, ":443"),
ucspi.TLSVersion(connState.Version),
tls.CipherSuiteName(connState.CipherSuite),
spkiHash(connState.PeerCertificates[0]),
)
+ if connState.DidResume {
+ msg += "\tresumed"
+ }
+ sinkTLS <- msg
return conn, nil
}