示例#1
0
    def accept(self):
        """Accepts a new connection from a remote client, and returns
        a tuple containing that new connection wrapped with a server-side
        SSL channel, and the address of the remote client."""

        newsock, addr = socket.accept(self)
        newsock = self.context.wrap_socket(newsock,
                                           do_handshake_on_connect=self.do_handshake_on_connect,
                                           suppress_ragged_eofs=self.suppress_ragged_eofs,
                                           server_side=True)
        return newsock, addr
示例#2
0
    def accept(self):
        """Accepts a new connection from a remote client, and returns
        a tuple containing that new connection wrapped with a server-side
        SSL channel, and the address of the remote client."""

        newsock, addr = socket.accept(self)
        newsock = self._context.wrap_socket(newsock,
                                            do_handshake_on_connect=self.do_handshake_on_connect,
                                            suppress_ragged_eofs=self.suppress_ragged_eofs,
                                            server_side=True)
        return newsock, addr
示例#3
0
 def accept(self):
     """Accepts a new connection from a remote client, and returns
     a tuple containing that new connection wrapped with a server-side
     SSL channel, and the address of the remote client."""
     newsock, addr = socket.accept(self)
     return (SSLSocket(newsock._sock,
                       keyfile=self.keyfile,
                       certfile=self.certfile,
                       server_side=True,
                       cert_reqs=self.cert_reqs,
                       ssl_version=self.ssl_version,
                       ca_certs=self.ca_certs,
                       do_handshake_on_connect=self.do_handshake_on_connect,
                       suppress_ragged_eofs=self.suppress_ragged_eofs,
                       ciphers=self.ciphers), addr)
示例#4
0
文件: ssl.py 项目: strogo/pylibs
 def accept(self):
     """Accepts a new connection from a remote client, and returns
     a tuple containing that new connection wrapped with a server-side
     SSL channel, and the address of the remote client."""
     newsock, addr = socket.accept(self)
     return (SSLSocket(newsock._sock,
                       keyfile=self.keyfile,
                       certfile=self.certfile,
                       server_side=True,
                       cert_reqs=self.cert_reqs,
                       ssl_version=self.ssl_version,
                       ca_certs=self.ca_certs,
                       do_handshake_on_connect=self.do_handshake_on_connect,
                       suppress_ragged_eofs=self.suppress_ragged_eofs),
             addr)
示例#5
0
 def accept(self):
     sock, addr = socket.accept(self)
     client = SSLObject(sock._sock, server_side=True)
     client.do_handshake()
     return client, addr
示例#6
0
 def accept(self):
     sock, addr = socket.accept(self)
     client = SSLObject(sock._sock, server_side=True)
     client.do_handshake()
     return client, addr