From e79dd1356bec312af8aee6093dfddea0c978ebbd Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Thu, 20 Apr 2006 04:24:48 +0000 Subject: [PATCH] shsUpdate should take an unsigned int for length Update shsUpdate to take an unsigned int length instead of signed. The code already assumes that it is an integer >= 0. This change cleans up a number of signed/unsigned warnings. sha1/shs.h, shs.c, t_shs.c: change ints to unsigned int dk/dk_encrypt.c: static function trunc_hmac change a signed int to unsigned hash_provider/hash_sha1.c: Remove cast in argument to shsUpdate ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@17945 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/dk/dk_encrypt.c | 2 +- src/lib/crypto/hash_provider/hash_sha1.c | 2 +- src/lib/crypto/sha1/shs.c | 2 +- src/lib/crypto/sha1/shs.h | 2 +- src/lib/crypto/sha1/t_shs3.c | 8 ++++---- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/lib/crypto/dk/dk_encrypt.c b/src/lib/crypto/dk/dk_encrypt.c index 2431e61c8..dfa7e07da 100644 --- a/src/lib/crypto/dk/dk_encrypt.c +++ b/src/lib/crypto/dk/dk_encrypt.c @@ -191,7 +191,7 @@ krb5int_aes_encrypt_length(const struct krb5_enc_provider *enc, static krb5_error_code trunc_hmac (const struct krb5_hash_provider *hash, - const krb5_keyblock *ki, int num, + const krb5_keyblock *ki, unsigned int num, const krb5_data *input, const krb5_data *output) { size_t hashsize; diff --git a/src/lib/crypto/hash_provider/hash_sha1.c b/src/lib/crypto/hash_provider/hash_sha1.c index 2ee56ad21..5fbea6a9c 100644 --- a/src/lib/crypto/hash_provider/hash_sha1.c +++ b/src/lib/crypto/hash_provider/hash_sha1.c @@ -40,7 +40,7 @@ k5_sha1_hash(unsigned int icount, const krb5_data *input, shsInit(&ctx); for (i=0; i