From 6c4302e64c8ee866bfde6cd0acd5a86a9b1834de Mon Sep 17 00:00:00 2001 From: Paul Kehrer Date: Mon, 24 Nov 2014 09:20:38 -1000 Subject: add backend interface for loading x509 certificates --- src/cryptography/hazmat/backends/interfaces.py | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/cryptography/hazmat/backends/interfaces.py b/src/cryptography/hazmat/backends/interfaces.py index f433afcb..dcdd1c39 100644 --- a/src/cryptography/hazmat/backends/interfaces.py +++ b/src/cryptography/hazmat/backends/interfaces.py @@ -250,3 +250,12 @@ class PKCS8SerializationBackend(object): Load a private key from PKCS8 encoded data, using password if the data is encrypted. """ + + +@six.add_metaclass(abc.ABCMeta) +class X509Backend(object): + @abc.abstractmethod + def load_pem_x509_certificate(self, data): + """ + Load an X.509 certificate from PEM encoded data. + """ -- cgit v1.2.3