This commit is contained in:
parent
cbef66d711
commit
03d13c0cbf
|
@ -279,6 +279,12 @@ purposes.
|
||||||
|
|
||||||
RC4 was dropped from the default cipher string.
|
RC4 was dropped from the default cipher string.
|
||||||
|
|
||||||
|
.. versionchanged:: 3.5.3
|
||||||
|
|
||||||
|
ChaCha20/Poly1305 was added to the default cipher string.
|
||||||
|
|
||||||
|
3DES was dropped from the default cipher string.
|
||||||
|
|
||||||
|
|
||||||
Random generation
|
Random generation
|
||||||
^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^
|
||||||
|
|
36
Lib/ssl.py
36
Lib/ssl.py
|
@ -157,36 +157,42 @@ if _ssl.HAS_TLS_UNIQUE:
|
||||||
else:
|
else:
|
||||||
CHANNEL_BINDING_TYPES = []
|
CHANNEL_BINDING_TYPES = []
|
||||||
|
|
||||||
|
|
||||||
# Disable weak or insecure ciphers by default
|
# Disable weak or insecure ciphers by default
|
||||||
# (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')
|
# (OpenSSL's default setting is 'DEFAULT:!aNULL:!eNULL')
|
||||||
# Enable a better set of ciphers by default
|
# Enable a better set of ciphers by default
|
||||||
# This list has been explicitly chosen to:
|
# This list has been explicitly chosen to:
|
||||||
# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
|
# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
|
||||||
# * Prefer ECDHE over DHE for better performance
|
# * Prefer ECDHE over DHE for better performance
|
||||||
# * Prefer any AES-GCM over any AES-CBC for better performance and security
|
# * Prefer AEAD over CBC for better performance and security
|
||||||
|
# * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI
|
||||||
|
# (ChaCha20 needs OpenSSL 1.1.0 or patched 1.0.2)
|
||||||
|
# * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better
|
||||||
|
# performance and security
|
||||||
# * Then Use HIGH cipher suites as a fallback
|
# * Then Use HIGH cipher suites as a fallback
|
||||||
# * Then Use 3DES as fallback which is secure but slow
|
# * Disable NULL authentication, NULL encryption, 3DES and MD5 MACs
|
||||||
# * Disable NULL authentication, NULL encryption, and MD5 MACs for security
|
# for security reasons
|
||||||
# reasons
|
|
||||||
_DEFAULT_CIPHERS = (
|
_DEFAULT_CIPHERS = (
|
||||||
'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
|
'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'
|
||||||
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
|
'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH:'
|
||||||
'!eNULL:!MD5'
|
'!aNULL:!eNULL:!MD5:!3DES'
|
||||||
)
|
)
|
||||||
|
|
||||||
# Restricted and more secure ciphers for the server side
|
# Restricted and more secure ciphers for the server side
|
||||||
# This list has been explicitly chosen to:
|
# This list has been explicitly chosen to:
|
||||||
# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
|
# * Prefer cipher suites that offer perfect forward secrecy (DHE/ECDHE)
|
||||||
# * Prefer ECDHE over DHE for better performance
|
# * Prefer ECDHE over DHE for better performance
|
||||||
# * Prefer any AES-GCM over any AES-CBC for better performance and security
|
# * Prefer AEAD over CBC for better performance and security
|
||||||
|
# * Prefer AES-GCM over ChaCha20 because most platforms have AES-NI
|
||||||
|
# * Prefer any AES-GCM and ChaCha20 over any AES-CBC for better
|
||||||
|
# performance and security
|
||||||
# * Then Use HIGH cipher suites as a fallback
|
# * Then Use HIGH cipher suites as a fallback
|
||||||
# * Then Use 3DES as fallback which is secure but slow
|
# * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, RC4, and
|
||||||
# * Disable NULL authentication, NULL encryption, MD5 MACs, DSS, and RC4 for
|
# 3DES for security reasons
|
||||||
# security reasons
|
|
||||||
_RESTRICTED_SERVER_CIPHERS = (
|
_RESTRICTED_SERVER_CIPHERS = (
|
||||||
'ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:'
|
'ECDH+AESGCM:ECDH+CHACHA20:DH+AESGCM:DH+CHACHA20:ECDH+AES256:DH+AES256:'
|
||||||
'DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:'
|
'ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH:'
|
||||||
'!eNULL:!MD5:!DSS:!RC4'
|
'!aNULL:!eNULL:!MD5:!DSS:!RC4:!3DES'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,12 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #27850: Remove 3DES from ssl module's default cipher list to counter
|
||||||
|
measure sweet32 attack (CVE-2016-2183).
|
||||||
|
|
||||||
|
- Issue #27766: Add ChaCha20 Poly1305 to ssl module's default ciper list.
|
||||||
|
(Required OpenSSL 1.1.0 or LibreSSL).
|
||||||
|
|
||||||
- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.
|
- Issue #26470: Port ssl and hashlib module to OpenSSL 1.1.0.
|
||||||
|
|
||||||
- Remove support for passing a file descriptor to os.access. It never worked but
|
- Remove support for passing a file descriptor to os.access. It never worked but
|
||||||
|
|
Loading…
Reference in New Issue