diff options
author | David Benjamin <davidben@google.com> | 2019-07-08 16:42:01 -0400 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2019-07-08 15:42:00 -0500 |
commit | 9a09f9690890c4b6fa6d4d1625e78dcbaffbf734 (patch) | |
tree | 8b5224be0decccc0efc22da14323c59dd6c5acea /tests/hazmat/primitives/test_x448.py | |
parent | 1e8c5a64190db6611889f45f7f8af543b291383b (diff) | |
download | cryptography-9a09f9690890c4b6fa6d4d1625e78dcbaffbf734.tar.gz cryptography-9a09f9690890c4b6fa6d4d1625e78dcbaffbf734.tar.bz2 cryptography-9a09f9690890c4b6fa6d4d1625e78dcbaffbf734.zip |
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
Diffstat (limited to 'tests/hazmat/primitives/test_x448.py')
-rw-r--r-- | tests/hazmat/primitives/test_x448.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_x448.py b/tests/hazmat/primitives/test_x448.py index 817de76f..472d49cd 100644 --- a/tests/hazmat/primitives/test_x448.py +++ b/tests/hazmat/primitives/test_x448.py @@ -10,7 +10,6 @@ import os import pytest from cryptography.exceptions import _Reasons -from cryptography.hazmat.backends.interfaces import DHBackend from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric.x448 import ( X448PrivateKey, X448PublicKey @@ -25,7 +24,6 @@ from ...utils import ( only_if=lambda backend: not backend.x448_supported(), skip_message="Requires OpenSSL without X448 support" ) -@pytest.mark.requires_backend_interface(interface=DHBackend) def test_x448_unsupported(backend): with raises_unsupported_algorithm(_Reasons.UNSUPPORTED_EXCHANGE_ALGORITHM): X448PublicKey.from_public_bytes(b"0" * 56) @@ -41,7 +39,6 @@ def test_x448_unsupported(backend): only_if=lambda backend: backend.x448_supported(), skip_message="Requires OpenSSL with X448 support" ) -@pytest.mark.requires_backend_interface(interface=DHBackend) class TestX448Exchange(object): @pytest.mark.parametrize( "vector", |