open a file in python
Piet van Oostrum
piet at cs.uu.nl
Wed Jul 29 13:26:26 EDT 2009
>>>>> jayshree <jayshree06comp at gmail.com> (j) wrote:
>>> The Exact Problem is how to use the key containing by .pem file for
>>> 'encryption' . can i print the contents of the .pem file
I have already answered this question in a previous thread. It is not
very helpful if you repeat asking the same or similar questions in
different threads, especially if you don't take notice of the answers
given. I will repeat it once here:
load_pub_key requires a file name, not the contents of the file.
So use rsa = M2Crypto.RSA.load_pub_key('my_key.public.pem') and leave
the open line out.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list
mailing list