mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
fix openssl cipher_list bytes/str deprecation
This commit is contained in:
parent
8b31f5c324
commit
6214c6e185
@ -502,7 +502,7 @@ class _Connection:
|
||||
# Cipher List
|
||||
if cipher_list:
|
||||
try:
|
||||
context.set_cipher_list(cipher_list)
|
||||
context.set_cipher_list(cipher_list.encode())
|
||||
context.set_tmp_ecdh(OpenSSL.crypto.get_elliptic_curve('prime256v1'))
|
||||
except SSL.Error as v:
|
||||
raise exceptions.TlsException("SSL cipher specification error: %s" % str(v))
|
||||
|
@ -391,7 +391,7 @@ class TestSNI(tservers.ServerTestBase):
|
||||
class TestServerCipherList(tservers.ServerTestBase):
|
||||
handler = ClientCipherListHandler
|
||||
ssl = dict(
|
||||
cipher_list=b'AES256-GCM-SHA384'
|
||||
cipher_list='AES256-GCM-SHA384'
|
||||
)
|
||||
|
||||
def test_echo(self):
|
||||
|
Loading…
Reference in New Issue
Block a user