I am trying to sign data using DSA. My code fails on
EVP_SignFinal(). It fails on line 92 in p_sign.c . I think there
is something wrong with the way I created EVP_MD_CTX structure
for EVP_SignInit(). Any help is appreciated. Here is my code
#include
#include
#include
#include
int main(int
> You need to use EVP_dss1() for the digest which is SHA1 with DSS for
> singing. Check out:
>
> http://www.openssl.org/docs/crypto/EVP_SignInit.html
> http://www.openssl.org/docs/crypto/EVP_DigestInit.html
that got me farther than before, but EVP_SignFinal() dumps core. Maybe
I am generating th
ignore this...
the problem was a result of the DSA_generate_key() not being called
changed
if( !dsa && !DSA_generate_key(dsa) )
{
printf("Can't generate DSA keys\n");
return 0;
}
to
if( !dsa || !DSA_generate_key(dsa) )
{
printf("Can't generate DSA keys\n");