-
Notifications
You must be signed in to change notification settings - Fork 707
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
feat(bindings): Add hyper compatibility crate #4617
Conversation
6466946
to
9467c2b
Compare
Co-authored-by: James Mayclin <maycj@amazon.com>
9467c2b
to
977ca2b
Compare
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.
My default inclination, especially for public crates, is to be as generous as possible with the documentation. I think that's especially useful since we (s2n-tls maintainers) don't spent that much time in the HTTP domain.
Along those lines I think that we should generally have doc comments for essentially every public struct. "What is it, what does it do, and when is it used?" Are useful points to start with.
0f3f72a
to
fa479d9
Compare
fa479d9
to
9761fcb
Compare
e9a5c4d
to
3c76785
Compare
71135fc
to
c5f1bc4
Compare
c5f1bc4
to
989fd85
Compare
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 was getting link errors when building the new doc tests with AWS-LC-FIPS:
https://github.com/aws/s2n-tls/actions/runs/9646640129/job/26603549106?pr=4617
It seems like this is related to this issue: rust-lang/cargo#8531. AWS-LC works around this issue by disabling doc tests when testing FIPS, so I did this as well.
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'm happy with the way that this is looking. We'll probably end up slightly shifting things as development goes along, but this looks like a good foundation.
Edit: Actually forgot about my struct/bound comment. Would like that addressed before approving, but I don't see a way to revoke my approval, lol
b729f0b
to
c2c10f7
Compare
Co-authored-by: Lindsay Stewart <stewart.r.lindsay@gmail.com>
Resolved issues:
Part of #4618
Description of changes:
Adds a new s2n-tls-hyper crate to provide compatibility with hyper clients.
This crate makes it easier to use s2n-tls as the TLS provider in hyper by exposing an
HttpsConnector
struct that implementstower_service::Service
, allowing for it to be provided to the hyper client builder.This crate is based on similar crates that provide hyper compatibility to TLS implementations, such as to rustls, via hyper-rustls, and native-tls, via hyper-tls.
Call-outs:
MaybeHttpsStream
is currently definitely an https stream, but exists as an enum so it can later be configured to use TCP without TLS.HttpsConnector
Builder, but I intend to add at least one option to it later.Testing:
I added a simple get request test just to check that the
HttpsConnector
seems to be working, but I plan to add more sophisticated tests in another PR.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.