Errors in testing
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 115
- Forks
- 34
- PR merge metrics
- No merged PRs in 30d
Description
Hey!
I decided to keep your package in the Debian project. It is already under analysis. Soon it will be in the official distribution repositories.
As dependencies undergo constant updates, Debian uses "tests" as a verification tool to find out whether the codes have not been affected by any update.
And cetvalidator is showing errors in tests, both at build time and isolated with "pytest".
Below are the two records for investigation.
CONSTRUCTION TIME:
termediate) ... ok
test_openssl_ocsp_direct_with_intermediate_success (tests.test_validate.ValidateTests.test_openssl_ocsp_direct_with_intermediate_success) ... ok
test_revocation_mode_hard (tests.test_validate.ValidateTests.test_revocation_mode_hard) ... ERROR
test_revocation_mode_soft (tests.test_validate.ValidateTests.test_revocation_mode_soft) ... ERROR
======================================================================
ERROR: test_basic_certificate_validator_tls (tests.test_certificate_validator.CertificateValidatorTests.test_basic_certificate_validator_tls)
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/tests/test_certificate_validator.py", line 44, in test_basic_certificate_validator_tls
path = validator.validate_tls('codexns.io')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/certvalidator/init.py", line 222, in validate_tls
self._validate_path()
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/certvalidator/init.py", line 108, in _validate_path
paths = self.context.certificateregistry.build_paths(self._certificate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/certvalidator/registry.py", line 314, in build_paths
raise PathBuildingError(pretty_message(
certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Province: Massachusetts, Country: US, Serial Number: 471714639, Business Category: Private Organization, Incorporation State/Province: Massachusetts, Incorporation Country: US" - no issuer matching "Common Name: GeoTrust Primary Certification Authority, Organization: GeoTrust Inc., Country: US" was found
======================================================================
ERROR: test_basic_certificate_validator_tls_expired (tests.test_certificate_validator.CertificateValidatorTests.test_basic_certificate_validator_tls_expired)
Traceback (most recent call last):
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/tests/test_certificate_validator.py", line 54, in test_basic_certificate_validator_tls_expired
validator.validate_tls('codexns.io')
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/certvalidator/init.py", line 222, in validate_tls
self._validate_path()
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/certvalidator/init.py", line 108, in _validate_path
paths = self.context.certificateregistry.build_paths(self._certificate)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/pkgs/trabalhando/PACOTES-PRONTOS/certivalidador/python-certvalidator/certvalidator/registry.py", line 314, in build_paths
raise PathBuildingError(pretty_message(
certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Province: Massachusetts, Country: US, Serial Number: 471714639, Business Category: Private Organization, Incorporation State/Province: Massachusetts, Incorporation Country: US" - no issuer matching "Common Name: GeoTrust Primary Certification Authority, Organization: GeoTrust Inc., Country: US" was found
======================================================================
ERROR: test_basic_certificate_validator_tls_invalid_hostname (tests.test_certificate_validator.CertificateValidatorTests.test_basic_certificate_validator_tls_invalid_hostname)
Traceback (most recent call last):
Inglês
ISOLATED TESTS WITH PYTEST:
FAILED tests/test_certificate_validator.py::CertificateValidatorTests::test_basic_certificate_validator_tls - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Pro...
FAILED tests/test_certificate_validator.py::CertificateValidatorTests::test_basic_certificate_validator_tls_expired - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Pro...
FAILED tests/test_certificate_validator.py::CertificateValidatorTests::test_basic_certificate_validator_tls_invalid_hostname - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Pro...
FAILED tests/test_certificate_validator.py::CertificateValidatorTests::test_basic_certificate_validator_tls_invalid_key_usage - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Pro...
FAILED tests/test_certificate_validator.py::CertificateValidatorTests::test_basic_certificate_validator_tls_whitelist - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Pro...
FAILED tests/test_crl_client.py::CRLClientTests::test_fetch_crl - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: GeoTrust EV SSL CA - G4, Organization: GeoTrust Inc., Country: US" - no issue...
FAILED tests/test_ocsp_client.py::OCSPClientTests::test_fetch_ocsp - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: GeoTrust EV SSL CA - G4, Organization: GeoTrust Inc., Country: US" - no issue...
FAILED tests/test_registry.py::RegistryTests::test_build_paths - certvalidator.errors.PathBuildingError: Unable to build a validation path for the certificate "Common Name: codexns.io, Organization: Codex Non Sufficit LC, Locality: Newbury, State/Pro...
FAILED tests/test_validate.py::ValidateTests::test_revocation_mode_hard - certvalidator.errors.PathValidationError: The path could not be validated because intermediate certificate 1 expired 2022-04-13 10:00:00Z
FAILED tests/test_validate.py::ValidateTests::test_revocation_mode_soft - certvalidator.errors.PathValidationError: The path could not be validated because intermediate certificate 1 expired 2022-04-13 10:00:00Z
======================================================================== 10 failed, 203 passed, 127 warnings in 5.37s ==========
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running pytest and reviewing tests/test_certificate_validator.py, tests/test_crl_client.py, tests/test_ocsp_client.py, tests/test_registry.py, and tests/test_validate.py. Investigate the reported certificate path-building and expired-intermediate failures; done means the affected tests pass without masking the validation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- security, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100