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

Function TLSSessionIDFromState

tlsutil/session.go:23–35  ·  view source on GitHub ↗
(ss *tls.SessionState)

Source from the content-addressed store, hash-verified

21}
22
23func TLSSessionIDFromState(ss *tls.SessionState) (TLSSessionID, bool) {
24 for _, tag := range ss.Extra {
25 if !bytes.HasPrefix(tag, []byte(tlsCookiePrefix)) {
26 continue
27 }
28 tag = tag[len(tlsCookiePrefix):]
29 if len(tag) != len(TLSSessionID{}) {
30 continue
31 }
32 return TLSSessionID(tag), true
33 }
34 return TLSSessionID{}, false
35}
36
37type tlsSessionIDKey struct{}
38type connKey struct{}

Callers 1

EnableTLSCookiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected