Repository navigation
Rescue x509_v2 fixes from 3006.x, part 1 - #70342
Merged
Merged
Conversation
x509_v2 fixes from 3006.xx509_v2 fixes from 3006.x, part 1
twangboy
previously approved these changes
Oct 1, 2026
3 tasks done
3 tasks done
`cryptography.hazmat.asn1` was introduced in cryptography 44.0 and the `Null`/`decode_der` helpers used here require >= 46. The salt-ssh target on Ubuntu 22.04 / Debian 12 uses the system python's cryptography, which is older and lacks the submodule entirely. Previously, this made `salt.utils.x509` fail to import on those targets, which cascaded into `salt.modules.x509_v2`'s `__virtual__` returning False with "Could not load cryptography" and the SSH integration tests failing with `'x509' __virtual__ returned False`. Guard the import behind try/except and gate the `otherName` paths that depend on it with a runtime check that raises a clear error.
twangboy
approved these changes
Oct 29, 2026
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
x509_v2#69894 to3008.x. Unsure why it's missing, it was merged forward in Merge forward 3007.x into 3008.x #70132. A similar fate seems to have befallen Fix handling of GeneralNames and basicConstraints in x509_v2 #70047 - also absent in3008.x(edit: rebase in Rescuex509_v2fixes from 3006.x, part 2 #70343).salt/utils/x509.py.x509_v2wrapper docstrings accordingly.What issues does this PR fix or reference?
Ref: #69955 and #69894
Merge requirements satisfied?
Commits signed with GPG?
Yes