From 2bf11cdc18d244fdf1620120cfb56f1b529e0c7d Mon Sep 17 00:00:00 2001 From: Alex Gaynor Date: Wed, 16 Jul 2014 10:23:48 -0700 Subject: Added PEMSerializationBackend interface --- cryptography/hazmat/backends/interfaces.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 @@ -272,6 +272,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 -- cgit v1.2.3