On Thu, 2006-07-06 at 15:45 +0200, Martin Langer wrote:
> + tfm = crypto_alloc_tfm("md5", 0);
> + if (tfm == NULL)
> + return -1;
That's all fine and dandy, but how about including a Kconfig option
instead that makes it rely on the md5sum code?
> + crypto_digest_init(tfm);
> + crypto_digest_update(tfm, sg, 1);
> + crypto_digest_final(tfm, signature);
> + crypto_free_tfm(tfm);
None of these functions can return an error?
I also don't like your handling of the struct scatterlist. IMHO you
should only declare one
struct scatterlist sg;
and use &sg, instead of sg_set_buf you should use sg_init_one, and
change the following:
crypto_digest_update(tfm, sg, 1);
to
crypto_digest_update(tfm, &sg, 1);
johannes
signature.asc
Description: This is a digitally signed message part
