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 /src | |
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 'src')
-rw-r--r-- | src/cryptography/hazmat/backends/openssl/backend.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py index 13699558..59503bd9 100644 --- a/src/cryptography/hazmat/backends/openssl/backend.py +++ b/src/cryptography/hazmat/backends/openssl/backend.py @@ -1210,10 +1210,8 @@ class Backend(object): elif (self._lib.Cryptography_HAS_EC == 1 and type == self._lib.EVP_PKEY_EC): write_bio = self._lib.i2d_ECPrivateKey_bio - else: - raise TypeError( - "Only RSA & EC keys are supported for DER serialization" - ) + elif type == self._lib.EVP_PKEY_DSA: + write_bio = self._lib.i2d_DSAPrivateKey_bio bio = self._create_mem_bio() res = write_bio(bio, cdata) |