diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-09-04 12:00:43 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-09-04 12:00:43 -0500 |
commit | 8359190f6e509fa2d12c0d86c9dfd1a8b35bf9cb (patch) | |
tree | 37436d6d1502532d40e78b3ea337cd084f59622e /docs/x509 | |
parent | 7402cf1c676ffb7ba48d6e90227bb4b1397af12d (diff) | |
parent | cad58d7bfa1a01ade66828498dcb2894993838b9 (diff) | |
download | cryptography-8359190f6e509fa2d12c0d86c9dfd1a8b35bf9cb.tar.gz cryptography-8359190f6e509fa2d12c0d86c9dfd1a8b35bf9cb.tar.bz2 cryptography-8359190f6e509fa2d12c0d86c9dfd1a8b35bf9cb.zip |
Merge branch 'master' into static-linking-osx
Diffstat (limited to 'docs/x509')
-rw-r--r-- | docs/x509/tutorial.rst | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/docs/x509/tutorial.rst b/docs/x509/tutorial.rst index d1c8ba14..0fa061a2 100644 --- a/docs/x509/tutorial.rst +++ b/docs/x509/tutorial.rst @@ -67,13 +67,16 @@ a few details: ... x509.NameAttribute(NameOID.LOCALITY_NAME, u"San Francisco"), ... x509.NameAttribute(NameOID.ORGANIZATION_NAME, u"My Company"), ... x509.NameAttribute(NameOID.COMMON_NAME, u"mysite.com"), - ... ])).add_extension(x509.SubjectAlternativeName([ - ... # Describe what sites we want this certificate for. - ... x509.DNSName(u"mysite.com"), - ... x509.DNSName(u"www.mysite.com"), - ... x509.DNSName(u"subdomain.mysite.com"), + ... ])).add_extension( + ... x509.SubjectAlternativeName([ + ... # Describe what sites we want this certificate for. + ... x509.DNSName(u"mysite.com"), + ... x509.DNSName(u"www.mysite.com"), + ... x509.DNSName(u"subdomain.mysite.com"), + ... ]), + ... critical=False, ... # Sign the CSR with our private key. - ... ])).sign(key, hashes.SHA256(), default_backend()) + ... ).sign(key, hashes.SHA256(), default_backend()) >>> # Write our CSR out to disk. >>> with open("path/to/csr.pem", "wb") as f: ... f.write(csr.public_bytes(serialization.Encoding.PEM)) |