Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17311 > unrolled thread

Re: Localhost client-server simple ssl socket test program problems

Started byChristian Heimes <lists@cheimes.de>
First post2011-12-15 20:45 +0100
Last post2011-12-15 20:45 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Localhost client-server simple ssl socket test program problems Christian Heimes <lists@cheimes.de> - 2011-12-15 20:45 +0100

#17311 — Re: Localhost client-server simple ssl socket test program problems

FromChristian Heimes <lists@cheimes.de>
Date2011-12-15 20:45 +0100
SubjectRe: Localhost client-server simple ssl socket test program problems
Message-ID<mailman.3696.1323978366.27778.python-list@python.org>
Am 15.12.2011 20:09, schrieb Yang Chun-Kai:
> Server side error:
> 
> File "views.py", line 17, in <module>
> connstream = ssl.wrap_socket(newsocket, server_side=True,
> certfile="/etc/home/ckyang/PHA/testsslsocket/mypha.crt",
> keyfile="/etc/home/ckyang/PHA/testsslsocket/mypha.key",
> ssl_version=ssl.PROTOCOL_SSLv23)
>   File "/usr/lib/python2.7/ssl.py", line 344, in wrap_socket
>     ciphers=ciphers)
>   File "/usr/lib/python2.7/ssl.py", line 119, in __init__
>     ciphers)
> ssl.SSLError: [Errno 336265218] _ssl..c:347: error:140B0002:SSL
> routines:SSL_CTX_use_PrivateKey_file:system lib

This error is most likely caused by an encrypted private key. Python's
SSL lib doesn't support encrypted private keys for sockets. You can
encrypt the private key with

   openssl rsa -in /etc/home/ckyang/PHA/testsslsocket/mypha.key -out
/etc/home/ckyang/PHA/testsslsocket/mypha-nopasswd.key

Christian

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web