.
I'm new to Crypto++, this group and cryptography in particular. I am trying to open a password protected pkcs12 file, which has the private and public keys. I'd like to extract the public and private keys for signing data with RSA or ECDSA.
For example, I'm trying to figure out the equivalent of the following ...
openssl pkcs12 -in mycerts.pfx -password pass:"${pw}" -nocerts -nodes | openssl rsa > private.key
and ...
openssl pkcs12 -in mycerts.pfx -password pass:"${pw}" -clcerts -nokeys | openssl x509 -pubkey -noout > public.key
finally ...
# sign some data
openssl dgst message.txt > hash.txt
openssl dgst -hex -sign private.key hash.txt
openssl smime -sign -inkey private.key -signer public.key -in message.txt
Any help and/or advice on this would be greatly appreciated, so thank you in advance for taking the time to help me out.
.