Re: crypto: return codes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2010-10-09 at 09:29 +0800, Herbert Xu wrote:
> Mimi Zohar <zohar@xxxxxxxxxxxxxxxxxx> wrote:
> > Hi,
> > 
> > Looking at different examples of the same crypto call, it's unclear
> > whether it only returns negative error values. Some examples only test
> > for negative values, while others test for not 0. tcrypt.c does "if
> > (ret)".  Would appreciate some clarification.
> 
> Unless the call can return positive values then it makes no
> difference.  Which particular call are you talking about?
> 
> Cheers,

Just to name a few: crypto_hash_init(), crypto_hash_update(),
crypto_hash_final(). Also crypto_blkcipher_decrypt/encrypt().  Would be
nice to know definitively that they return < 0 on error and 0 for
success.

thanks!

Mimi

--
To unsubscribe from this list: send the line "unsubscribe linux-crypto" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux