Skip to content

Add rustls_ring feature flag to support WSS on native #54

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

c-git
Copy link
Collaborator

@c-git c-git commented Dec 30, 2024

@c-git c-git marked this pull request as draft January 2, 2025 04:47
@c-git
Copy link
Collaborator Author

c-git commented Jan 2, 2025

I'm was looking over my comment and found the error message looked wrong. It was wrong. I used https instead of wss. https still works correctly in the browser but not native. I commented out the code you referenced above and... it still worked. So I went back to main and tried again and... it's back to not working on native (the browser still works). It panics on with the following message on native:

thread 'ewebsock' panicked at /home/one/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rustls-0.23.7/src/cr
 ypto/mod.rs:260:14:
 no process-level CryptoProvider available -- call CryptoProvider::install_default() before this point
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I honestly don't really understand but it seems I only need to bring in the dependency and that's sufficient for it to work so that's easy and I just put it directly into ewebsocket behind a feature flag and added a note to the documentation.

I also added documentation for the tls feature to the best of my ability, not sure if it had been intentionally not documented.

Let me know if you want me to squash the commits. I should also mention that there is another provider but I didn't try that one as it sounded more complicated in their docs.

@c-git c-git marked this pull request as ready for review January 2, 2025 06:00
@emilk emilk added the include in changelog Include this in CHANGELOG.md label Jan 7, 2025
@emilk emilk changed the title feat: add support WSS Add rustls_ring feature flag to support WSS on native Jan 7, 2025
@c-git
Copy link
Collaborator Author

c-git commented Feb 24, 2025

Given the recent news related to ring (RUSTSEC-2025-0007). I think it makes sense to change the feature to use a different provider.

@c-git
Copy link
Collaborator Author

c-git commented Feb 24, 2025

Will try to update once I get a chance but can't find how to set the pr to draft on the mobile client in the meantime.

PR Set to draft.

@c-git c-git marked this pull request as draft February 26, 2025 20:39
@c-git
Copy link
Collaborator Author

c-git commented Mar 18, 2025

The advisory has been withdrawn and others have stepped up to help.

@c-git c-git marked this pull request as ready for review March 18, 2025 22:45
@c-git
Copy link
Collaborator Author

c-git commented Jul 1, 2025

The following extract from cargo tree shows the duplicate versions causing CI to fail for cargo-deny

echo_server v0.1.0 (/workspaces/ewebsock/echo_server)
└── tungstenite v0.24.0
    └── rustls-native-certs v0.7.3

ewebsock v0.8.0 (/workspaces/ewebsock/ewebsock)
└── tokio-tungstenite v0.24.0
    └── rustls-native-certs v0.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog Include this in CHANGELOG.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TLS not supported when tokio feature is enabled
2 participants