MCPcopy Create free account
hub / github.com/XTLS/Go / sessionState

Struct sessionState

ticket.go:22–33  ·  view source on GitHub ↗

sessionState contains the information that is serialized into a session ticket in order to later resume a connection.

Source from the content-addressed store, hash-verified

20// sessionState contains the information that is serialized into a session
21// ticket in order to later resume a connection.
22type sessionState struct {
23 vers uint16
24 cipherSuite uint16
25 createdAt uint64
26 masterSecret []byte // opaque master_secret<1..2^16-1>;
27 // struct { opaque certificate<1..2^24-1> } Certificate;
28 certificates [][]byte // Certificate certificate_list<0..2^24-1>;
29
30 // usedOldKey is true if the ticket from which this session came from
31 // was encrypted with an older key and thus should be refreshed.
32 usedOldKey bool
33}
34
35func (m *sessionState) marshal() []byte {
36 var b cryptobyte.Builder

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected