-
Notifications
You must be signed in to change notification settings - Fork 128
Allow choose different crypto backend dynamically #2446
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
Comments
Hi WeiChao! Can you provide more context on why you need this functionality? |
For different domain, apply use Config. use different TLS backend in this issue.
s2n current design
So we can only choose one of tls backend, s2n-tls or rustls at compile time. Quinn solve this through dyn trait. |
Thanks WeiChao. This specialized behavior isn't something that we would support in the main s2n-quic library. Fortunately, the At a high level, implementing this functionality would look something like the following: You would create a |
Wow, maybe a workaround, I will give a try. thankyou |
Here are s2n bootstrap code, How I replace let tls = s2n_quic::provider::tls::s2n_tls::Server::builder()
.with_client_hello_handler(callback)
.unwrap()
.build()
.unwrap();
let io = IoBuilder::default()
.with_rx_socket(socket)
.unwrap()
.build()
.unwrap();
let mut server = Server::builder()
.with_tls(tls)
.unwrap()
.with_io(io)
.unwrap()
.start()
.unwrap(); |
Hello Weichao, we are resolving this issue, since we are not implementing this in s2n-quic. Feel free to open another issue if you have any more questions. |
Problem:
background
we have ssl_backend "s2n/rustls" directive to choose ssl crypto impl for different domain
Current, s2n-quic support rustls/aws-lc-rs, but enable by feature
s2n-quic/quic/s2n-quic/src/provider/tls.rs
Line 24 in ac52a48
which means we can only choose use rustls or aws-lc as compile time.
Solution:
crypto backend should put in Config, to allow use different crypto backend by change Config.
Here are how quinn does. put crypto trait into Config, so we can choose backend by switch Config.
https://github.com/quinn-rs/quinn/blob/6bfd24861e65649a7b00a9a8345273fe1d853a90/quinn-proto/src/endpoint.rs#L611
The text was updated successfully, but these errors were encountered: