Update .DEPS.git
[chromium-blink-merge.git] / third_party / tlslite / test / twistedclient.py
blob4f6c86af363bf5f475c102b5cef23c0be3f995c4
2 from tlslite.api import *
3 import socket
5 s = socket.socket()
7 s.connect( ("localhost", 1079) )
9 """
10 #Only use this for Echo2
11 s.send("000\r\n")
12 while 1:
13 val= s.recv(100)
14 print val,
15 if val.endswith("000\r\n"):
16 break
18 s.send("STARTTLS\r\n")
19 """
21 connection = TLSConnection(s)
22 #connection.handshakeClientNoAuth()
23 connection.handshakeClientSRP("test", "password")
25 connection.send("abc\r\n")
26 print connection.recv(100),
27 print connection.recv(100),
29 connection.send("def\r\n")
30 print connection.recv(100),
32 connection.close()
33 connection.sock.close()