Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: linux-crypto@vger.kernel.org
Subject: Re: crypto: return codes
Date: Sun, 10 Oct 2010 14:51:50 +0800	[thread overview]
Message-ID: <20101010065150.GA11552@gondor.apana.org.au> (raw)
In-Reply-To: <1286681683.2666.21.camel@localhost.localdomain>

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

      reply	other threads:[~2010-10-10  6:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101010065150.GA11552@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=zohar@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox