From: Remy C. C. <dev...@sm...> - 2004-03-24 07:01:06
|
On Tuesday 23 March 2004 21:16, Matthew Thorley wrote: > When using openssl from the command line to create a certificate > request I am propted for a password. I was wondering how to do the > same thing with pyOpenSSL. I looked at the example > mk_simple_cert.py and everything is clear but what I am not sure > how to do is to add a passphrase to the privatekey ? > > Can any one explain how this is done ? Havn't tried this my self yet, but if you look in the (HTML) documentation on the crypto module you can find two methods: dump_privatekey(type, pkey[, cipher, passphrase]) and load_privatekey(type, buffer[, passphrase]), where a passphrase can be entered. Also take a look at the pyOpenssl examples on generating certs and a working solution can be created ... at least that's my theory. Remy |