summaryrefslogtreecommitdiff
path: root/crypto/sha4.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2015-03-17 12:53:10 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2015-03-19 07:46:22 +0100
commitec4f9699718054f2b4e49ed441f3420c257f5f26 (patch)
tree43721d010eba21f157bb3b4c053ae31c7a12fc2a /crypto/sha4.c
parent92138a77544da7ad7d880082e905c1ca8cd0c527 (diff)
downloadbarebox-ec4f9699718054f2b4e49ed441f3420c257f5f26.tar.gz
digest: add verify callback
this will allow to compare a md with the original one When calling this do not call final For RSA_SIGN verification final does not exist only verify as final will be for signing Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'crypto/sha4.c')
-rw-r--r--crypto/sha4.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/sha4.c b/crypto/sha4.c
index 1c768e720e..5c3097db4a 100644
--- a/crypto/sha4.c
+++ b/crypto/sha4.c
@@ -309,6 +309,7 @@ static struct digest_algo m384 = {
.init = digest_sha384_init,
.update = digest_sha4_update,
.final = digest_sha4_final,
+ .verify = digest_generic_verify,
.length = SHA384_SUM_LEN,
.ctx_length = sizeof(sha4_context),
};
@@ -341,6 +342,7 @@ static struct digest_algo m512 = {
.init = digest_sha512_init,
.update = digest_sha4_update,
.final = digest_sha4_final,
+ .verify = digest_generic_verify,
.length = SHA512_SUM_LEN,
.ctx_length = sizeof(sha4_context),
};