aboutsummaryrefslogtreecommitdiffstats
path: root/docs/x509
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2017-10-19 08:43:46 -0400
committerPaul Kehrer <paul.l.kehrer@gmail.com>2017-10-19 20:43:46 +0800
commita17bcba39a5f0bb0c84a3a4835ed82e023b4dc3f (patch)
tree8b090c822008af79e90e9bfefeb3db4f02d99702 /docs/x509
parentaf6f9900647c36224130270dab385d323ff7534d (diff)
downloadcryptography-a17bcba39a5f0bb0c84a3a4835ed82e023b4dc3f.tar.gz
cryptography-a17bcba39a5f0bb0c84a3a4835ed82e023b4dc3f.tar.bz2
cryptography-a17bcba39a5f0bb0c84a3a4835ed82e023b4dc3f.zip
fixed #3986 -- properly use unicode for DNSName (#3988)
Diffstat (limited to 'docs/x509')
-rw-r--r--docs/x509/tutorial.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/x509/tutorial.rst b/docs/x509/tutorial.rst
index 0492c9a7..d34b3504 100644
--- a/docs/x509/tutorial.rst
+++ b/docs/x509/tutorial.rst
@@ -70,9 +70,9 @@ a few details:
... ])).add_extension(
... x509.SubjectAlternativeName([
... # Describe what sites we want this certificate for.
- ... x509.DNSName(b"mysite.com"),
- ... x509.DNSName(b"www.mysite.com"),
- ... x509.DNSName(b"subdomain.mysite.com"),
+ ... 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.
@@ -142,7 +142,7 @@ Then we generate the certificate itself:
... # Our certificate will be valid for 10 days
... datetime.datetime.utcnow() + datetime.timedelta(days=10)
... ).add_extension(
- ... x509.SubjectAlternativeName([x509.DNSName(b"localhost")]),
+ ... x509.SubjectAlternativeName([x509.DNSName(u"localhost")]),
... critical=False,
... # Sign our certificate with our private key
... ).sign(key, hashes.SHA256(), default_backend())