Jamis Buck wrote: > OpenSSL question: > > I know you can create new keys easily using Ruby's OpenSSL module: > > require 'openssl' > > key = OpenSSL::PKey::DSA.new( 1024 ) > > However, is there a way to generate a new key that is protected by a > passphrase? I've picked through the ossl source code and don't see an > obvious answer to this question, so I figure it's either not possible, > or the procedure for doing it is non-obvious. > > Thanks for any advice! > > - Jamis > Duh. It always happens that way. I get desperate, ask the question, and then discover the answer: require 'openssl' key = OpenSSL::PKey::DSA.new( 1024 ) puts key.export( OpenSSL::Cipher::DES.new, "howdy howdy" ) *sigh* Sorry for the noise. -- Jamis Buck jgb3 / email.byu.edu http://www.jamisbuck.org/jamis "I use octal until I get to 8, and then I switch to decimal."