* crypto: return codes
@ 2010-10-05 20:04 Mimi Zohar
2010-10-09 1:29 ` Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: Mimi Zohar @ 2010-10-05 20:04 UTC (permalink / raw)
To: linux-crypto
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.
thanks,
Mimi
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: crypto: return codes
2010-10-05 20:04 crypto: return codes Mimi Zohar
@ 2010-10-09 1:29 ` Herbert Xu
2010-10-10 3:34 ` Mimi Zohar
0 siblings, 1 reply; 4+ messages in thread
From: Herbert Xu @ 2010-10-09 1:29 UTC (permalink / raw)
To: Mimi Zohar; +Cc: linux-crypto
Mimi Zohar <zohar@linux.vnet.ibm.com> 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,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: crypto: return codes
2010-10-09 1:29 ` Herbert Xu
@ 2010-10-10 3:34 ` Mimi Zohar
2010-10-10 6:51 ` Herbert Xu
0 siblings, 1 reply; 4+ messages in thread
From: Mimi Zohar @ 2010-10-10 3:34 UTC (permalink / raw)
To: Herbert Xu; +Cc: linux-crypto
On Sat, 2010-10-09 at 09:29 +0800, Herbert Xu wrote:
> Mimi Zohar <zohar@linux.vnet.ibm.com> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: crypto: return codes
2010-10-10 3:34 ` Mimi Zohar
@ 2010-10-10 6:51 ` Herbert Xu
0 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2010-10-10 6:51 UTC (permalink / raw)
To: Mimi Zohar; +Cc: linux-crypto
On Sat, Oct 09, 2010 at 11:34:43PM -0400, Mimi Zohar wrote:
> On Sat, 2010-10-09 at 09:29 +0800, Herbert Xu wrote:
> > Mimi Zohar <zohar@linux.vnet.ibm.com> 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.
Yes it's zero or negative.
Cheers,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-10-10 6:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-05 20:04 crypto: return codes Mimi Zohar
2010-10-09 1:29 ` Herbert Xu
2010-10-10 3:34 ` Mimi Zohar
2010-10-10 6:51 ` Herbert Xu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox