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

Method sendClientFinished

handshake_client_tls13.go:828–853  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

826}
827
828func (hs *clientHandshakeStateTLS13) sendClientFinished() error {
829 c := hs.c
830
831 finished := &finishedMsg{
832 verifyData: hs.suite.finishedHash(c.out.trafficSecret, hs.transcript),
833 }
834
835 if _, err := hs.c.writeHandshakeRecord(finished, hs.transcript); err != nil {
836 return err
837 }
838
839 c.out.setTrafficSecret(hs.suite, QUICEncryptionLevelApplication, hs.trafficSecret)
840
841 if !c.config.SessionTicketsDisabled && c.config.ClientSessionCache != nil {
842 c.resumptionSecret = hs.masterSecret.ResumptionMasterSecret(hs.transcript)
843 }
844
845 if c.quic != nil {
846 if c.hand.Len() != 0 {
847 c.sendAlert(alertUnexpectedMessage)
848 }
849 c.quicSetWriteSecret(QUICEncryptionLevelApplication, hs.suite.id, hs.trafficSecret)
850 }
851
852 return nil
853}
854
855func (c *Conn) handleNewSessionTicket(msg *newSessionTicketMsgTLS13) error {
856 if !c.isClient {

Callers 1

handshakeMethod · 0.95

Calls 6

finishedHashMethod · 0.80
writeHandshakeRecordMethod · 0.80
setTrafficSecretMethod · 0.80
sendAlertMethod · 0.80
quicSetWriteSecretMethod · 0.80

Tested by

no test coverage detected