summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-25 12:56:13 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-27 07:49:45 +0100
commite10cc0b3330d4dd72fef076a7f1b2b67cb271a12 (patch)
tree4122c65e03433a8936fa7f5fbb9bdfb279337e26 /crypto
parent5afec9c781406a0aa3080c9aacb17c3f75abc0aa (diff)
downloadbarebox-e10cc0b3330d4dd72fef076a7f1b2b67cb271a12.tar.gz
barebox-e10cc0b3330d4dd72fef076a7f1b2b67cb271a12.tar.xz
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 <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/digest.c3
1 files changed, 1 insertions, 2 deletions
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)