views:

23

answers:

1

I'm using Python's ssl library with an encrypted keyfile. However every time I wrap a socket, I'm prompted for the passphrase.

Enter PEM pass phrase:

How can I give the passphrase just once, and have Python hold the decrypted key open for the lifetime of the process?

I'm very interested in the canonical openssl command line or C equivalent for this functionality also (assuming it assists in this situation).

I'd rather not resort to using subprocess and explicitly decoding/deleting the decrypted key. However if there is no alternative, a clean, secure suggestion guaranteeing the destruction and privacy of the decrypted key is welcome.

A: 

This issue is fixed in Python 2.7, and Python 3.2.

Matt Joiner