Skip to content

Commit

Permalink
Some more nit cleanups (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
CBonnell authored Jun 3, 2024
1 parent 5061fc9 commit e065096
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 17 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,12 @@ pkilint is built on several open source packages. In particular, these packages
| cryptography | Apache Software License; BSD License | The Python Cryptographic Authority and individual contributors | https://github.com/pyca/cryptography |
| fastapi | MIT License | Sebastián Ramírez | https://github.com/tiangolo/fastapi |
| iso3166 | MIT License | Mike Spindel | http://github.com/deactivated/python-iso3166 |
| iso4217 | Public Domain | Hong Minhee | https://github.com/dahlia/iso4217 |
| publicsuffixlist | Mozilla Public License 2.0 (MPL 2.0) | ko-zu | https://github.com/ko-zu/psl |
| pyasn1 | BSD License | Christian Heimes and Simon Pichugin | https://github.com/pyasn1/pyasn1 |
| pyasn1-alt-modules | BSD License | Russ Housley | https://github.com/russhousley/pyasn1-alt-modules |
| python-dateutil | Apache Software License; BSD License | Gustavo Niemeyer | https://github.com/dateutil/dateutil |
| python-iso639 | Apache Software License | Jackson L. Lee | https://github.com/jacksonllee/iso639 |
| validators | MIT License | Konsta Vesterinen | https://github.com/kvesteri/validators |
| iso4217 | Public Domain | Hong Minhee | https://github.com/dahlia/iso4217 |
The pkilint maintainers are grateful to the authors of these open source contributions.
10 changes: 0 additions & 10 deletions pkilint/etsi/asn1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,3 @@
rfc3739.id_qcs_pkixQCSyntax_v1: document.OptionalAsn1TypeWrapper(rfc3739.SemanticsInformation()),
rfc3739.id_qcs_pkixQCSyntax_v2: document.OptionalAsn1TypeWrapper(rfc3739.SemanticsInformation()),
}

ETSI_CERTIFICATE_TYPE_POLICY_OIDS = {
en_319_411_2.id_qcp_natural,
en_319_411_2.id_qcp_legal,
en_319_411_2.id_qcp_natural_qscd,
en_319_411_2.id_qcp_legal_qscd,
en_319_411_2.id_qcp_web,
en_319_411_2.id_qncp_web,
en_319_411_2.id_qncp_web_gen,
}
10 changes: 10 additions & 0 deletions pkilint/etsi/asn1/en_319_411_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@
id_qncp_web = _ARC + (5,)

id_qncp_web_gen = _ARC + (6,)

QUALIFIED_POLICY_OIDS = {
id_qcp_natural,
id_qcp_legal,
id_qcp_natural_qscd,
id_qcp_legal_qscd,
id_qcp_web,
id_qncp_web,
id_qncp_web_gen,
}
4 changes: 0 additions & 4 deletions pkilint/etsi/asn1/ts_119_431_1.py

This file was deleted.

3 changes: 2 additions & 1 deletion pkilint/etsi/en_319_412_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pyasn1.type import univ
from pyasn1_alt_modules import rfc5280, rfc3739

import pkilint.etsi.asn1.en_319_411_2
from pkilint import validation, oid, document, common
from pkilint.etsi import asn1 as etsi_asn1, etsi_shared
from pkilint.etsi import etsi_constants
Expand Down Expand Up @@ -433,7 +434,7 @@ def _get_recommended_policy_oid_for_certificate_type(self) -> typing.Optional[un
def validate(self, node):
policy_oids = node.document.policy_oids

certificate_type_policy_oids = policy_oids & etsi_asn1.ETSI_CERTIFICATE_TYPE_POLICY_OIDS
certificate_type_policy_oids = policy_oids & pkilint.etsi.asn1.en_319_411_2.QUALIFIED_POLICY_OIDS

if len(certificate_type_policy_oids) > 1:
oids = oid.format_oids(certificate_type_policy_oids)
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,3 @@ console_scripts =
lint_cabf_smime_cert = pkilint.bin.lint_cabf_smime_cert:main
lint_ocsp_response = pkilint.bin.lint_ocsp_response:main
lint_etsi_cert = pkilint.bin.lint_etsi_cert:main

0 comments on commit e065096

Please sign in to comment.