Skip to content

TestX509StoreContext::test_verify_with_time FAILED #684

Open
@PPed72

Description

@PPed72

Whenever I try to build pyopenssl-17.2.0 on my gentoo system I get the following test failure:

tests/test_crypto.py::TestX509StoreContext::test_verify_with_time FAILED
[...]
================================================================== FAILURES ==================================================================
_________________________________________________ TestX509StoreContext.test_verify_with_time _________________________________________________

self = <tests.test_crypto.TestX509StoreContext object at 0x00007f71d67b9360>

    def test_verify_with_time(self):
        """
            `verify_certificate` raises error when the verification time is
            set at notAfter.
            """
        store = X509Store()
        store.add_cert(self.root_cert)
        store.add_cert(self.intermediate_cert)
    
        expire_time = self.intermediate_server_cert.get_notAfter()
        expire_datetime = datetime.strptime(
            expire_time.decode('utf-8'), '%Y%m%d%H%M%SZ'
        )
        store.set_time(expire_datetime)
    
        store_ctx = X509StoreContext(store, self.intermediate_server_cert)
        with pytest.raises(X509StoreContextError) as exc:
>           store_ctx.verify_certificate()
E           Failed: DID NOT RAISE <class 'OpenSSL.crypto.X509StoreContextError'>

tests/test_crypto.py:3639: Failed
==================================================== 1 failed, 504 passed in 9.74 seconds ====================================================
 * ERROR: dev-python/pyopenssl-17.2.0::gentoo failed (test phase):

openssl version is 1.0.2l

It happens with any python implementation on my system (I have python-2.7, python-3.5, pypy and pypy3)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions