SSL and os.system/Popen

Marek Lipert marek.lipert at gmail.com
Thu Mar 1 10:41:19 EST 2012


Hi!

I have a problem with SSL and threaded os.system (rewritten to Popen but 
still not working). First - the set-up:

I am using windows 2003 server with current python 2.6. 

When new connection comes to my server-side application, i do accept, 
and then:

self.client = 
ssl.wrap_socket(self.socket,certfile="server.crt",keyfile="server.key",ss
l_version=ssl.PROTOCOL_TLSv1,server_side=True)

It works flawlessly UNLESS another therad of this same application runs 
simultanously  os.system (or Popen) on an external exe file (which does 
not do a thing in a directory where my server is)

I then get an error 

[Errno 336265218] _ssl.c:337: error:140B0002:SSL 
routines:SSL_CTX_use_PrivateKey_file:system lib

I suspect it has something to do with filesystem locking, but why? The 
application is run by administrator and certificate files are marked as 
'full control' and all other security properties in windows (for 
everyone, not just administrator).

I would appreciate your help.

Cheers,

Mark



More information about the Python-list mailing list