Skip to content

fix: set secure SSL defaults for OTP 26+#123

Merged
tsloughter merged 1 commit intoerleans:mainfrom
Taure:fix/ssl-defaults-otp26
Mar 16, 2026
Merged

fix: set secure SSL defaults for OTP 26+#123
tsloughter merged 1 commit intoerleans:mainfrom
Taure:fix/ssl-defaults-otp26

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented Mar 13, 2026

Summary

  • When ssl => true but no ssl_options provided, default to secure settings:
    • {verify, verify_peer}
    • {cacerts, public_key:cacerts_get()} (system CA store)
    • {server_name_indication, Host}
    • {customize_hostname_check, [{match_fun, public_key:pkix_verify_hostname_match_fun(https)}]}
  • User-supplied ssl_options override any defaults, preserving backwards compatibility
  • Based on the proven approach from gleam_pgo

Closes #80

Test plan

  • All 54 CT tests pass (including existing SSL tests)
  • xref clean

When ssl_options is not provided, default to verify_peer with system
CA certificates via public_key:cacerts_get(), server name indication,
and hostname verification using pkix_verify_hostname_match_fun(https).

User-supplied ssl_options override any defaults, preserving backwards
compatibility.

Closes erleans#80
@tsloughter tsloughter merged commit 9eef59c into erleans:main Mar 16, 2026
4 checks passed
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.

Default SSL Options don't work in OTP-26+

2 participants