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

Method sendDummyChangeCipherSpec

handshake_client_tls13.go:165–173  ·  view source on GitHub ↗

sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility with middleboxes that didn't implement TLS correctly. See RFC 8446, Appendix D.4.

()

Source from the content-addressed store, hash-verified

163// sendDummyChangeCipherSpec sends a ChangeCipherSpec record for compatibility
164// with middleboxes that didn't implement TLS correctly. See RFC 8446, Appendix D.4.
165func (hs *clientHandshakeStateTLS13) sendDummyChangeCipherSpec() error {
166 if hs.sentDummyCCS {
167 return nil
168 }
169 hs.sentDummyCCS = true
170
171 _, err := hs.c.writeRecord(recordTypeChangeCipherSpec, []byte{1})
172 return err
173}
174
175// processHelloRetryRequest handles the HRR in hs.serverHello, modifies and
176// resends hs.hello, and reads the new ServerHello into hs.serverHello.

Callers 1

handshakeMethod · 0.95

Calls 1

writeRecordMethod · 0.80

Tested by

no test coverage detected