add backend interface for loading x509 certificates
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index ce2f091..47553a9 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -512,3 +512,17 @@
:raises cryptography.exceptions.UnsupportedAlgorithm: If the data is
encrypted with an unsupported algorithm.
+
+.. class:: X509Backend
+
+ .. versionadded:: 0.7
+
+ A backend with methods for working with X.509 objects.
+
+ .. method:: load_pem_x509_certificate(data)
+
+ :param bytes data: PEM formatted certificate data.
+
+ :returns: An instance of a
+ :class:`~cryptography.hazmat.primitives.interfaces.X509Certificate`
+ provider.
diff --git a/src/cryptography/hazmat/backends/interfaces.py b/src/cryptography/hazmat/backends/interfaces.py
index f433afc..dcdd1c3 100644
--- a/src/cryptography/hazmat/backends/interfaces.py
+++ b/src/cryptography/hazmat/backends/interfaces.py
@@ -250,3 +250,12 @@
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.
+ """