Esempio n. 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
Esempio n. 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
Esempio n. 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)
Esempio n. 4
0
File: ssl.py Progetto: 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)
Esempio n. 5
0
 def accept(self):
     sock, addr = socket.accept(self)
     client = SSLObject(sock._sock, server_side=True)
     client.do_handshake()
     return client, addr
Esempio n. 6
0
 def accept(self):
     sock, addr = socket.accept(self)
     client = SSLObject(sock._sock, server_side=True)
     client.do_handshake()
     return client, addr