-
Notifications
You must be signed in to change notification settings - Fork 90
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
Fix crash in x509_crl when certificate issuer is specified #441
Conversation
@@ -689,9 +689,7 @@ def _generate_crl(self): | |||
revoked_cert = revoked_cert.revocation_date(entry['revocation_date']) | |||
if entry['issuer'] is not None: | |||
revoked_cert = revoked_cert.add_extension( | |||
x509.CertificateIssuer([ | |||
cryptography_get_name(name, 'issuer') for name in entry['issuer'] |
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.
entry['issuer']
is already transformed in line 530.
- crl_3.revoked_certificates[0].issuer == [ | ||
"DNS:ca.example.org", | ||
] |
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 was surprised that this plain scalar worked multi-line without >
or >-
or something... I did find at least one yaml parser online that didn't like it: https://codebeautify.org/yaml-validator/y22bd59f9
But it appears that validator is wrong; and it clearly works in Ansible regardless, but you may want to change it if only for consistency with the other asserts in the file.
Or not 🤷
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.
According to the YAML definition this should be fine: https://yaml.org/spec/1.2.2/#plain-style
I'd probably rather remove the >
from the other blocks in this file (but not in this PR) :)
@briantist thanks for reviewing this! |
Backport to stable-1: 💔 cherry-picking failed — conflicts found❌ Failed to cleanly apply 9d03178 on top of patchback/backports/stable-1/9d03178b003ac3145f0af0c18c21ffca4992305c/pr-441 Backporting merged PR #441 into main
🤖 @patchback |
…ollections#441) * Fix x509_crl certificate issuer issue. * Add tests. * Add changelog fragment. (cherry picked from commit 9d03178)
SUMMARY
Found this while working on #436.
ISSUE TYPE
COMPONENT NAME
x509_crl