aboutsummaryrefslogtreecommitdiffstats
path: root/docs/hazmat
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2015-01-27 10:56:23 -0500
committerAlex Gaynor <alex.gaynor@gmail.com>2015-01-27 10:56:23 -0500
commit1a3203b891bd611d2878f345b608cf29b1efcd26 (patch)
treedc4dc800cdaea5953c627eb461a1853b4405ae9a /docs/hazmat
parent7466c2ec27d5a08173fd4f57152cb56b84146b68 (diff)
downloadcryptography-1a3203b891bd611d2878f345b608cf29b1efcd26.tar.gz
cryptography-1a3203b891bd611d2878f345b608cf29b1efcd26.tar.bz2
cryptography-1a3203b891bd611d2878f345b608cf29b1efcd26.zip
Have the pem public/private key loading docs point to x.509
Diffstat (limited to 'docs/hazmat')
-rw-r--r--docs/hazmat/primitives/asymmetric/serialization.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/hazmat/primitives/asymmetric/serialization.rst b/docs/hazmat/primitives/asymmetric/serialization.rst
index d5da24da..7ff4ce30 100644
--- a/docs/hazmat/primitives/asymmetric/serialization.rst
+++ b/docs/hazmat/primitives/asymmetric/serialization.rst
@@ -71,6 +71,14 @@ don't need to worry about this detail. PEM keys are recognizable because they
all begin with ``-----BEGIN {format}-----`` and end with ``-----END
{format}-----``.
+.. note::
+
+ A PEM block which starts with ``-----BEGIN CERTIFICATE-----`` is not a
+ public or private key, it's an :doc:`X.509 Certificate </x509>`. You can
+ load it using :func:`~cryptography.x509.load_pem_x509_certificate` and
+ extract the public key with
+ :meth:`Certificate.public_key <cryptography.x509.Certificate.public_key>`.
+
.. function:: load_pem_private_key(data, password, backend)
.. versionadded:: 0.6