From 9a09f9690890c4b6fa6d4d1625e78dcbaffbf734 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 8 Jul 2019 16:42:01 -0400 Subject: Fix some backend feature checks in tests (#4931) * Remove irrelevant DHBackend test conditions DHBackend provides functions for plain finite-field Diffie-Hellman. X25519 and X448 are their own algorithms, and Ed25519 and Ed448 aren't even Diffie-Hellman primitives. * Add missing backend support checks. Some new AES and EC tests did not check for whether the corresponding mode or curve was supported by the backend. * Add a DummyMode for coverage --- tests/hazmat/primitives/test_ed448.py | 3 --- 1 file changed, 3 deletions(-) (limited to 'tests/hazmat/primitives/test_ed448.py') diff --git a/tests/hazmat/primitives/test_ed448.py b/tests/hazmat/primitives/test_ed448.py index 28d92c70..b02f821a 100644 --- a/tests/hazmat/primitives/test_ed448.py +++ b/tests/hazmat/primitives/test_ed448.py @@ -10,7 +10,6 @@ import os import pytest from cryptography.exceptions import InvalidSignature, _Reasons -from cryptography.hazmat.backends.interfaces import DHBackend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric.ed448 import ( Ed448PrivateKey, Ed448PublicKey @@ -25,7 +24,6 @@ from ...utils import ( only_if=lambda backend: not backend.ed448_supported(), skip_message="Requires OpenSSL without Ed448 support" ) -@pytest.mark.requires_backend_interface(interface=DHBackend) def test_ed448_unsupported(backend): with raises_unsupported_algorithm( _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM @@ -47,7 +45,6 @@ def test_ed448_unsupported(backend): only_if=lambda backend: backend.ed448_supported(), skip_message="Requires OpenSSL with Ed448 support" ) -@pytest.mark.requires_backend_interface(interface=DHBackend) class TestEd448Signing(object): @pytest.mark.parametrize( "vector", -- cgit v1.2.3