but I tried md = EVP_get_digestbynid(NID_md5), still NULL
On Thu, Mar 14, 2013 at 11:54 AM, Viktor Dukhovni < [email protected]> wrote: > On Thu, Mar 14, 2013 at 11:34:12AM +0800, cellecial wrote: > > > I'm frustrated that I can't get correct result from such a simple API(on > > openssl 1.0.1c),just like below. > > > > md = EVP_get_digestbynid(NID_ecdsa_with_SHA256); //NID_md5 > > This is because ECDSA-WITH-SHA256 is a signature algorithm, and not > a digest algorithm like MD5, SHA1, ... > > > Or it's just a misuse. Am I missing something? > > Yes: EVP_SignInit != EVP_DigestInit. Consult both manpages. > > -- > Viktor. > ______________________________________________________________________ > OpenSSL Project http://www.openssl.org > User Support Mailing List [email protected] > Automated List Manager [email protected] >
