adds set_ciphers to context

This commit is contained in:
Moisés Guimarães
2016-12-05 19:47:00 -03:00
parent 368f2baf88
commit 52eb0becf0
3 changed files with 22 additions and 2 deletions

View File

@@ -125,6 +125,8 @@ class TestSSLContext(unittest.TestCase):
def test_context_creation(self):
self.assertIsNotNone(self.ctx)
def test_verify_mode(self):
self.assertEqual(self.ctx.verify_mode, self.provider.CERT_NONE)
self.ctx.verify_mode = self.provider.CERT_OPTIONAL
@@ -133,6 +135,9 @@ class TestSSLContext(unittest.TestCase):
self.ctx.verify_mode = self.provider.CERT_REQUIRED
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")
def test_load_cert_chain_raises(self):
self.assertRaises(TypeError, self.ctx.load_cert_chain, None)