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

Test failure with openssl 1.1.1d: TestECDSACertificate.test_load_ecdsa_no_named_curve #4998

Closed
globin opened this issue Sep 13, 2019 · 4 comments

Comments

@globin
Copy link

globin commented Sep 13, 2019

Dependency versions
Python 3.7.4
openssl 1.1.1d
asn1crypto: 0.24.0
cffi: 1.12.3
six: 1.12.0
pycparser: 2.19

tests/hazmat/primitives/test_dh.py:161: AssertionError
_____________ TestECDSACertificate.test_load_ecdsa_no_named_curve ______________

self = <tests.x509.test_x509.TestECDSACertificate object at 0x7fffc75afa50>
backend = <cryptography.hazmat.backends.openssl.backend.Backend object at 0x7ffff6ac7410>

    def test_load_ecdsa_no_named_curve(self, backend):
        _skip_curve_unsupported(backend, ec.SECP256R1())
        cert = _load_cert(
            os.path.join("x509", "custom", "ec_no_named_curve.pem"),
            x509.load_pem_x509_certificate,
            backend
        )
        with pytest.raises(NotImplementedError):
>           cert.public_key()
E           Failed: DID NOT RAISE <class 'NotImplementedError'>

Full build log:
https://nix-cache.s3.amazonaws.com/log/2d0dc3yc9hrkpwmyl3ymaxf96q9fcl5f-python3.7-cryptography-2.7.drv

globin added a commit to NixOS/nixpkgs that referenced this issue Sep 13, 2019
Broken tests by openssl 1.1.1d, added patch and skipped one test

Issue for skipped test: pyca/cryptography#4998
globin added a commit to NixOS/nixpkgs that referenced this issue Sep 13, 2019
Broken tests by openssl 1.1.1d, added patch and skipped one test

Issue for skipped test: pyca/cryptography#4998
@reaperhulk
Copy link
Member

This is a known issue and our CI is currently broken on it. 1.1.1d implements some explicit parameter support for EC in a weird way which breaks some tests. We'll be putting out an update to fix it when we decide what to do.

@reaperhulk
Copy link
Member

(Thank you for the report though, we should have had an issue open!)

vcunat pushed a commit to NixOS/nixpkgs that referenced this issue Sep 14, 2019
Broken tests by openssl 1.1.1d, added patch and skipped one test

Issue for skipped test: pyca/cryptography#4998

(cherry picked from commit 8b34d84)
@markokr
Copy link
Contributor

markokr commented Oct 3, 2019

It seems simplest just to drop the test - it does not test any cryptography code, just openssl internal behaviour, which now changed, invalidating the test.

Another way would be to regenerate test file, it seems secp256r1 with different base point should be enough to bypass new openssl logic. Now sure if it's worth the effort. The repo does not seem to have generation code for original test vector.

@alex
Copy link
Member

alex commented Oct 16, 2019

This is fixed now.

@alex alex closed this as completed Oct 16, 2019
dtzWill pushed a commit to dtzWill/nixpkgs that referenced this issue Jan 25, 2020
Broken tests by openssl 1.1.1d, added patch and skipped one test

Issue for skipped test: pyca/cryptography#4998

(cherry picked from commit 8b34d84)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

4 participants