From e10cc0b3330d4dd72fef076a7f1b2b67cb271a12 Mon Sep 17 00:00:00 2001 From: Jean-Christophe PLAGNIOL-VILLARD Date: Wed, 25 Mar 2015 12:56:13 +0100 Subject: digest: allow algo to specify their length at runtime such as RSA as we load a DER key we will detect the key size at runtime and so the algo length. Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Sascha Hauer --- crypto/digest.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'crypto') diff --git a/crypto/digest.c b/crypto/digest.c index 047131b537..f902dc1fb1 100644 --- a/crypto/digest.c +++ b/crypto/digest.c @@ -78,8 +78,7 @@ int digest_generic_digest(struct digest *d, const void *data, int digest_algo_register(struct digest_algo *d) { - if (!d || !d->name || !d->update || !d->final || !d->verify || - d->length < 1) + if (!d || !d->name || !d->update || !d->final || !d->verify) return -EINVAL; if (!d->init) -- cgit v1.2.3