fix: S3 backups to Backblaze B2 us-west-000 failing the TLS handshake #36
Loading…
Reference in a new issue
No description provided.
Delete branch "fix-s3-tls-hrr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Backups to Backblaze B2's
us-west-000S3 endpoint fail withTLS client: In state hello_retry_middlebox_assert … Unexpected Message {server_hello …}.Cause: OTP 29 leads TLS 1.3 with the post-quantum
x25519mlkem768key share. B2's us-west-000 doesn't support it, so it answers with a HelloRetryRequest forx25519, and then sends its ServerHello without the dummy ChangeCipherSpec that OTP's middlebox-compatibility mode waits for. Other B2 regions (us-west-001/002/004, us-east-005, eu-central-003, ca-east-006) don't hit it. It isn't the IP pinning: a plainReq.getby hostname fails the same way.Fix: S3 connections offer
x25519first (Storage.S3.tls_options/0), so no retry is needed; every other group, post-quantum ones included, is still offered after it.Checked live against
s3.us-west-000.backblazeb2.com: before,Storage.checkfails with the TLS error; after, 4/4 reach B2 (which rejects the fake key with a 403). Alternatives that also worked:middlebox_comp_mode: falseor TLS 1.2 only; offering x25519 first changes the least. 711 tests pass.