File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1707,7 +1707,7 @@ to speed up repeated connections from the same clients.
17071707
17081708 import socket, ssl
17091709
1710- context = ssl.SSLContext(ssl.PROTOCOL_TLSv1 )
1710+ context = ssl.SSLContext()
17111711 context.verify_mode = ssl.CERT_REQUIRED
17121712 context.check_hostname = True
17131713 context.load_default_certs()
@@ -1952,7 +1952,7 @@ If you prefer to tune security settings yourself, you might create
19521952a context from scratch (but beware that you might not get the settings
19531953right)::
19541954
1955- >>> context = ssl.SSLContext(ssl.PROTOCOL_TLS )
1955+ >>> context = ssl.SSLContext()
19561956 >>> context.verify_mode = ssl.CERT_REQUIRED
19571957 >>> context.check_hostname = True
19581958 >>> context.load_verify_locations("/etc/ssl/certs/ca-bundle.crt")
You can’t perform that action at this time.
0 commit comments