-
Notifications
You must be signed in to change notification settings - Fork 83
Add features for other tls types #497
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
base: main
Are you sure you want to change the base?
Add features for other tls types #497
Conversation
Turned out to be rather easy due to all tls being handled by our dependencies. Don't love the _fallback-tls feature, however with it we can use cargo-all-features, which helps reduce feature related bugs. Downside of cargo-all-features is it takes a long time to execute. Fixes: 1c3t3a#407, 1c3t3a#366
There's still an error with ci. engineio/src/lib.rs/test/tls_connector doesn't function the same as native-tls one (as it properly validates hostnames) Needs further investigation as to why the hostname shows as invalid in ci. If we no longer need that, then this PR can be merged.
Turned out to be rather easy due to all tls being handled by our dependencies. Don't love the _fallback-tls feature, however with it we can use cargo-all-features, which helps reduce feature related bugs. Downside of cargo-all-features is it takes a long time to execute. Fixes: 1c3t3a#407, 1c3t3a#366
There's still an error with ci. engineio/src/lib.rs/test/tls_connector doesn't function the same as native-tls one (as it properly validates hostnames) Needs further investigation as to why the hostname shows as invalid in ci. If we no longer need that, then this PR can be merged.
NXD-0: Update webpki due to vulnerabilities
…s-types' into tyler/feat-add-features-for-other-tls-types
.build() | ||
.unwrap(), | ||
) | ||
// .tls_config( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can remove this, since it isn't needed for the tests to pass.
@@ -42,9 +42,9 @@ impl AsyncWebsocketGeneralTransport { | |||
let mut sender = self.sender.lock().await; | |||
|
|||
sender | |||
.send(Message::text(Cow::Borrowed(from_utf8(&Bytes::from( | |||
.send(Message::text(Utf8Bytes::try_from(Bytes::from( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This and the other changes in this file are due to upgrading tungstenite. This avoids an extra allocation that was happening inside of the text call.
|
||
pub(crate) fn tls_connector() -> error::Result<TlsConnector> { | ||
pub fn tls_connector() -> error::Result<TlsConfig> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is exposed to the socketio crate for use in tests.
#[cfg_attr( | ||
feature = "_native-tls", | ||
doc = r#" | ||
# Example for native-tls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These look less appealing, but allows the docs build for all feature configurations
This is a continuation of #465 that was originally done by @ctrlaltf24.
My company has been using that branch with a few minor improvements. I just got the tests passing by changing how the certificates and keys are generated so that rustls will accept
localhost
in a secure connection.