Skip to content

Commit

Permalink
#491 concatenate tls records fragments : comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Jovis7 committed Jan 12, 2025
1 parent b0788ff commit 2bb6c70
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tlslistener/clienthelloconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,13 @@ func (rrc *clientHelloRecordingConn) Read(b []byte) (int, error) {
return rrc.activeReader.Read(b)
}

// This function concatenates TLS record fragments into a single record.
// The output is the concatenation of the payloads of the input records plus a header.
// The input data is expected to be one or multiple TLS records, each with the following format:
// - 1 byte: content type
// - 2 bytes: protocol version
// - 2 bytes: length of the payload
// - N bytes: payload
func concatenateTlsRecordsFragments(data []byte) []byte {
const headerLength = 5

Expand Down

0 comments on commit 2bb6c70

Please sign in to comment.