From: Ezra Peisach Date: Tue, 25 May 2004 18:06:13 +0000 (+0000) Subject: * aes.c (krb5int_aes_encrypt): Signed/unsigned warning fix X-Git-Tag: krb5-1.4-beta1~401 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=998285f6f07bf9348062b62752a0147252dc2e6e;p=krb5.git * aes.c (krb5int_aes_encrypt): Signed/unsigned warning fix git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16359 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/crypto/enc_provider/ChangeLog b/src/lib/crypto/enc_provider/ChangeLog index f27a6c356..c898e6479 100644 --- a/src/lib/crypto/enc_provider/ChangeLog +++ b/src/lib/crypto/enc_provider/ChangeLog @@ -1,3 +1,7 @@ +2004-05-25 Ezra Peisach + + * aes.c (krb5int_aes_encrypt): Signed/unsigned warning fix. + 2004-02-09 Ken Raeburn * aes.c (krb5int_aes_encrypt, krb5int_aes_decrypt): Copy out value diff --git a/src/lib/crypto/enc_provider/aes.c b/src/lib/crypto/enc_provider/aes.c index 2bbddddd9..45019692d 100644 --- a/src/lib/crypto/enc_provider/aes.c +++ b/src/lib/crypto/enc_provider/aes.c @@ -12,6 +12,7 @@ aes_rval aes_dec_blk(const unsigned char in_blk[], unsigned char out_blk[], cons #define CHECK_SIZES 0 +#if 0 static void printd (const char *descr, krb5_data *d) { int i, j; const int r = 16; @@ -34,6 +35,8 @@ static void printd (const char *descr, krb5_data *d) { } printf("\n"); } +#endif + #define enc(OUT, IN, CTX) (aes_enc_blk((IN),(OUT),(CTX)) == aes_good ? (void) 0 : abort()) #define dec(OUT, IN, CTX) (aes_dec_blk((IN),(OUT),(CTX)) == aes_good ? (void) 0 : abort()) @@ -68,7 +71,7 @@ krb5int_aes_encrypt(const krb5_keyblock *key, const krb5_data *ivec, /* XXX Used for DK function. */ enc(output->data, input->data, &ctx); } else { - int nleft; + unsigned int nleft; for (blockno = 0; blockno < nblocks - 2; blockno++) { xorblock(tmp, input->data + blockno * BLOCK_SIZE); @@ -123,7 +126,6 @@ krb5int_aes_decrypt(const krb5_keyblock *key, const krb5_data *ivec, abort(); dec(output->data, input->data, &ctx); } else { - int nleft; for (blockno = 0; blockno < nblocks - 2; blockno++) { dec(tmp2, input->data + blockno * BLOCK_SIZE, &ctx);