I am trying to use some ruby library code to sign some material with
my private key,. and I am encountering an error.
I have a private key as part of my SSL credentials from GoDaddy.com.
I try key = OpenSSL::PKey::RSA.new(file.read) where key is the File
holding my private key
I get OpenSSL::PKey::RSAError: Neither PUB key nor PRIV key:: header
too long
the first line of the .key file is
-----BEGIN RSA PRIVATE KEY-----
The key works fine at my service provide - along with my .crt, HTTPS
works and IE and FF recognize the credentials.
Any idea what might be wrong ?
I do notice that if I print out the file in irb, there are \n
characters at the end of each line . However, I don’t think that
should be a problem.