Skip to content

Build failure due to dh_auto_test failure on all architectures

Job #4851479767 failed for df2b84b3:

__________ TestCertificateChainVerifier.test_valid_certificate_chain ___________
self = <tests.cert_chain_verifier_test.TestCertificateChainVerifier object at 0x7f34ca45d210>
certificate_chain_as_x509 = [<_nassl.X509 object at 0x7f34c93c2bf0>, <_nassl.X509 object at 0x7f34c93c2d70>]
    def test_valid_certificate_chain(self, certificate_chain_as_x509):
        path_validator = CertificateChainVerifier.from_file(Path(__file__).absolute().parent / "mozilla.pem")
>       path_validator.verify(certificate_chain_as_x509)
tests/cert_chain_verifier_test.py:101: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <nassl.cert_chain_verifier.CertificateChainVerifier object at 0x7f34c93d47d0>
certificate_chain = [<_nassl.X509 object at 0x7f34c93c2bf0>, <_nassl.X509 object at 0x7f34c93c2d70>]
    def verify(self, certificate_chain: List[X509]) -> List[X509]:
        """Validate a certificate chain and if successful, return the verified chain.
    
        The leaf certificate must be at index 0 of the certificate chain.
    
        WARNING: the validation logic does not perform hostname validation.
        """
        if not certificate_chain:
            raise ValueError("Supplied an empty certificate chain")
    
        # Setup the context object for cert verification
        store_ctx = X509_STORE_CTX()
        store_ctx.set0_trusted_stack(self._trusted_certificates)
        store_ctx.set0_untrusted(certificate_chain)
    
        leaf_cert = certificate_chain[0]
        store_ctx.set_cert(leaf_cert)
    
        # Run the verification
        result: int = X509.verify_cert(store_ctx)
        if result == 1:
            # Validation succeeded
            verified_chain = store_ctx.get1_chain()
            return verified_chain
        elif result == 0:
            # Validation failed
            verify_result = store_ctx.get_error()
>           raise CertificateChainVerificationFailed(verify_result)
E           nassl.cert_chain_verifier.CertificateChainVerificationFailed: Verification failed with OpenSSL error code 10: "certificate has expired"
nassl/cert_chain_verifier.py:66: CertificateChainVerificationFailed
=============================== warnings summary ===============================
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information