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


Groups > comp.lang.python > #17314

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

From Christian Heimes <lists@cheimes.de>
Subject Re: Localhost client-server simple ssl socket test program problems
Date 2011-12-15 21:19 +0100
References <jcdip7$8dk$1@dough.gmane.org> <BAY156-W17A89F96726AC200EA8026B3A30@phx.gbl>
Newsgroups comp.lang.python
Message-ID <mailman.3699.1323981275.27778.python-list@python.org> (permalink)

Show all headers | View raw


Am 15.12.2011 21:09, schrieb Yang Chun-Kai:
> Thanks for tips.
> 
> But I dont understand one thing is if Python's SSL lib doesn't support
> encrypted private keys for sockets.
> 
> Then why should we "encrypt" the private key with "openssl rsa -in
> /etc/home/ckyang/PHA/testsslsocket/mypha.key -out  
> 
> /etc/home/ckyang/PHA/testsslsocket/mypha-nopasswd.key" again?
> 
> Shouldn't that be decrypted?
> 
> And also this solution is not the right one , I use mypha-nopasswd.key
> replace the original one, still not work.

IIRC the command should decrypt the key. Did it prompt for a password?

The error could be caused by other issues. For example the key and cert
must be in PEM Format. The PKS#12 isn't supported. I'm not sure if
Python's builtin SSL module loads DER certs.

You may also missing a valid CA cert chain. Python 2.x's SSL module
doesn't support cert directories so you have to provide a chain file.
The certs in the chain file must be in the right order, too.

Christian

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web