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

Errors in testing #45

Open
Nilsonfsilva opened this issue Oct 19, 2023 · 0 comments
Open

Errors in testing #45

Nilsonfsilva opened this issue Oct 19, 2023 · 0 comments

Comments

@Nilsonfsilva
Copy link

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

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

No branches or pull requests

1 participant