diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-01-27 11:19:07 -0600 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-01-27 11:19:07 -0600 |
commit | 7d93ad6f654313f86320153b797e34a5959c42eb (patch) | |
tree | dc4dc800cdaea5953c627eb461a1853b4405ae9a /docs/hazmat/primitives | |
parent | 7466c2ec27d5a08173fd4f57152cb56b84146b68 (diff) | |
parent | 1a3203b891bd611d2878f345b608cf29b1efcd26 (diff) | |
download | cryptography-7d93ad6f654313f86320153b797e34a5959c42eb.tar.gz cryptography-7d93ad6f654313f86320153b797e34a5959c42eb.tar.bz2 cryptography-7d93ad6f654313f86320153b797e34a5959c42eb.zip |
Merge pull request #1642 from alex/not-all-pems
Have the pem public/private key loading docs point to x.509
Diffstat (limited to 'docs/hazmat/primitives')
-rw-r--r-- | docs/hazmat/primitives/asymmetric/serialization.rst | 8 |
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 |