diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-03-14 17:45:36 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-03-14 17:45:36 -0400 |
commit | 0354694e9cc25d309a5bcb8c6c032fd1f28d9e4b (patch) | |
tree | d4cad90e4175b76282bf96e44ae69f5a377bf87b /tests/hazmat/backends/test_openssl.py | |
parent | 939af10558eccce22e72fafceb7eb4f32d8cea2f (diff) | |
parent | 038e61a2784e2f575ec48b38c6d3d2382f5e8a78 (diff) | |
download | cryptography-0354694e9cc25d309a5bcb8c6c032fd1f28d9e4b.tar.gz cryptography-0354694e9cc25d309a5bcb8c6c032fd1f28d9e4b.tar.bz2 cryptography-0354694e9cc25d309a5bcb8c6c032fd1f28d9e4b.zip |
Merge pull request #1756 from reaperhulk/serialize-der-dsa
Serialize DER DSA private keys
Diffstat (limited to 'tests/hazmat/backends/test_openssl.py')
-rw-r--r-- | tests/hazmat/backends/test_openssl.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/tests/hazmat/backends/test_openssl.py b/tests/hazmat/backends/test_openssl.py index 410d3d2a..73316f8a 100644 --- a/tests/hazmat/backends/test_openssl.py +++ b/tests/hazmat/backends/test_openssl.py @@ -15,7 +15,7 @@ import pytest from cryptography import utils from cryptography.exceptions import InternalError, _Reasons -from cryptography.hazmat.backends.interfaces import DSABackend, RSABackend +from cryptography.hazmat.backends.interfaces import RSABackend from cryptography.hazmat.backends.openssl.backend import ( Backend, backend ) @@ -507,19 +507,3 @@ class TestRSAPEMSerialization(object): serialization.PrivateFormat.PKCS8, serialization.BestAvailableEncryption(password) ) - - -@pytest.mark.requires_backend_interface(interface=DSABackend) -class TestDSADERSerialization(object): - def test_unsupported_private_key_encoding(self): - key_bytes = load_vectors_from_file( - os.path.join("asymmetric", "PKCS8", "unenc-dsa-pkcs8.pem"), - lambda pemfile: pemfile.read().encode() - ) - key = serialization.load_pem_private_key(key_bytes, None, backend) - with pytest.raises(TypeError): - key.private_bytes( - serialization.Encoding.DER, - serialization.PrivateFormat.TraditionalOpenSSL, - serialization.NoEncryption() - ) |