diff options
author | Alex Gaynor <alex.gaynor@gmail.com> | 2015-09-03 10:10:49 -0400 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2015-09-03 10:10:49 -0400 |
commit | f648734d1a0da965983e42e96437b99acd7dd1ea (patch) | |
tree | 7fcff739a1aafdbd0dd5540eace9f77f52835a1b /docs/x509 | |
parent | f8fed42f0cb79ca2a0f99444cd6f3c173391b069 (diff) | |
download | cryptography-f648734d1a0da965983e42e96437b99acd7dd1ea.tar.gz cryptography-f648734d1a0da965983e42e96437b99acd7dd1ea.tar.bz2 cryptography-f648734d1a0da965983e42e96437b99acd7dd1ea.zip |
Fixed #2318 -- added the missing critical flag to the x509 tutorial
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)) |