parseClientHelloBody function
Implementation
ClientHello parseClientHelloBody(QuicBuffer buffer) {
final start = buffer.readOffset;
final body = buffer.pullBytes(buffer.remaining);
final ch = ClientHello.parse_tls_client_hello(body);
// rawData should be exact body bytes
return ClientHello(
type: 'client_hello',
legacyVersion: ch.legacyVersion,
random: ch.random,
sessionId: ch.sessionId,
cipherSuites: ch.cipherSuites,
compressionMethods: ch.compressionMethods,
extensions: ch.extensions,
rawData: buffer.data.sublist(start, start + body.length),
sni: ch.sni,
keyShares: ch.keyShares,
supportedVersions: ch.supportedVersions,
supportedGroups: ch.supportedGroups,
signatureAlgorithms: ch.signatureAlgorithms,
alpn: ch.alpn,
maxFragmentLength: ch.maxFragmentLength,
padding: ch.padding,
cookie: ch.cookie,
pskKeyExchangeModes: ch.pskKeyExchangeModes,
preSharedKey: ch.preSharedKey,
renegotiationInfo: ch.renegotiationInfo,
quicTransportParametersRaw: ch.quicTransportParametersRaw,
);
}