-
Notifications
You must be signed in to change notification settings - Fork 197
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
remove native-tls #2675
Merged
Merged
remove native-tls #2675
Changes from 19 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
06b9597
remove native-tls
82marbag 4b929fa
Remove conflicts
82marbag 4447ba7
Remove native_tls
82marbag 3f9f09e
Merge remote-tracking branch 'origin/main' into remove-nativetls
82marbag 9b39766
update tests
82marbag 5ed9944
cargo fmt
82marbag 1922e24
remove using-native-tls-instead test
82marbag d040b6a
remove test folder
82marbag 0b6cd74
address comments
82marbag 9e0923b
compiler error for native-tls
82marbag 1242954
add changelog entry
82marbag 7a7623d
Merge branch 'main' into remove-nativetls
82marbag 562a327
add changelog entry
82marbag bd19d33
update aws runtime feature
82marbag 5a482d6
update aws runtime feature
82marbag cc112f9
update runtime feature
82marbag 35afd88
remove native-tls from workflow
82marbag 0c4b92f
remove native-tls in ci
82marbag 5a2ee69
Merge branch 'main' into remove-nativetls
82marbag 6ec2697
Merge branch 'main' into remove-nativetls
82marbag 8107310
remove last native-tls references
82marbag File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,5 @@ members = [ | |
"s3control", | ||
"sts", | ||
"transcribestreaming", | ||
"using-native-tls-instead-of-rustls", | ||
"webassembly", | ||
] |
20 changes: 0 additions & 20 deletions
20
aws/sdk/integration-tests/using-native-tls-instead-of-rustls/Cargo.toml
This file was deleted.
Oops, something went wrong.
52 changes: 0 additions & 52 deletions
52
...sdk/integration-tests/using-native-tls-instead-of-rustls/tests/no-rustls-in-dependency.rs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
The Smithy client provides a default TLS connector, but a custom one can be plugged in. | ||
`rustls` is enabled with the feature flag `rustls`. | ||
|
||
The client had previously supported `native-tls`. You can use your custom connector like this. | ||
|
||
Create your connector: | ||
|
||
```rust | ||
/// A `hyper` connector that uses the `native-tls` crate for TLS. To use this in a smithy client, | ||
/// wrap it in a [hyper_ext::Adapter](crate::hyper_ext::Adapter). | ||
pub type NativeTls = hyper_tls::HttpsConnector<hyper::client::HttpConnector>; | ||
|
||
pub fn native_tls() -> NativeTls { | ||
let mut tls = hyper_tls::native_tls::TlsConnector::builder(); | ||
let tls = tls | ||
.min_protocol_version(Some(hyper_tls::native_tls::Protocol::Tlsv12)) | ||
.build() | ||
.unwrap_or_else(|e| panic!("Error while creating TLS connector: {}", e)); | ||
let mut http = hyper::client::HttpConnector::new(); | ||
http.enforce_http(false); | ||
hyper_tls::HttpsConnector::from((http, tls.into())) | ||
} | ||
``` | ||
|
||
Plug the connector in the client: | ||
```rust | ||
let mut builder = hyper::client::Builder::default(); | ||
builder.pool_max_idle_per_host(70); | ||
let connector = aws_smithy_client::erase::DynConnector::new( | ||
aws_smithy_client::hyper_ext::Adapter::builder() | ||
.hyper_builder(builder) | ||
.connector_settings(std::default::Default::default()) | ||
.build(native_tls()), | ||
); | ||
let raw_client = aws_smithy_client::builder::Builder::new() | ||
.connector(connector) | ||
.middleware_fn(...) | ||
.build_dyn(); | ||
``` |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
we can do it post merge, but we should also include guidance for SDK customers