Skip to content

[proposal] pass through tls_versions to underlying adapter - #50

Merged
zachdaniel merged 1 commit into
ash-project:mainfrom
drspin:fix/tls_versions_opts
Aug 20, 2026
Merged

[proposal] pass through tls_versions to underlying adapter#50
zachdaniel merged 1 commit into
ash-project:mainfrom
drspin:fix/tls_versions_opts

Conversation

@drspin

@drspin drspin commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

I thought I'd cut a PR to get some thoughts on this. I'm not sure if I'm thinking about this in the right way. I am running into this when attaching assets (not sure what changed but this was working in the past). I'm using the Backblaze B2 service.

[warning] Description: ~c"Failed to assert middlebox server message"
     Reason: [missing: {:change_cipher_spec, 1}]
   Location: tls_client_connection_1_3.erl:350

[notice] TLS :client: In state :hello_retry_middlebox_assert at ssl_gen_statem.erl:761 generated CLIENT ALERT: Fatal - Unexpected Message
 - {:unexpected_msg,
 {:internal,
  {:server_hello, {3, 3}, ...<snip>

If I understand this correctly, this is caused by the tls middlebox compatibility mode.

This PR allow tls_versions ("tlsv1.2", "tlsv1.3") to be set and passed through to the underlying adapters - defaults to "tlsv1.2". Although, it feels a little strange having to pass in tls versions to the underlying adapter.

It works for me when patched with tlsv1.2 or when middlebox_comp_mode: false -- however, middlebox_comp_mode option break s3 integration tests and the tests complain that there is a :badarg

Other relevant information. System is

  • Erlang 29
  • Elixir 1.20.2-otp-29

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

allow tls_versions ("tlsv1.2", "tlsv1.3") to be set and passed through
to underlying adapter - defaults to "tlsv1.2" - this is to fix middlebox
compatibility mode issues.
@zachdaniel
zachdaniel merged commit fb919d3 into ash-project:main Aug 20, 2026
25 of 26 checks passed
@zachdaniel

Copy link
Copy Markdown
Contributor

🚀 Thank you for your contribution! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants