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

E ext cert policy disallowed any policy qualifier refactor #732

Conversation

mtgag
Copy link
Contributor

@mtgag mtgag commented Jul 5, 2023

Lint e_ext_cert_policy_disallowed_any_policy_qualifier checks whether the CpsOID or UserNoticeOID policy qualifiers are present. It does not evaluate whether anyPolicy is present. In this implementation it is iterated over all policies, checked whether a policy is the anyPolicy and then checked whether the qualifiers for this policy are the allowed ones. The implementation is based on code snippets from v3/util/oid.go GetMappedPolicies function. Also the check applies does not only check whether the extension is present but also whether one of the policies is the anyPolicy, and has a small TODO for discussion whether to implement this as a utility function "HasAnyPolicyOID". Also new certificates have been issued to test the behaviour of the lint.

Copy link
Member

@christopher-henderson christopher-henderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...and has a small TODO for discussion whether to implement this as a utility function "HasAnyPolicyOID"

The code is indeed a little bit painful. But it is isolated. I think I'm okay merging this and then possibly taking a look at a cleanup on my own.

@christopher-henderson christopher-henderson merged commit 4d38bfe into zmap:master Jul 9, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants