From 96bdc1cc1c171e8f5c1b490258a8ddc28d280414 Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Fri, 25 Feb 2000 17:04:16 +0000 Subject: [PATCH] * t_verify.c: Add "const" to casts in calls to mit_des_cbc_encrypt() * destest.c: Declare zeroblock as krb5_octet * instead of char * as argument to mit_des_cbc_encrypt. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12068 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/crypto/des/ChangeLog | 7 +++++++ src/lib/crypto/des/destest.c | 2 +- src/lib/crypto/des/t_verify.c | 8 ++++---- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/lib/crypto/des/ChangeLog b/src/lib/crypto/des/ChangeLog index 8d76259d4..7a2155c02 100644 --- a/src/lib/crypto/des/ChangeLog +++ b/src/lib/crypto/des/ChangeLog @@ -1,3 +1,10 @@ +2000-02-25 Ezra Peisach + + * t_verify.c: Add "const" to casts in calls to mit_des_cbc_encrypt(). + + * destest.c: Declare zeroblock as krb5_octet * instead of char * as + argument to mit_des_cbc_encrypt. + 2000-01-21 Ken Raeburn * f_sched.c (PC2_C, PC2_D): Put braces around sub-arrays. diff --git a/src/lib/crypto/des/destest.c b/src/lib/crypto/des/destest.c index 1decbe80a..21d2b7c4a 100644 --- a/src/lib/crypto/des/destest.c +++ b/src/lib/crypto/des/destest.c @@ -63,7 +63,7 @@ void convert PROTOTYPE((char *, unsigned char [])); void des_cblock_print_file PROTOTYPE((mit_des_cblock, FILE *)); -char zeroblock[8] = {0,0,0,0,0,0,0,0}; +krb5_octet zeroblock[8] = {0,0,0,0,0,0,0,0}; void main(argc, argv) diff --git a/src/lib/crypto/des/t_verify.c b/src/lib/crypto/des/t_verify.c index 01b9f7c40..80b4432a1 100644 --- a/src/lib/crypto/des/t_verify.c +++ b/src/lib/crypto/des/t_verify.c @@ -273,7 +273,7 @@ main(argc,argv) printf("ACTUAL CBC\n\tclear \"%s\"\n",input); in_length = strlen((char *)input); - if (retval = mit_des_cbc_encrypt((mit_des_cblock *) input, + if (retval = mit_des_cbc_encrypt((const mit_des_cblock *) input, (mit_des_cblock *) cipher_text, (size_t) in_length, sched, @@ -290,7 +290,7 @@ main(argc,argv) } printf("\n"); } - if (retval = mit_des_cbc_encrypt((mit_des_cblock *) cipher_text, + if (retval = mit_des_cbc_encrypt((const mit_des_cblock *) cipher_text, (mit_des_cblock *) clear_text, (size_t) in_length, sched, @@ -359,7 +359,7 @@ do_encrypt(in,out) char *out; { for (i =1; i<=nflag; i++) { - mit_des_cbc_encrypt((mit_des_cblock *)in, + mit_des_cbc_encrypt((const mit_des_cblock *)in, (mit_des_cblock *)out, 8, sched, @@ -383,7 +383,7 @@ do_decrypt(in,out) /* try to invert it */ { for (i =1; i<=nflag; i++) { - mit_des_cbc_encrypt((mit_des_cblock *)out, + mit_des_cbc_encrypt((const mit_des_cblock *)out, (mit_des_cblock *)in, 8, sched, -- 2.26.2