diff options
author | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-08-12 14:32:14 -0500 |
---|---|---|
committer | Paul Kehrer <paul.l.kehrer@gmail.com> | 2015-08-12 14:32:14 -0500 |
commit | f15a0a096289688f13c193633811c4aef0974e2f (patch) | |
tree | 8b46adcb972e20622e741909089016c5546e206e /docs/x509 | |
parent | c7053706a350dad10dca38920155d8ae08b7c3c7 (diff) | |
parent | 46c3e70466acd33c4ec980fe62a5be958ed5c2cf (diff) | |
download | cryptography-f15a0a096289688f13c193633811c4aef0974e2f.tar.gz cryptography-f15a0a096289688f13c193633811c4aef0974e2f.tar.bz2 cryptography-f15a0a096289688f13c193633811c4aef0974e2f.zip |
Merge pull request #2273 from pyca/alex-patch-1
Fixed a pair of examples in teh docs
Diffstat (limited to 'docs/x509')
-rw-r--r-- | docs/x509/tutorial.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/docs/x509/tutorial.rst b/docs/x509/tutorial.rst index 5e8d54eb..4caa90b5 100644 --- a/docs/x509/tutorial.rst +++ b/docs/x509/tutorial.rst @@ -37,7 +37,7 @@ are the most common types of keys on the web right now): ... backend=default_backend() ... ) >>> # Write our key to disk for safe keeping - >>> with open("path/to/store/key.pem") as f: + >>> with open("path/to/store/key.pem", "w") as f: ... f.write(key.private_bytes( ... encoding=serialization.Encoding.PEM, ... format=serialization.PrivateFormat.TraditionalOpenSSL, @@ -74,7 +74,7 @@ a few details: ... # Sign the CSR with our private key. ... ])).sign(key, hashes.SHA256(), default_backend()) >>> # Write our CSR out to disk. - >>> with open("path/to/csr.pem") as f: + >>> with open("path/to/csr.pem", "w") as f: ... f.write(csr.public_bytes(serialization.Encoding.PEM)) Now we can give our CSR to a CA, who will give a certificate to us in return. |