Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(10)  |  Call(8)  |  Derive(0)  |  Import(2)

src/g/r/gruvi-0.9.2/tests/test_ssl.py   gruvi(Download)
 
import gruvi
from gruvi.ssl import SSLPipe, SSL
from gruvi.stream import StreamClient, StreamServer
from support import *
        def make_ssl_client(transport, error):
            serverssl = gruvi.ssl.SSL(server_side=True, keyfile=self.certname,
                                      certfile=self.certname, do_handshake_on_connect=False)
            transport.accept(serverssl)
            serverssl.do_handshake(server_handshake_complete)
        addr = lsock.getsockname()
        lsock.listen(make_ssl_client)
        clientssl = gruvi.ssl.SSL()
        clientssl.connect(addr, client_write)
        done.wait()
        def make_ssl_client(transport, error):
            serverssl = gruvi.ssl.SSL(server_side=True, keyfile=self.certname,
                                      certfile=self.certname, do_handshake_on_connect=False)
            transport.accept(serverssl)
            serverssl.start_read(server_read)
        addr = lsock.getsockname()
        lsock.listen(make_ssl_client)
        clientssl = gruvi.ssl.SSL(do_handshake_on_connect=False)
        clientssl.connect(addr, on_client_connect)
        done.wait()

src/g/r/gruvi-HEAD/tests/test_ssl.py   gruvi(Download)
 
import gruvi
from gruvi.ssl import SSLPipe, SSL
from gruvi.stream import StreamClient, StreamServer
from support import *
        def make_ssl_client(transport, error):
            serverssl = gruvi.ssl.SSL(server_side=True, keyfile=self.certname,
                                      certfile=self.certname, do_handshake_on_connect=False)
            transport.accept(serverssl)
            serverssl.do_handshake(server_handshake_complete)
        addr = lsock.getsockname()
        lsock.listen(make_ssl_client)
        clientssl = gruvi.ssl.SSL()
        clientssl.connect(addr, client_write)
        done.wait()
        def make_ssl_client(transport, error):
            serverssl = gruvi.ssl.SSL(server_side=True, keyfile=self.certname,
                                      certfile=self.certname, do_handshake_on_connect=False)
            transport.accept(serverssl)
            serverssl.start_read(server_read)
        addr = lsock.getsockname()
        lsock.listen(make_ssl_client)
        clientssl = gruvi.ssl.SSL(do_handshake_on_connect=False)
        clientssl.connect(addr, on_client_connect)
        done.wait()