MCPcopy
hub / github.com/XTLS/REALITY / sessionState

Method sessionState

ticket.go:298–312  ·  view source on GitHub ↗

sessionState returns a partially filled-out [SessionState] with information from the current connection.

()

Source from the content-addressed store, hash-verified

296// sessionState returns a partially filled-out [SessionState] with information
297// from the current connection.
298func (c *Conn) sessionState() *SessionState {
299 return &SessionState{
300 version: c.vers,
301 cipherSuite: c.cipherSuite,
302 createdAt: uint64(c.config.time().Unix()),
303 alpnProtocol: c.clientProtocol,
304 peerCertificates: c.peerCertificates,
305 ocspResponse: c.ocspResponse,
306 scts: c.scts,
307 isClient: c.isClient,
308 extMasterSecret: c.extMasterSecret,
309 verifiedChains: c.verifiedChains,
310 curveID: c.curveID,
311 }
312}
313
314// EncryptTicket encrypts a ticket with the [Config]'s configured (or default)
315// session ticket keys. It can be used as a [Config.WrapSession] implementation.

Callers 4

sendSessionTicketMethod · 0.95
saveSessionTicketMethod · 0.80
sendSessionTicketMethod · 0.80

Calls 1

timeMethod · 0.80

Tested by

no test coverage detected