Before anybody blasts me, I just noticed a previous post on this subject :)
EVP_PKEY *509_get_pubkey(cert)
Looks like it will work. I'll try that. But my second question holds, is this the right way to do the sig verification, or is there another or better way?
_____________________________________________
From: Edward Chan
Sent: Saturday, July 23, 2005 10:25 AM
To: 'openssl-users@openssl.org'
Subject: Getting public key out of an X509 object
Can someone point me to how I can get the public key out of an X509 object? Basically, what I am trying to achieve is to sign something using the EVP interface and either a DSA or RSA private key, where the associated public key is in the cert. So now I want to get the public key out of the cert to verify the signature, again using the EVP interface. Am I going about this the right way? Or is there another set of API's that I should use that deal directly with the X509* instead?
Thanks,
Ed