Skip to content

fix: select crypto provider (#903)#906

Open
hello-world-bfree wants to merge 2 commits intoRightNow-AI:mainfrom
hello-world-bfree:fix/select-crypto-provider
Open

fix: select crypto provider (#903)#906
hello-world-bfree wants to merge 2 commits intoRightNow-AI:mainfrom
hello-world-bfree:fix/select-crypto-provider

Conversation

@hello-world-bfree
Copy link
Copy Markdown

@hello-world-bfree hello-world-bfree commented Mar 29, 2026

Summary

Install the rustls CryptoProvider (ring) at kernel boot to fix a panic when channel adapters (e.g. Discord) open TLS connections. Rustls 0.23+ can't auto-select a provider when both ring and aws-lc-rs are in the dependency tree. Resolves #903

Note

There's also an issue with the Discord Gateway protocol. At the moment the client does not send a heartbeat. This adds that in.

Changes

  • Added rustls (with ring feature) as a workspace dependency - Added rustls to openfang-kernel crate - Call install_default() as the first line of boot_with_config(), before any reqwest::Client construction

Testing

  • cargo clippy --workspace --all-targets -- -D warnings passes
  • cargo test --workspace passes
  • Live integration tested (if applicable)

Security

  • No new unsafe code
  • No secrets or API keys in diff
  • User input validated at boundaries

@hello-world-bfree hello-world-bfree changed the title fix: select crypto provider fix: select crypto provider (#903) Mar 29, 2026
@jaberjaber23
Copy link
Copy Markdown
Member

Reviewed. Two issues: (1) The Discord heartbeat fix is unrelated to the crypto provider fix. Split into two PRs. (2) The install_default() Result is silently discarded with let _ =. At minimum add a debug log.

@hello-world-bfree hello-world-bfree force-pushed the fix/select-crypto-provider branch from 4d3cb78 to 3ebd282 Compare March 31, 2026 01:54
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.

rustls 0.23 CryptoProvider panic on Mattermost wss:// connection

2 participants