aboutsummaryrefslogtreecommitdiffstats
path: root/cryptography
diff options
context:
space:
mode:
authorDavid Reid <dreid@dreid.org>2014-02-12 11:18:35 -0800
committerDavid Reid <dreid@dreid.org>2014-02-12 11:18:35 -0800
commitba657d3856554ba81fad4cf83acd723ab7f3bee9 (patch)
treee17fba2f9c6435e657dd95d48e5449e2b99e89ca /cryptography
parentd3a061a3d3b2b856cf7c839b19739e20235b4962 (diff)
parente7bdb1b3e76346d4e0aa7cbf2291e6f25e7b43b3 (diff)
downloadcryptography-ba657d3856554ba81fad4cf83acd723ab7f3bee9.tar.gz
cryptography-ba657d3856554ba81fad4cf83acd723ab7f3bee9.tar.bz2
cryptography-ba657d3856554ba81fad4cf83acd723ab7f3bee9.zip
Merge pull request #600 from alex/multi-rsa
Added RSABackend to MultiBackend
Diffstat (limited to 'cryptography')
-rw-r--r--cryptography/hazmat/backends/multibackend.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/cryptography/hazmat/backends/multibackend.py b/cryptography/hazmat/backends/multibackend.py
index 49a4014d..4de02026 100644
--- a/cryptography/hazmat/backends/multibackend.py
+++ b/cryptography/hazmat/backends/multibackend.py
@@ -16,7 +16,7 @@ from __future__ import absolute_import, division, print_function
from cryptography import utils
from cryptography.exceptions import UnsupportedAlgorithm
from cryptography.hazmat.backends.interfaces import (
- CipherBackend, HashBackend, HMACBackend, PBKDF2HMACBackend
+ CipherBackend, HashBackend, HMACBackend, PBKDF2HMACBackend, RSABackend
)
@@ -101,3 +101,8 @@ class MultiBackend(object):
except UnsupportedAlgorithm:
pass
raise UnsupportedAlgorithm
+
+ def generate_rsa_private_key(self, public_exponent, key_size):
+ for b in self._filtered_backends(RSABackend):
+ return b.generate_rsa_private_key(public_exponent, key_size)
+ raise UnsupportedAlgorithm