From e0e516ed7ffe512f655c564911a9b605222b5973 Mon Sep 17 00:00:00 2001 From: Daniel Kahn Gillmor Date: Wed, 17 Jul 2019 02:47:44 -0400 Subject: [PATCH] test the names of the curves against the stored list We were testing the wrong version of the curve string. With this change on python-cryptography 2.6.1 and openssl 1.1.1c, we drop from 26 xfailed to 14 xfailed tests. --- tests/test_05_actions.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_05_actions.py b/tests/test_05_actions.py index b640716..93d6a58 100644 --- a/tests/test_05_actions.py +++ b/tests/test_05_actions.py @@ -254,8 +254,8 @@ class TestPGPKey_Management(object): if not alg.can_gen: pytest.xfail('Key algorithm {} not yet supported'.format(alg.name)) - if isinstance(size, EllipticCurveOID) and ((not size.can_gen) or size.name not in _openssl_get_supported_curves()): - pytest.xfail('Curve {} not yet supported'.format(size.name)) + if isinstance(size, EllipticCurveOID) and ((not size.can_gen) or size.curve.name not in _openssl_get_supported_curves()): + pytest.xfail('Curve {} not yet supported'.format(size.curve.name)) key = self.keys[pkspec] subkey = PGPKey.new(*skspec) @@ -465,8 +465,8 @@ class TestPGPKey_Management(object): if not alg.can_gen: pytest.xfail('Key algorithm {} not yet supported'.format(alg.name)) - if isinstance(size, EllipticCurveOID) and ((not size.can_gen) or size.name not in _openssl_get_supported_curves()): - pytest.xfail('Curve {} not yet supported'.format(size.name)) + if isinstance(size, EllipticCurveOID) and ((not size.can_gen) or size.curve.name not in _openssl_get_supported_curves()): + pytest.xfail('Curve {} not yet supported'.format(size.curve.name)) # revoke the subkey key = self.keys[pkspec]