diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-07-18 15:12:43 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2014-07-18 15:12:43 -0500 |
commit | 8e39e69a47c00ed24fb86c1e79726daa2e890edb (patch) | |
tree | 4a33e1c2216bc32339694728467b2f54549c6d2a /cryptography | |
parent | 06de17fe795015ce9b96a7e2d918c0b8907389fb (diff) | |
download | cryptography-8e39e69a47c00ed24fb86c1e79726daa2e890edb.tar.gz cryptography-8e39e69a47c00ed24fb86c1e79726daa2e890edb.tar.bz2 cryptography-8e39e69a47c00ed24fb86c1e79726daa2e890edb.zip |
add missing DSABackend numbers loading methods to Multibackend
Diffstat (limited to 'cryptography')
-rw-r--r-- | cryptography/hazmat/backends/multibackend.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/multibackend.py b/cryptography/hazmat/backends/multibackend.py index 35e2a093..6893cad6 100644 --- a/cryptography/hazmat/backends/multibackend.py +++ b/cryptography/hazmat/backends/multibackend.py @@ -239,6 +239,18 @@ class MultiBackend(object): raise UnsupportedAlgorithm("DSA is not supported by the backend.", _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM) + def load_dsa_public_numbers(self, numbers): + for b in self._filtered_backends(DSABackend): + return b.load_dsa_public_numbers(numbers) + raise UnsupportedAlgorithm("DSA is not supported by the backend.", + _Reasons.UNSUPPORTED_PUBLIC_KEY_ALGORITHM) + + def load_dsa_private_numbers(self, numbers): + for b in self._filtered_backends(DSABackend): + return b.load_dsa_private_numbers(numbers) + 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) |