| Reply | « Previous Thread | Next Thread » |
|
Hi
![]() Does anyone has a working ssl client socket example? Kind regards Mads |
| madsbjoern |
| View Public Profile |
| Find all posts by madsbjoern |
|
Quote:
Code:
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('www.verisign.com', 443))
ssl_sock = socket.ssl(s)
# Set a simple HTTP request -- use httplib in actual code.
ssl_sock.write("""GET / HTTP/1.0\r
Host: www.verisign.com\r\n\r\n""")
# Read a chunk of data. Will not necessarily
# read all the data returned by the server.
data = ssl_sock.read()
# Note that you need to close the underlying socket, not the SSL object.
del ssl_sock
s.close()
|
| madsbjoern |
| View Public Profile |
| Find all posts by madsbjoern |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| What are the differences between different SSL Providers? | zorpian | Wired and Wireless interfaces | 0 | 2006-12-01 10:13 |
| Nokia 6600 IMAP client with unsigned SSL certificates | ville_vaten | Symbian Networking & Messaging | 1 | 2004-03-02 14:26 |