Bizhan Gholikhamseh (bgholikh) wrote:
Hi All,
Hello
In our development enviroment we have an image signing system. Through
some configuration we can create a pair of rsa public/private key by
the system.
The private key are kept by the system and never are release, however,
through some HTTPS API we are able to recieve public key in binary format.
I need to convert this binary format to PEM format so I can verify the
images signed by system is working correctly.
I have been trying to use base64 to convert the binary format to PEM,
openssl enc -base64 -in key.bin -out key.pem
You can try something like that
openssl rsa -inform DER -outform PEM -pubin
Bruno
Then I added the following header and trailer to the file:
-----BEGIN PUBLIC KEY-----
.......
-----END PUBLIC KEY-----
However, when I use this key for any openssl operation I get an error.
"unable to load key file"
I also ran this command on the binary file containing public key and I
got the following error:
openssl rsa -in key.pem -text -pubin
unable to load Public Key
18936:error:0906D06C:PEM routines:PEM_read_bio:no start
line:pem_lib.c:647:Expecting: PUBLIC KEY
Any help greatly appricieated.
Thanks,
Bizhan
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager majord...@openssl.org