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

Method sendClientFinished

handshake_client_tls13.go:612–632  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

610}
611
612func (hs *clientHandshakeStateTLS13) sendClientFinished() error {
613 c := hs.c
614
615 finished := &finishedMsg{
616 verifyData: hs.suite.finishedHash(c.out.trafficSecret, hs.transcript),
617 }
618
619 hs.transcript.Write(finished.marshal())
620 if _, err := c.writeRecord(recordTypeHandshake, finished.marshal()); err != nil {
621 return err
622 }
623
624 c.out.setTrafficSecret(hs.suite, hs.trafficSecret)
625
626 if !c.config.SessionTicketsDisabled && c.config.ClientSessionCache != nil {
627 c.resumptionSecret = hs.suite.deriveSecret(hs.masterSecret,
628 resumptionLabel, hs.transcript)
629 }
630
631 return nil
632}
633
634func (c *Conn) handleNewSessionTicket(msg *newSessionTicketMsgTLS13) error {
635 if !c.isClient {

Callers 1

handshakeMethod · 0.95

Calls 6

marshalMethod · 0.95
finishedHashMethod · 0.80
writeRecordMethod · 0.80
setTrafficSecretMethod · 0.80
deriveSecretMethod · 0.80
WriteMethod · 0.45

Tested by

no test coverage detected