diff --git a/crypto/digest.c b/crypto/digest.c index b3f514c8a..a90e4ff79 100644 --- a/crypto/digest.c +++ b/crypto/digest.c @@ -172,7 +172,7 @@ EXPORT_SYMBOL_GPL(digest_free); int digest_file_window(struct digest *d, const char *filename, unsigned char *hash, - unsigned char *sig, + const unsigned char *sig, ulong start, ulong size) { ulong len = 0; @@ -249,8 +249,8 @@ out: EXPORT_SYMBOL_GPL(digest_file_window); int digest_file(struct digest *d, const char *filename, - unsigned char *hash, - unsigned char *sig) + unsigned char *hash, + const unsigned char *sig) { struct stat st; int ret; @@ -265,8 +265,8 @@ int digest_file(struct digest *d, const char *filename, EXPORT_SYMBOL_GPL(digest_file); int digest_file_by_name(const char *algo, const char *filename, - unsigned char *hash, - unsigned char *sig) + unsigned char *hash, + const unsigned char *sig) { struct digest *d; int ret; diff --git a/include/digest.h b/include/digest.h index 7f8d696eb..7c6711b32 100644 --- a/include/digest.h +++ b/include/digest.h @@ -68,14 +68,14 @@ void digest_free(struct digest *d); int digest_file_window(struct digest *d, const char *filename, unsigned char *hash, - unsigned char *sig, + const unsigned char *sig, ulong start, ulong size); int digest_file(struct digest *d, const char *filename, - unsigned char *hash, - unsigned char *sig); + unsigned char *hash, + const unsigned char *sig); int digest_file_by_name(const char *algo, const char *filename, - unsigned char *hash, - unsigned char *sig); + unsigned char *hash, + const unsigned char *sig); static inline int digest_init(struct digest *d) {