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_ed25519.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_ed25519.py')
-rw-r--r-- | tests/hazmat/primitives/test_ed25519.py | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/tests/hazmat/primitives/test_ed25519.py b/tests/hazmat/primitives/test_ed25519.py index 8a2d3b07..aecc8572 100644 --- a/tests/hazmat/primitives/test_ed25519.py +++ b/tests/hazmat/primitives/test_ed25519.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.ed25519 import ( Ed25519PrivateKey, Ed25519PublicKey @@ -47,7 +46,6 @@ def load_ed25519_vectors(vector_data): only_if=lambda backend: not backend.ed25519_supported(), skip_message="Requires OpenSSL without Ed25519 support" ) -@pytest.mark.requires_backend_interface(interface=DHBackend) def test_ed25519_unsupported(backend): with raises_unsupported_algorithm( _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM @@ -69,7 +67,6 @@ def test_ed25519_unsupported(backend): only_if=lambda backend: backend.ed25519_supported(), skip_message="Requires OpenSSL with Ed25519 support" ) -@pytest.mark.requires_backend_interface(interface=DHBackend) class TestEd25519Signing(object): @pytest.mark.parametrize( "vector", |