| ... | ... | @@ -257,7 +257,7 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In |
| 257 | 257 | if (handshake_type != .server_hello) return error.TlsUnexpectedMessage; |
| 258 | 258 | const length = ptd.decode(u24); |
| 259 | 259 | var hsd = try ptd.sub(length); |
| 260 | | try hsd.ensure(2 + 32 + 1 + 32 + 2 + 1); |
| 260 | try hsd.ensure(2 + 32 + 1); |
| 261 | 261 | const legacy_version = hsd.decode(u16); |
| 262 | 262 | @memcpy(&server_hello_rand, hsd.array(32)); |
| 263 | 263 | if (mem.eql(u8, &server_hello_rand, &tls.hello_retry_request_sequence)) { |
| ... | ... | @@ -266,8 +266,8 @@ pub fn init(stream: anytype, ca_bundle: Certificate.Bundle, host: []const u8) In |
| 266 | 266 | return error.TlsUnexpectedMessage; |
| 267 | 267 | } |
| 268 | 268 | const legacy_session_id_echo_len = hsd.decode(u8); |
| 269 | | if (legacy_session_id_echo_len != 32) return error.TlsIllegalParameter; |
| 270 | | const legacy_session_id_echo = hsd.array(32); |
| 269 | try hsd.ensure(legacy_session_id_echo_len + 2 + 1); |
| 270 | const legacy_session_id_echo = hsd.slice(legacy_session_id_echo_len); |
| 271 | 271 | cipher_suite_tag = hsd.decode(tls.CipherSuite); |
| 272 | 272 | hsd.skip(1); // legacy_compression_method |
| 273 | 273 | var supported_version: ?u16 = null; |