-
Notifications
You must be signed in to change notification settings - Fork 65
bump rcgen to 0.14.2 #3733
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
bump rcgen to 0.14.2 #3733
Conversation
Recent versions of rcgen contain nice features, so I decided to bump the crate and fix all breaking changes first before our usage of it is expanded by the pkcs11 create key PR. Relevant features: - `0.13.0` - P521 support - only supports RSA PKCS#1 v1.5, which is vulnerable to [Marvin Attack](https://people.redhat.com/~hkario/marvin/), new versions of `rcgen` might have RSA PSS signatures added in the future - The API used to create/issue key pairs, certificates, certificate signing requests (CSRs), and certificate revocation lists (CRLs) has been restructured to emphasize consistency and avoid common errors with serialization. (better to fix breaking changes ASAP) - Support for using `aws-lc-rs` in `fips` mode - `0.13.1` - Several improvements to the capabilities available when working with certificate signing requests - Enable signing without private key - `0.14.0` - better remote signing API (`RemoteKeyPair` changed to `SigningKey`) Signed-off-by: Marcel Guzik <marcel.guzik@cumulocity.com>
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! 🚀 New features to boost your workflow:
|
Robot Results
|
pub struct KeyCertPair { | ||
certificate: rcgen::Certificate, | ||
// in rcgen 0.14 params are necessary to generate the CSR | ||
params: rcgen::CertificateParams, | ||
signing_key: SigningKeyWrapper, | ||
} |
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.
Just to confirm.
Previously, the certificate
was protected under Zeroizing
. Now this protection has been narrowed under the signing_key
in the case there is actually a private key in memory. This makes sense. However, can you confirm that, with version 0.14, rcgen::Certificate
no more contains data to zeroize on drop?
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.
Indeed, wrapping rcgen::Certificate
with Zeroizing<>
generates the following error:
error[E0277]: the trait bound `rcgen::Certificate: zeroize::DefaultIsZeroes` is not satisfied
--> crates/common/certificate/src/lib.rs:250:18
|
250 | certificate: Zeroizing<rcgen::Certificate>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `zeroize::DefaultIsZeroes` is not implemented for `rcgen::Certificate`
|
And in 0.14 only rcgen::KeyPair
implements Zeroize
, which makes sense because it's the only thing holding sensitive data.
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.
Approved
Proposed changes
Recent versions of
rcgen
contain nice features, so I decided to bump the crate and fix all breaking changes first before our usage of it is expanded by the pkcs11 create key PR.Relevant features:
0.13.0
aws-lc-rs
infips
mode0.13.1
0.14.0
RemoteKeyPair
changed toSigningKey
)Also we'd like to move from RSA PKCS#1 v1.5, which is vulnerable to Marvin Attack to RSA PSS signatures for signing the CSRs, which new versions of
rcgen
may add in the future.Types of changes
Paste Link to the issue
Checklist
just prepare-dev
once)just format
as mentioned in CODING_GUIDELINESjust check
as mentioned in CODING_GUIDELINESFurther comments