> To: python-list@python.org
> From: li...@cheimes.de
> Subject: Re: Localhost client-server simple ssl socket test program problems
> Date: Thu, 15 Dec 2011 20:45:43 +0100
> 
> 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
>>>>>> >>>I generate the server private key with "openssl genrsa -out mypha.key 
>>>>>> >>>2048".>>>But this seems the standard command to do it.>>>How do I get 
>>>>>> >>>the private key without encrypted ?>>>Or should I always do this and 
>>>>>> >>>encrypt it again to get it decrypted ?>>>If I use the encrypted key 
>>>>>> >>>and .csr to produce my certificate will that be different from 
>>>>>> >>>decrypted key?>>>Thanks.>>>Kay>>>
>    openssl rsa -in /etc/home/ckyang/PHA/testsslsocket/mypha.key -out
> /etc/home/ckyang/PHA/testsslsocket/mypha-nopasswd.key
> 
> Christian
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list
                                          
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to