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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '-in': 0.05; 'subject:test': 0.05; 'skip:/ 40': 0.07; 'supported.': 0.07; 'python': 0.08; 'builtin': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'subject:problems': 0.09; 'certs': 0.16; 'iirc': 0.16; 'pem': 0.16; 'skip:/ 50': 0.16; 'subject:server': 0.16; 'key.': 0.18; "doesn't": 0.22; 'header:In- Reply-To:1': 0.22; "shouldn't": 0.23; 'command': 0.24; "python's": 0.24; 'module': 0.26; "i'm": 0.26; 'work.': 0.28; 'error': 0.29; 'example': 0.29; 'again?': 0.30; 'loads': 0.30; 'thanks': 0.31; "isn't": 0.33; 'header:User-Agent:1': 0.33; 'header:X-Complaints- To:1': 0.33; 'to:addr:python-list': 0.34; 'file.': 0.34; 'keys': 0.34; 'ssl': 0.34; 'file': 0.36; 'but': 0.37; 'could': 0.37; 'replace': 0.38; 'received:org': 0.38; 'received:de': 0.39; 'should': 0.39; 'format.': 0.39; 'why': 0.39; 'missing': 0.40; 'to:addr:python.org': 0.40; 'one,': 0.40; 'chain': 0.66; 'encrypted': 0.67; 'subject:program': 0.67; 'order,': 0.73
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Christian Heimes <lists@cheimes.de>
Subject Re: Localhost client-server simple ssl socket test program problems
Date Thu, 15 Dec 2011 21:19:14 +0100
References <jcdip7$8dk$1@dough.gmane.org> <BAY156-W17A89F96726AC200EA8026B3A30@phx.gbl>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host f049033058.adsl.alicedsl.de
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111124 Thunderbird/8.0
In-Reply-To <BAY156-W17A89F96726AC200EA8026B3A30@phx.gbl>
X-Enigmail-Version 1.4a1pre
OpenPGP id=AD16AB1B; url=http://cheimes.de/heimes.asc
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3699.1323981275.27778.python-list@python.org> (permalink)
Lines 28
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1323981275 news.xs4all.nl 6889 [2001:888:2000:d::a6]:51840
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:17314

Show key headers only | 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