Example #1
0
 def server(sock):
     conn, addr = sock.accept()
     sslsock = SSLSocket(conn, server_side=True,
                      keyfile='server.pem', certfile='server.pem')
     cb.append(sslsock.get_channel_binding())
     buf = sslsock.read()
     data.append(buf)
     conn = sslsock.unwrap()
     conn.close()
Example #2
0
 def server(sock):
     conn, addr = sock.accept()
     sslsock = SSLSocket(conn, server_side=True,
                           dhparams=dhparams, ciphers='ADH+AES')
     buf = sslsock.read()
     data.append(buf)
     ciphers.append(sslsock.cipher())
     cb.append(sslsock.get_channel_binding())
     conn = sslsock.unwrap()
     conn.close()
Example #3
0
 def client(sock, addr):
     sock.connect(addr)
     sslsock = SSLSocket(sock, ciphers='ADH+AES')
     sslsock.write('foo')
     data.append('foo')
     ciphers.append(sslsock.cipher())
     cb.append(sslsock.get_channel_binding())
     sslsock.unwrap()
Example #4
0
 def client(sock, addr):
     sock.connect(addr)
     sslsock = SSLSocket(sock)
     cb.append(sslsock.get_channel_binding())
     sslsock.write('foo')
     data.append('foo')
     sslsock.unwrap()