8000 Use correct set of ciphers · python-telegram-bot/urllib3@d0e3ffc · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on May 21, 2023. It is now read-only.

Commit d0e3ffc

Browse files
author
Ian Cordasco
committed
Use correct set of ciphers
1 parent 89b56c9 commit d0e3ffc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

urllib3/util/ssl_.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424
OP_NO_COMPRESSION = 0x20000
2525

2626
try:
27-
from ssl import _RESTRICTED_SERVER_CIPHERS
27+
from ssl import _DEFAULT_CIPHERS
2828
except ImportError:
29-
_RESTRICTED_SERVER_CIPHERS = (
29+
_DEFAULT_CIPHERS = (
3030
'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
31-
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
32-
'!eNULL:!MD5:!DSS:!RC4'
31+
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:ECDH+RC4:'
32+
'DH+RC4:RSA+RC4:!aNULL:!eNULL:!MD5'
3333
)
3434

3535
try:
@@ -190,7 +190,7 @@ def create_urllib3_context(ssl_version=None, cert_reqs=ssl.CERT_REQUIRED,
190190

191191
context.options |= options
192192

193-
context.set_ciphers(ciphers or _RESTRICTED_SERVER_CIPHERS)
193+
context.set_ciphers(ciphers or _DEFAULT_CIPHERS)
194194

195195
context.verify_mode = cert_reqs
196196
if getattr(context, 'check_hostname', None) is not None: # Platform-specific: Python 3.2

0 commit comments

Comments
 (0)
0