Hi,

I need to verify a message digest and its signature with a X.509 certificate. As far as I known, the procedure may looks like this:
pubkey = X509_get_pubkey(x);
rsa = EVP_PKEY_get1_RSA(pkey);
RSA_public_decrypt(signature_len, signature, rsa_out, rsa, pad);
memcmp(rsa_out, message_digest, message_digest_len);

but this procedure is too algorithm centric, it only applies while the x.509 certificate contains a RSA public key. Is there any algorithm independent functions which can be applied to not only RSA but also any asymmetric encryption algorithm supported by openssl, ie. ECC or DSA?

Thanks very much!

Best regards,

   Zhuang Yuyao
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    openssl-users@openssl.org
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to