By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,584 Members | 1,796 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,584 IT Pros & Developers. It's quick & easy.

SSL Server Socket Support in Python?

P: n/a

I'm trying to create a SSL-enabled server in Python, and in the doc for
the socket module:

ssl(sock[, keyfile, certfile])
Initiate a SSL connection over the socket sock. keyfile is the
name of a PEM formatted
file that contains your private key. certfile is a PEM formatted
certificate chain file.
On success, a new SSLObject is returned.

So:

listen_socket = socket.socket()
listen_socket.bind((addr, port))
listen_socket.listen(10)
s, addr = listen_socket.accept()
ssl_s = socket.ssl(s, "key.pem", "cert.pem")
socket.sslerror: (1, 'error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol')


Am I missing something?
Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.