-
Notifications
You must be signed in to change notification settings - Fork 114
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
cert: use key_identifier_method of issuer for AKI #262
Conversation
3b77545
to
40c3100
Compare
Previously when issuing a certificate with an authority key identifier (AKI) extension that's signed by an issuer certificate we had a small bug where we used the to-be-issued certificate's param's `key_identifier_method` to derive the key identifier of the issuing certificate to use for the issued certificate's AKI. Instead we should be using the issuer certificate's param's `key_identifier_method`, taking care to mind the pre-specified variant. We missed this with our unit testing of the pre-specified key identifier method because we only issued a self-signed test certificate, never issuing a certificate signed by the CA that has the customization. This commit fixes the bug and extends test coverage to prevent further regression.
40c3100
to
ed5446a
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.
Nice work! Maybe throw in a proactive version bump?
Also fixes the release date for 0.13.0.
Good call. Added one and proactively updated the changelog. I also double checked this was a regression (though I didn't bother digging up which commit was the breaker. (Edit: I think it was me in 30489d7)). Backporting the unit test from this branch to 0.12.1 shows it passing, just like described in 261. |
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.
Thanks for the quick fix ❤️
|
Thanks for publishing the fix 👍 |
Previously when issuing a certificate with an authority key identifier (AKI) extension that's signed by an issuer certificate we had a small bug where we used the to-be-issued certificate's param's
key_identifier_method
to derive the key identifier of the issuing certificate to use for the issued certificate's AKI. Instead we should be using the issuer certificate's param'skey_identifier_method
, taking care to mind the pre-specified variant.We missed this with our unit testing of the pre-specified key identifier method because we only issued a self-signed test certificate, never issuing a certificate signed by the CA that has the customization. We principally exercised that the subject key identifier (SKI) of the self-signed cert matched the pre-specified value, but never tested that an issued cert's AKI matches the pre-specified SKI of the issuer.
This branch fixes the bug and extends test coverage to prevent further regression.
Resolves #261