diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-05-02 23:27:00 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-05-02 23:27:00 -0500 |
commit | d0cd507bd7b95147a53448053e7fa7a355045ead (patch) | |
tree | 62c2cb714c26e8431f2c6fed361240e40a69e3fd /docs | |
parent | 93ae805debd88f976b96c6d50a2e85e848ec96e3 (diff) | |
download | cryptography-d0cd507bd7b95147a53448053e7fa7a355045ead.tar.gz cryptography-d0cd507bd7b95147a53448053e7fa7a355045ead.tar.bz2 cryptography-d0cd507bd7b95147a53448053e7fa7a355045ead.zip |
add some comments
Diffstat (limited to 'docs')
-rw-r--r-- | docs/x509.rst | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/x509.rst b/docs/x509.rst index a8beb20a..6bb7c9a3 100644 --- a/docs/x509.rst +++ b/docs/x509.rst @@ -760,9 +760,10 @@ X.509 Extensions >>> from cryptography.hazmat.backends import default_backend >>> from cryptography.hazmat.primitives import hashes >>> cert = x509.load_pem_x509_certificate(cryptography_cert_pem, default_backend()) + >>> # Get the subjectAltName extension from the certificate >>> ext = cert.extensions.get_extension_for_oid(x509.OID_SUBJECT_ALTERNATIVE_NAME) - >>> san = ext.value - >>> san.get_values_for_type(x509.DNSName) + >>> # Get the dNSName entries from the SAN extension + >>> ext.value.get_values_for_type(x509.DNSName) [u'www.cryptography.io', u'cryptography.io'] |