-
-
Notifications
You must be signed in to change notification settings - Fork 54
Upgraded rustls ecosystem to rustls 0.22 #1312
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
Conversation
ba74937
to
f7b0cbf
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1312 +/- ##
==========================================
+ Coverage 83.06% 83.08% +0.01%
==========================================
Files 61 61
Lines 18123 18103 -20
==========================================
- Hits 15053 15040 -13
+ Misses 3070 3063 -7 ☔ View full report in Codecov by Sentry. |
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.
👋. As I was checking out the project I stumbled on this PR and found a rustls-pemfile
v2 abstraction you could use to avoid having to match on the certificate type.
nts-pool-ke/src/lib.rs
Outdated
@@ -572,14 +568,14 @@ async fn supported_algorithms_request( | |||
|
|||
fn private_key_from_bufread( | |||
mut reader: impl BufRead, | |||
) -> std::io::Result<Option<rustls::PrivateKey>> { | |||
) -> std::io::Result<Option<rustls::pki_types::PrivateKeyDer<'static>>> { | |||
use rustls_pemfile::Item; | |||
|
|||
loop { | |||
match rustls_pemfile::read_one(&mut reader)? { |
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.
It should be possible to replace this manual match
implementation with rustls_pemfile::private_key
ntpd/src/daemon/keyexchange.rs
Outdated
loop { | ||
match rustls_pemfile::read_one(&mut reader)? { | ||
Some(Item::RSAKey(key)) => return Ok(Some(rustls::PrivateKey(key))), | ||
Some(Item::PKCS8Key(key)) => return Ok(Some(rustls::PrivateKey(key))), | ||
Some(Item::ECKey(key)) => return Ok(Some(rustls::PrivateKey(key))), | ||
Some(Item::Pkcs1Key(key)) => return Ok(Some(key.into())), | ||
Some(Item::Pkcs8Key(key)) => return Ok(Some(key.into())), | ||
Some(Item::Sec1Key(key)) => return Ok(Some(key.into())), | ||
None => break, | ||
_ => {} | ||
} |
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.
Same here
f7b0cbf
to
565d21c
Compare
Thank you for the suggestion, I have incorporated it in the current version. |
@plugwash in what time frame would this upgrade work for debian packaging, given the fact that the new rustls version isn't backwards compatible? |
@sylvestre @plugwash Should we wait with merging this for a while or is this upgrade not going to be a problem within debian? |
Don't worry too much about us, we can always revert stuff until we are ready. |
565d21c
to
3dcbeff
Compare
No description provided.