Skip to content

Errors in testing #45

@Nilsonfsilva

Description

@Nilsonfsilva

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 ==========

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions