MCPcopy Index your code
hub / github.com/XTLS/REALITY / transcriptMsg

Function transcriptMsg

handshake_messages.go:1939–1953  ·  view source on GitHub ↗

transcriptMsg is a helper used to hash messages which are not hashed when they are read from, or written to, the wire. This is typically the case for messages which are either not sent, or need to be hashed out of order from when they are read/written. For most messages, the message is marshalled u

(msg handshakeMessage, h transcriptHash)

Source from the content-addressed store, hash-verified

1937// extension ordering and other malleable fields, which may cause differences
1938// between what was received and what we marshal.
1939func transcriptMsg(msg handshakeMessage, h transcriptHash) error {
1940 if msgWithOrig, ok := msg.(handshakeMessageWithOriginalBytes); ok {
1941 if orig := msgWithOrig.originalBytes(); orig != nil {
1942 h.Write(msgWithOrig.originalBytes())
1943 return nil
1944 }
1945 }
1946
1947 data, err := msg.marshal()
1948 if err != nil {
1949 return err
1950 }
1951 h.Write(data)
1952 return nil
1953}

Callers 15

clientHandshakeMethod · 0.85
handshakeMethod · 0.85
readFinishedMethod · 0.85
handshakeMethod · 0.85
readServerCertificateMethod · 0.85
readServerFinishedMethod · 0.85
checkForResumptionMethod · 0.85
doHelloRetryRequestMethod · 0.85
sendServerParametersMethod · 0.85
sendSessionTicketsMethod · 0.85
readClientCertificateMethod · 0.85

Calls 3

originalBytesMethod · 0.65
WriteMethod · 0.65
marshalMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…