diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2014-07-18 15:31:46 -0700 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2014-07-18 15:31:46 -0700 |
commit | 5ea03c7b1c3d353c55e8c79f602fe62566259d4b (patch) | |
tree | 81a75ec605890deb0122218ccb6e90af2be7470a /cryptography | |
parent | 4e7053cf820e9656e39560f80e61d1a58e8900a3 (diff) | |
parent | 8e39e69a47c00ed24fb86c1e79726daa2e890edb (diff) | |
download | cryptography-5ea03c7b1c3d353c55e8c79f602fe62566259d4b.tar.gz cryptography-5ea03c7b1c3d353c55e8c79f602fe62566259d4b.tar.bz2 cryptography-5ea03c7b1c3d353c55e8c79f602fe62566259d4b.zip |
Merge pull request #1274 from reaperhulk/add-missing-methods-multibackend
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) |