aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2017-05-24 16:17:04 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2017-05-24 16:17:04 +0200
commit6214c6e185179a9203fae00e48eeee0e43dadd59 (patch)
treede5390b7efc41e48a695c71f83e13470d5692b42
parent8b31f5c324fac1296d0a89fc42f4e86046d28970 (diff)
downloadmitmproxy-6214c6e185179a9203fae00e48eeee0e43dadd59.tar.gz
mitmproxy-6214c6e185179a9203fae00e48eeee0e43dadd59.tar.bz2
mitmproxy-6214c6e185179a9203fae00e48eeee0e43dadd59.zip
fix openssl cipher_list bytes/str deprecation
-rw-r--r--mitmproxy/net/tcp.py2
-rw-r--r--test/mitmproxy/net/test_tcp.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/net/tcp.py b/mitmproxy/net/tcp.py
index cdac4cd5..12cf7337 100644
--- a/mitmproxy/net/tcp.py
+++ b/mitmproxy/net/tcp.py
@@ -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))
diff --git a/test/mitmproxy/net/test_tcp.py b/test/mitmproxy/net/test_tcp.py
index 234e8afb..adf8701a 100644
--- a/test/mitmproxy/net/test_tcp.py
+++ b/test/mitmproxy/net/test_tcp.py
@@ -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):