aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat/backends/interfaces.rst
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-01-17 13:57:41 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-01-17 13:57:41 -0500
commit2dcdf87195b9bbe3be8abd5439ebc14a4e8bfe36 (patch)
treee09dda9d096e5b6a1d922a793780480fc45601ac /docs/hazmat/backends/interfaces.rst
parentec8a4cdfbd074d606e506f23eca5b75cc904923b (diff)
parente788fa9866494aed36436a6c1eaeb8a33409b770 (diff)
downloadcryptography-2dcdf87195b9bbe3be8abd5439ebc14a4e8bfe36.tar.gz
cryptography-2dcdf87195b9bbe3be8abd5439ebc14a4e8bfe36.tar.bz2
cryptography-2dcdf87195b9bbe3be8abd5439ebc14a4e8bfe36.zip
Merge pull request #1608 from reaperhulk/der-backend-interfaces
add DER backend interfaces
Diffstat (limited to 'docs/hazmat/backends/interfaces.rst')
-rw-r--r--docs/hazmat/backends/interfaces.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/hazmat/backends/interfaces.rst b/docs/hazmat/backends/interfaces.rst
index 052e397f..8efe2ce9 100644
--- a/docs/hazmat/backends/interfaces.rst
+++ b/docs/hazmat/backends/interfaces.rst
@@ -468,6 +468,30 @@ A specific ``backend`` may provide one or more of these interfaces.
serialized data contains.
:raises ValueError: If the data could not be deserialized.
+.. class:: DERSerializationBackend
+
+ .. versionadded:: 0.8
+
+ A backend with methods for working with DER encoded keys.
+
+ .. method:: load_der_private_key(data, password)
+
+ :param bytes data: DER data to load.
+ :param bytes password: The password to use if the data is encrypted.
+ Should be ``None`` if the data is not encrypted.
+ :return: A new instance of the appropriate type of private key that the
+ serialized data contains.
+ :raises ValueError: If the data could not be deserialized.
+ :raises cryptography.exceptions.UnsupportedAlgorithm: If the data is
+ encrypted with an unsupported algorithm.
+
+ .. method:: load_der_public_key(data)
+
+ :param bytes data: DER data to load.
+ :return: A new instance of the appropriate type of public key
+ serialized data contains.
+ :raises ValueError: If the data could not be deserialized.
+
.. class:: X509Backend
.. versionadded:: 0.7