aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-05-02 08:08:35 -0700
committerAlex Gaynor <alex.gaynor@gmail.com>2014-05-02 08:08:35 -0700
commit9a44485c740e0a15abad363c7d4af9903e050fb5 (patch)
treefa81c66df08b44eddfc606505125e9a653324357 /cryptography
parent865db9d21a91cb02a5f77e1b24b5dc5a90424903 (diff)
parent53706565bc1df0898f9e65046429129c4822a354 (diff)
downloadcryptography-9a44485c740e0a15abad363c7d4af9903e050fb5.tar.gz
cryptography-9a44485c740e0a15abad363c7d4af9903e050fb5.tar.bz2
cryptography-9a44485c740e0a15abad363c7d4af9903e050fb5.zip
Merge pull request #998 from reaperhulk/dsa-multibackend
DSA sign/verify multibackend
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/backends/multibackend.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/multibackend.py b/cryptography/hazmat/backends/multibackend.py
index 981a60bd..753f4fc6 100644
--- a/cryptography/hazmat/backends/multibackend.py
+++ b/cryptography/hazmat/backends/multibackend.py
@@ -158,6 +158,31 @@ class MultiBackend(object):
raise UnsupportedAlgorithm("DSA is not supported by the backend",
_Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM)
+ def create_dsa_verification_ctx(self, public_key, signature, algorithm):
+ for b in self._filtered_backends(DSABackend):
+ return b.create_dsa_verification_ctx(public_key, signature,
+ algorithm)
+ raise UnsupportedAlgorithm("DSA is not supported by the backend",
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM)
+
+ def create_dsa_signature_ctx(self, private_key, algorithm):
+ for b in self._filtered_backends(DSABackend):
+ return b.create_dsa_signature_ctx(private_key, algorithm)
+ raise UnsupportedAlgorithm("DSA is not supported by the backend",
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM)
+
+ def dsa_hash_supported(self, algorithm):
+ for b in self._filtered_backends(DSABackend):
+ return b.dsa_hash_supported(algorithm)
+ raise UnsupportedAlgorithm("DSA is not supported by the backend",
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM)
+
+ def dsa_parameters_supported(self, p, q, g):
+ for b in self._filtered_backends(DSABackend):
+ return b.dsa_parameters_supported(p, q, g)
+ raise UnsupportedAlgorithm("DSA is not supported by the backend",
+ _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM)
+
def cmac_algorithm_supported(self, algorithm):
return any(
b.cmac_algorithm_supported(algorithm)