def runTest(self, server, test, sslVer):
        time.sleep(self.opt.pause)

        try:
            sslVer = test.getSSLVersion() if test.getSSLVersion() else sslVer
            ctx = SSL.Context(sslVer)
            ctx.use_privatekey_file(test.getKeyPath())
            ctx.use_certificate_chain_file(test.getPemPath())
            ctx.set_cipher_list(test.getCipherSuite())

            server.set_context(ctx)
        except (__HOLE__, SSL.Error):
            return None

        rlist = [server]
        cont = True
        while (cont):
            try:
                if (VERBOSE):
                    self.opt.log("Awaiting connection...")
                r, _, _ = select.select(rlist, [], [])
            except Exception as e:
                self.opt.log(str(e))
                break

            for conn in r:
                if (conn == server):
                    cli, _ = server.accept()
                    rlist = [cli]
                elif (conn is not None):
                    try:
                        conn.recv(1024)
                        connected = True
                    except (SSL.WantReadError, SSL.WantWriteError,
                            SSL.WantX509LookupError):
                        if (VERBOSE):
                            self.opt.log(str(e))
                        continue
                    except (SSL.ZeroReturnError, SSL.Error) as e:
                        if (VERBOSE):
                            self.opt.log(str(e))
                        connected = False
                    cont = False
                else:
                    cont = False

        try:
            cli.shutdown()
        except SSL.Error as e:
            if (VERBOSE):
                self.opt.log(str(e))

        return connected == test.getTestType()
dataset/ETHPy150Open yymax/x509test/src/TestServer.py/TestServer.runTest