I am able to retrieve the public key contents from a cert file using openssl by following the link http://fm4dd.com/openssl/certpubkey.htm
However, it prints the public key to stdout. I want to be able to store it in a string . Is there a way to get it into a char buffer or a string ?
The line PEM_write_bio_PUBKEY(outbio, pkey) prints to stdout.
Searched quite a bit, wasnt able to get what I wanted.
Any help will be appreciated, better if the code sample is provided as I'm running out of time.
Thanks in advance.