Skip to content
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

[2.9] openssl_csr: handle missing basic constraint #73815

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -0,0 +1,3 @@
---
bugfixes:
- "openssl_csr - no longer fails when comparing CSR without basic constraint when ``basic_constraints`` is specified (https://github.com/ansible-collections/community.crypto/issues/179, https://github.com/ansible-collections/community.crypto/pull/180)."
6 changes: 3 additions & 3 deletions lib/ansible/modules/crypto/openssl_csr.py
Expand Up @@ -911,9 +911,9 @@ def _check_basicConstraints(extensions):
return False
# Check criticality
if self.basicConstraints:
if bc_ext.critical != self.basicConstraints_critical:
return False
return True
return bc_ext is not None and bc_ext.critical == self.basicConstraints_critical
else:
return bc_ext is None

def _check_ocspMustStaple(extensions):
try:
Expand Down