File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1707,7 +1707,7 @@ to speed up repeated connections from the same clients.
1707
1707
1708
1708
import socket, ssl
1709
1709
1710
- context = ssl.SSLContext(ssl.PROTOCOL_TLSv1 )
1710
+ context = ssl.SSLContext()
1711
1711
context.verify_mode = ssl.CERT_REQUIRED
1712
1712
context.check_hostname = True
1713
1713
context.load_default_certs()
@@ -1952,7 +1952,7 @@ If you prefer to tune security settings yourself, you might create
1952
1952
a context from scratch (but beware that you might not get the settings
1953
1953
right)::
1954
1954
1955
- >>> context = ssl.SSLContext(ssl.PROTOCOL_TLS )
1955
+ >>> context = ssl.SSLContext()
1956
1956
>>> context.verify_mode = ssl.CERT_REQUIRED
1957
1957
>>> context.check_hostname = True
1958
1958
>>> context.load_verify_locations("/etc/ssl/certs/ca-bundle.crt")
You can’t perform that action at this time.
0 commit comments