mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-01-28 02:22:45 +01:00
adds supported curves to context; fixes compatibility issues with py27
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
import unittest
|
||||
import socket
|
||||
import ssl
|
||||
# import wolfssl
|
||||
import wolfssl
|
||||
|
||||
class SSLClientTest(unittest.TestCase):
|
||||
ssl_provider = ssl
|
||||
@@ -37,14 +37,14 @@ class SSLClientTest(unittest.TestCase):
|
||||
|
||||
def test_wrap_socket(self):
|
||||
secure_sock = self.ssl_provider.wrap_socket(
|
||||
self.sock, ssl_version=ssl.PROTOCOL_SSLv23)
|
||||
self.sock, ssl_version=self.ssl_provider.PROTOCOL_SSLv23)
|
||||
secure_sock.connect((self.host, self.port))
|
||||
|
||||
secure_sock.send(b"GET / HTTP/1.1\n\n")
|
||||
self.assertEqual(b"HTTP", secure_sock.recv(4))
|
||||
secure_sock.write(b"GET / HTTP/1.1\n\n")
|
||||
self.assertEqual(b"HTTP", secure_sock.read(4))
|
||||
|
||||
secure_sock.close()
|
||||
|
||||
|
||||
#class TestWolfSSL(SSLClientTest):
|
||||
# ssl_provider = wolfssl
|
||||
class TestWolfSSL(SSLClientTest):
|
||||
ssl_provider = wolfssl
|
||||
|
||||
@@ -136,7 +136,7 @@ class TestSSLContext(unittest.TestCase):
|
||||
self.assertEqual(self.ctx.verify_mode, self.provider.CERT_REQUIRED)
|
||||
|
||||
def test_set_ciphers(self):
|
||||
self.ctx.set_ciphers("DHE-RSA-AES256-SHA256:AES256-SHA256")
|
||||
self.ctx.set_ciphers("DHE-RSA-AES256-SHA256")
|
||||
|
||||
def test_load_cert_chain_raises(self):
|
||||
self.assertRaises(TypeError, self.ctx.load_cert_chain, None)
|
||||
|
||||
Reference in New Issue
Block a user