Skip to content

Commit

Permalink
Split ciphers up to individual lines.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasa committed Aug 15, 2016
1 parent 86d5e24 commit 4a15efa
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions urllib3/util/ssl_.py
Expand Up @@ -67,11 +67,27 @@ def _const_compare_digest_backport(a, b):
# - prefer AES-GCM over ChaCha20 because hardware-accelerated AES is common,
# - use 3DES as fallback which is secure but slow,
# - disable NULL authentication, MD5 MACs and DSS for security reasons.
DEFAULT_CIPHERS = (
'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'
'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:'
'RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:!eNULL:!MD5'
)
DEFAULT_CIPHERS = ':'.join([
'ECDH+AESGCM',
'ECDH+CHACHA20',
'DH+AESGCM',
'DH+CHACHA20',
'ECDH+AES256',
'DH+AES256',
'ECDH+AES128',
'DH+AES',
'ECDH+HIGH',
'DH+HIGH',
'ECDH+3DES',
'DH+3DES',
'RSA+AESGCM',
'RSA+AES',
'RSA+HIGH',
'RSA+3DES',
'!aNULL',
'!eNULL',
'!MD5',
])

try:
from ssl import SSLContext # Modern SSL?
Expand Down

0 comments on commit 4a15efa

Please sign in to comment.