def startSSL(self, sock):
        if not self.doSSL:
            return sock
        if self.caCerts:
            # If cert checking is requested use m2crypto
            if SSL:
                return startSSLWithChecker(sock, self.caCerts, self.commonName)
            else:
                warnings.warn("m2crypto is not installed; server certificates "
                        "will not be validated!")
        try:
            # Python >= 2.6
            import ssl
            return ssl.SSLSocket(sock)
        except ImportError:
            # Python < 2.6
            sslSock = socket.ssl(sock, None, None)
            return httplib.FakeSocket(sock, sslSock)
The children for this page.
dataset/ETHPy150Open sassoftware/conary/conary/lib/http/connection.py/Connection.startSSL--crossover with--dataset/ETHPy150Open lektor/lektor-archive/lektor/pagination.py/Pagination.items