From: Marc Kleine-Budde Date: Sat, 26 Mar 2016 22:58:53 +0100 Subject: [PATCH] libimaevm: use SHA_DIGEST_LENGTH instead of open coding it Signed-off-by: Marc Kleine-Budde --- src/libimaevm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libimaevm.c b/src/libimaevm.c index 8fc23be08bd7..b6c328801708 100644 --- a/src/libimaevm.c +++ b/src/libimaevm.c @@ -379,7 +379,7 @@ int verify_hash_v1(const char *file, const unsigned char *hash, int size, SHA_CTX ctx; unsigned char out[1024]; RSA *key; - unsigned char sighash[20]; + unsigned char sighash[SHA_DIGEST_LENGTH]; struct signature_hdr *hdr = (struct signature_hdr *)sig; log_info("hash-v1: "); @@ -744,7 +744,7 @@ int sign_hash_v1(const char *hashalgo, const unsigned char *hash, int size, cons unsigned char pub[1024]; RSA *key; char name[20]; - unsigned char sighash[20]; + unsigned char sighash[SHA_DIGEST_LENGTH]; struct signature_hdr *hdr; uint16_t *blen;