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

Method marshal

handshake_messages.go:1472–1488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1470}
1471
1472func (m *certificateStatusMsg) marshal() []byte {
1473 if m.raw != nil {
1474 return m.raw
1475 }
1476
1477 var b cryptobyte.Builder
1478 b.AddUint8(typeCertificateStatus)
1479 b.AddUint24LengthPrefixed(func(b *cryptobyte.Builder) {
1480 b.AddUint8(statusTypeOCSP)
1481 b.AddUint24LengthPrefixed(func(b *cryptobyte.Builder) {
1482 b.AddBytes(m.response)
1483 })
1484 })
1485
1486 m.raw = b.BytesOrPanic()
1487 return m.raw
1488}
1489
1490func (m *certificateStatusMsg) unmarshal(data []byte) bool {
1491 m.raw = data

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected