aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-03-14 17:45:36 -0400
committerAlex Gaynor <alex.gaynor@gmail.com>2015-03-14 17:45:36 -0400
commit0354694e9cc25d309a5bcb8c6c032fd1f28d9e4b (patch)
treed4cad90e4175b76282bf96e44ae69f5a377bf87b /src
parent939af10558eccce22e72fafceb7eb4f32d8cea2f (diff)
parent038e61a2784e2f575ec48b38c6d3d2382f5e8a78 (diff)
downloadcryptography-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.py6
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)