Skip to content
Snippets Groups Projects
Commit b6517b9c authored by Nicolas KAROLAK's avatar Nicolas KAROLAK
Browse files

test_ssl: fix ssl context protocol

parent ab972785
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ for s, d in conf_servers: ...@@ -50,7 +50,7 @@ for s, d in conf_servers:
try: try:
# further tests # further tests
conn = ssl.create_connection((v, 443)) conn = ssl.create_connection((v, 443))
context = ssl.SSLContext() context = ssl.SSLContext(ssl.PROTOCOL_TLS)
sock = context.wrap_socket(conn, server_hostname=v) sock = context.wrap_socket(conn, server_hostname=v)
cert = ssl.DER_cert_to_PEM_cert(sock.getpeercert(True)) cert = ssl.DER_cert_to_PEM_cert(sock.getpeercert(True))
x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert) x509 = OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM, cert)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment