fix openssl cipher_list bytes/str deprecation

This commit is contained in:
Thomas Kriechbaumer 2017-05-24 16:17:04 +02:00
parent 8b31f5c324
commit 6214c6e185
2 changed files with 2 additions and 2 deletions

View File

@ -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))

View File

@ -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):