python 2.7 SSL to fetch servers notAfter date

2013-09-19 Thread Bryan Irvine
I'm trying to connect to an SSL application using client certs to grab the remote certs notAfter time. When I connect using 'openssl s_client' and pass my client cert/key I can see it in the cert chain, but when I attempt to use get_peer_certificate() in python (2.7) I only get a blank dict and

os.system() question

2009-10-19 Thread Bryan Irvine
I'm a python n00b and so pardon me in advance if this is really stupid question. I have my suspicions but why does the following not work the way I'm anticipating it will? (python 2.4.4) >>> import os >>> if (os.system('echo test')): ...print 'success' ... else: ...print 'failed' ... tes