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

All Samples(12)  |  Call(9)  |  Derive(0)  |  Import(3)
Run an SNI-enabled server which selects between a few certificates in a
C{dict} based on the handshake request it receives from a client.

        def main():
    """
    Run an SNI-enabled server which selects between a few certificates in a
    C{dict} based on the handshake request it receives from a client.
    """
    port = socket()
    port.setsockopt(SOL_SOCKET, SO_REUSEADDR, 1)
    port.bind(('', 8443))
    port.listen(3)

    print 'Accepting...',
    stdout.flush()
    server, addr = port.accept()
    print 'accepted', addr

    server_context = Context(TLSv1_METHOD)
    server_context.set_tlsext_servername_callback(pick_certificate)

    server_ssl = Connection(server_context, server)
    server_ssl.set_accept_state()
    server_ssl.do_handshake()
    server.close()
        


src/h/u/hue-HEAD/desktop/core/ext-py/pyopenssl/examples/sni/server.py   hue(Download)
if __name__ == '__main__':
    import server
    raise SystemExit(server.main())
 
from sys import stdout

src/f/r/frankencert-HEAD/pyOpenSSL-0.13/examples/sni/server.py   frankencert(Download)
if __name__ == '__main__':
    import server
    raise SystemExit(server.main())
 
from sys import stdout

src/p/y/pyOpenSSL-0.14/examples/sni/server.py   pyOpenSSL(Download)
if __name__ == '__main__':
    import server
    raise SystemExit(server.main())
 
from sys import stdout

src/p/y/pyopenssl-HEAD/examples/sni/server.py   pyopenssl(Download)
if __name__ == '__main__':
    import server
    raise SystemExit(server.main())
 
from sys import stdout

src/y/o/youtube_dl_server-0.1/youtube_dl_server/__main__.py   youtube_dl_server(Download)
import sys
 
from .server import main
 
if __name__ == '__main__':
     sys.exit(main())

src/y/o/youtube-dl-api-server-HEAD/youtube_dl_server/__main__.py   youtube-dl-api-server(Download)
import sys
 
from .server import main
 
if __name__ == '__main__':
     sys.exit(main())

src/e/c/ec2-demo-HEAD/lib/sshuttle/main.py   ec2-demo(Download)
            o.fatal('no arguments expected')
        server.latency_control = opt.latency_control
        sys.exit(server.main())
    elif opt.firewall:
        if len(extra) != 2:

src/s/s/sshuttle-HEAD/main.py   sshuttle(Download)
            o.fatal('no arguments expected')
        server.latency_control = opt.latency_control
        sys.exit(server.main())
    elif opt.firewall:
        if len(extra) != 2:

src/p/y/PyGG2-HEAD/make.py   PyGG2(Download)
    client_main.GG2main(skipmenu=False)
elif sys.argv[1] == "testserver":
    import server.main
    server.main.GG2main()
elif sys.argv[1] == "test":