MCPcopy Create free account
hub / github.com/SenseUnit/dumbproxy / GetTLSSessionID

Function GetTLSSessionID

tlsutil/session.go:53–64  ·  view source on GitHub ↗
(conn net.Conn)

Source from the content-addressed store, hash-verified

51}
52
53func GetTLSSessionID(conn net.Conn) (TLSSessionID, bool) {
54 tagger, ok := conn.(ConnTagger)
55 if !ok {
56 if netconner, ok := conn.(interface {
57 NetConn() net.Conn
58 }); ok {
59 return GetTLSSessionID(netconner.NetConn())
60 }
61 return TLSSessionID{}, false
62 }
63 return getTLSSessionID(tagger)
64}
65
66func TLSSessionIDToContext(ctx context.Context, conn net.Conn) context.Context {
67 return context.WithValue(ctx, connKey{}, conn)

Callers 1

TLSSessionIDFromContextFunction · 0.85

Calls 1

getTLSSessionIDFunction · 0.85

Tested by

no test coverage detected