3

How do I convert a ssh-keygen public key into a format that openssl PEM_read_bio_RSA_PUBKEY() function will consume?

view full story
linux-howto

http://unix.stackexchange.com – I'm having an issue generating a public key that the openssl PEM_read_bio_RSA_PUBKEY() function can consume. I keep getting errors. Obviously I cannot simply use the ASCII string in the ssh-keygen <>.pub key file as it is in SSH file format or I perhaps SubjectPublicKeyInfo structure. Here's the key gen code: # ssh-keygen -t rsa -b 1024 -C "Test Key" I found a converter in php on the web which will convert the contents of the public key into a base64 PEM ASCII string format. However the function still doesn't like it. openssl documentation states: 1) "RSA_PUBKEY() function which proce (HowTos)