-
Notifications
You must be signed in to change notification settings - Fork 119
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(s2n-quic-rustls): parse multiple der certs #2177
Conversation
common/s2n-codec/Cargo.toml
Outdated
@@ -1,6 +1,6 @@ | |||
[package] | |||
name = "s2n-codec" | |||
version = "0.35.1" | |||
version = "0.36.0" |
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'd prefer to have a specific commit to bump, just so we can point the tag at that commit
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.
let certs = self | ||
.iter() | ||
.map(|cert| der::into_certificate(cert.to_vec())) | ||
.collect::<Result<Vec<_>, _>>()? | ||
.into_iter() | ||
.flatten() | ||
.collect(); |
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 wondering if this code would be clearer with a more imperative approach?
let certs = self | |
.iter() | |
.map(|cert| der::into_certificate(cert.to_vec())) | |
.collect::<Result<Vec<_>, _>>()? | |
.into_iter() | |
.flatten() | |
.collect(); | |
let mut certs = vec![]; | |
for der in self { | |
let der = der.into_certificate()?; | |
certs.extend(der.0); | |
} |
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.
yeah, much clearer!
Description of changes:
This adds support in rustls for parsing multiple der formatted certificates
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.