Skip to content

Instantly share code, notes, and snippets.

@GriffinHeart
Created July 30, 2015 08:10
Show Gist options
  • Save GriffinHeart/aea2989399e069a02cce to your computer and use it in GitHub Desktop.
Save GriffinHeart/aea2989399e069a02cce to your computer and use it in GitHub Desktop.
the_password = 'DO_NOT_USE_THIS_PASSWORD'
pem_key_with_password = OpenSSL::PKey::RSA.new(2048).to_pem(OpenSSL::Cipher.new('aes-256-gcm'), the_password)
loaded_key = OpenSSL::PKey::RSA.new(pem_key_with_password, the_password)
boom!
OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key: nested asn1 error
from (irb):34:in `initialize'
from (irb):34:in `new'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment