Jeremy Harris jgh at wizmail.org
Thu Jun 13 14:07:21 UTC 2019

[OpenSSL 1.1.1b FIPS   on Fedora 29]

What can a return code <= 0 from EVP_DigestSign(),
with  ERR_peek_error() return of 0,
be caused by?

ERR_error_string() decodes the 0 as "00000000:lib(0):func(0):reason(0)"
(assuming the ERR_peek_error(), ERR_get_error() sequence is not
lying to me) which is not very helpful.  OTOH, ERR_get_error()
docs says that 0 means "no error" - so why the fail return from
the EVP call?

The call was: EVP_DigestSign(ctx, NULL, &siglen, NULL, 0)
- i.e. I'm asking for the siglen, so that I can allocate memory
for the sig.

More information about the openssl-users mailing list