src/eric7/EricNetwork/EricSslUtilities.py

branch
eric7
changeset 10503
6a37b6ac3928
parent 10439
21c28b0f9e41
child 11090
f5f5f5803935
equal deleted inserted replaced
10502:89b8e0a67fde 10503:6a37b6ac3928
16 from PyQt6.QtNetwork import QSslConfiguration # __IGNORE_WARNING_I10__ 16 from PyQt6.QtNetwork import QSslConfiguration # __IGNORE_WARNING_I10__
17 except ImportError: 17 except ImportError:
18 # no SSL available, so there is nothing to initialize 18 # no SSL available, so there is nothing to initialize
19 return 19 return
20 20
21 blacklist = [ 21 blocklist = [
22 "SRP-AES-256-CBC-SHA", # open to MitM 22 "SRP-AES-256-CBC-SHA", # open to MitM
23 "SRP-AES-128-CBC-SHA", # open to MitM 23 "SRP-AES-128-CBC-SHA", # open to MitM
24 ] 24 ]
25 25
26 strongCiphers = [ 26 strongCiphers = [
27 c 27 c
28 for c in QSslConfiguration.supportedCiphers() 28 for c in QSslConfiguration.supportedCiphers()
29 if c.name() not in blacklist and c.usedBits() >= 128 29 if c.name() not in blocklist and c.usedBits() >= 128
30 ] 30 ]
31 defaultSslConfiguration = QSslConfiguration.defaultConfiguration() 31 defaultSslConfiguration = QSslConfiguration.defaultConfiguration()
32 defaultSslConfiguration.setCiphers(strongCiphers) 32 defaultSslConfiguration.setCiphers(strongCiphers)
33 QSslConfiguration.setDefaultConfiguration(defaultSslConfiguration) 33 QSslConfiguration.setDefaultConfiguration(defaultSslConfiguration)

eric ide

mercurial