Collin Funk <[email protected]> writes:

> Second, I used xalloc-die as a conditional dependency. This is because
> the EVP functions are documented as returning 0 on failure. In practice,
> I can only see this being the case for EVP_MD_CTX_create, but that
> should be rare (e.g. OOM). I would rather not change the prototypes to
> be different than the other digests in Gnulib, so there is no way to
> return errors back to the caller. This shouldn't matter for Coreutils,
> but calling abort in libraries is not great, in my opinion. Using
> xalloc_die is only slightly more friendly.

I think this is deeply problematic -- I haven't needed SHA3 in any
library so far, but it is a question of time.  And libraries shouldn't
have to use gnulib's xalloc-die.  What is the actual problem here?  Is
it that the gnulib APIs doesn't provide a way to signal an error, but
the OpenSSL API have it?  Then I think we should modify the gnulib API
to be able to signal an error.  That seems like the proper solution to
me, even if error handling often is a pain.

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to