diff options
Diffstat (limited to 'docs')
-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 143cdfc5..372d78a4 100644 --- a/docs/x509/tutorial.rst +++ b/docs/x509/tutorial.rst @@ -133,7 +133,7 @@ Then we generate the certificate itself: ... ).issuer_name( ... issuer ... ).public_key( - ... private_key.public_key() + ... key.public_key() ... ).serial_number( ... x509.random_serial_number() ... ).not_valid_before( @@ -145,7 +145,7 @@ Then we generate the certificate itself: ... x509.SubjectAlternativeName([x509.DNSName(u"localhost")]), ... critical=False, ... # Sign our certificate with our private key - ... ).sign(private_key, hashes.SHA256(), default_backend()) + ... ).sign(key, hashes.SHA256(), default_backend()) >>> # Write our certificate out to disk. >>> with open("path/to/certificate.pem", "wb") as f: ... f.write(cert.public_bytes(serialization.Encoding.PEM)) |