aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2014-07-16 10:23:48 -0700
committerAlexander Gaynor <alex.gaynor@gmail.com>2014-07-18 10:55:20 -0700
commit2bf11cdc18d244fdf1620120cfb56f1b529e0c7d (patch)
tree1fa6dff4ad9e75a70b10ba11f4422feb70877fbf
parent09db2fa40092c08e5d11eb68363819f2bc7ede19 (diff)
downloadcryptography-2bf11cdc18d244fdf1620120cfb56f1b529e0c7d.tar.gz
cryptography-2bf11cdc18d244fdf1620120cfb56f1b529e0c7d.tar.bz2
cryptography-2bf11cdc18d244fdf1620120cfb56f1b529e0c7d.zip
Added PEMSerializationBackend interface
-rw-r--r--cryptography/hazmat/backends/interfaces.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/cryptography/hazmat/backends/interfaces.py b/cryptography/hazmat/backends/interfaces.py
index 75d9af6d..3761e254 100644
--- a/cryptography/hazmat/backends/interfaces.py
+++ b/cryptography/hazmat/backends/interfaces.py
@@ -273,6 +273,16 @@ class EllipticCurveBackend(object):
@six.add_metaclass(abc.ABCMeta)
+class PEMSerializationBackend(object):
+ @abc.abstractmethod
+ def load_pem_private_key(self, data, password):
+ """
+ Loads a private key from PEM encoded data, using the provided password
+ if the data is encrypted.
+ """
+
+
+@six.add_metaclass(abc.ABCMeta)
class TraditionalOpenSSLSerializationBackend(object):
@abc.abstractmethod
def load_traditional_openssl_pem_private_key(self, data, password):