Ejemplo n.º 1
0
 def test_ssl_socket_invalid_arguments(self):
     from acme.crypto_util import SSLSocket
     with self.assertRaises(ValueError):
         _ = SSLSocket(None, {'sni': ('key', 'cert')},
                       cert_selection=lambda _: None)
     with self.assertRaises(ValueError):
         _ = SSLSocket(None)
Ejemplo n.º 2
0
 def server_bind(self):  # pylint: disable=missing-docstring
     self.socket = SSLSocket(socket.socket(), certs=certs)
     socketserver.TCPServer.server_bind(self)