Skip to content
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

Switch to add_parsable_certificates #114

Merged
merged 4 commits into from
Nov 12, 2024
Merged

Conversation

matthme
Copy link

@matthme matthme commented Nov 11, 2024

Should address holochain/holochain#4418

@matthme matthme changed the title Add fallback to bundled webpki certs if adding root cert fails Switch to add_parsable_certificates Nov 11, 2024
@matthme
Copy link
Author

matthme commented Nov 11, 2024

According to the documentation the add method is apparently known to fail for some certificates so I switched to the add_parsable_certificates method instead now.

@@ -31,8 +31,6 @@ tokio-tungstenite = { workspace = true }
tracing = { workspace = true }
tx5-core = { workspace = true }
url = { workspace = true }

[target.'cfg(not(any(target_os = "windows", target_os = "linux", target_os = "macos")))'.dependencies]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be platform specific in any way, but it looks like it was deliberately only included for platforms that won't have a certificate store. Now that we're successfully using the certificate store on windows and this isn't being used on the platforms it's been included for, should this be reverted?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this should be reverted. rustls_native_certs doesn't currently work on android or ios. (although it'd be nice if it did : )

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes, sorry. I added this with the initial approach where the certs would be bundled.

@ThetaSinner
Copy link
Member

Tested on Windows where this was crashing for me, confirmed that this solves the problem and I can still make connections

Copy link
Collaborator

@neonphog neonphog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@matthme matthme merged commit d5285ec into release-0.0.x Nov 12, 2024
7 checks passed
@matthme matthme deleted the fix/root-cert-fallback branch November 12, 2024 18:06
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.

3 participants