Hi List,
I need to sign a text using RSA-SHA1. (
http://www.w3.org/2000/09/xmldsig#rsa-sha1
<http://www.w3.org/2000/09/xmldsig#rsa-sha1> as per XML-Signature
specification http://www.w3.org/TR/xmldsig-core/)
I found a set of EVP_ functions to do this.
i.e.
EVP_SignInit (&md_ctx, EVP_sha1());
EVP_SignUpdate (&md_ctx, data, strlen(data));
siglen = sizeof(sigbuf);
err = EVP_SignFinal (&md_ctx,
sigbuf,
&siglen,
pkey);
In the above I have specified to use "SHA-1" as the digest method.
But I'm wondering where I have to specify "to sign using RSA". Does
these functions automatically decide the algorithm (e.g. DSA-SHA1,
RSA-SHA1) by inspecting the EVP_PKEY* ?
Please advice.
Thanks,
Kaushalye
______________________________________________________________________
OpenSSL Project http://www.openssl.org
User Support Mailing List openssl-users@openssl.org
Automated List Manager [EMAIL PROTECTED]