sessionState returns a partially filled-out [SessionState] with information from the current connection.
()
| 296 | // sessionState returns a partially filled-out [SessionState] with information |
| 297 | // from the current connection. |
| 298 | func (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. |
no test coverage detected