From: Sam Hartman Date: Mon, 22 Oct 2001 21:05:23 +0000 (+0000) Subject: Include usage argument in keyed hash provider calls X-Git-Tag: krb5-1.3-alpha1~1022 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=50cdd921df6627b5403d197ecbe42572e1d096c1;p=krb5.git Include usage argument in keyed hash provider calls git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13830 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index 3410effc9..6aef81d0b 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,7 @@ +2001-10-22 Sam Hartman + + * k5-int.h: keyhash_provider gains usage argument to hash function + 2001-10-15 Danilo Almeida * krb5.hin (krb5_kt_get_type): KRB5_CALLCONV. diff --git a/src/include/k5-int.h b/src/include/k5-int.h index b7f0c6292..d180e00f3 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -550,6 +550,7 @@ struct krb5_keyhash_provider { void (*hash_size) (size_t *output); krb5_error_code (*hash) (krb5_const krb5_keyblock *key, + krb5_keyusage usage, krb5_const krb5_data *ivec, krb5_const krb5_data *input, krb5_data *output); diff --git a/src/lib/crypto/ChangeLog b/src/lib/crypto/ChangeLog index 099cbd652..d8fbcfc50 100644 --- a/src/lib/crypto/ChangeLog +++ b/src/lib/crypto/ChangeLog @@ -1,3 +1,14 @@ +2001-10-22 Sam Hartman + + * make_checksum.c (krb5_c_make_checksum): Include key usage + +2001-10-19 Sam Hartman + + * Makefile.in (check-unix): Run t_encrypt + + * t_encrypt.c: New file to contain generic encryption system + black-box tests ; currently primitive, but useful for rc4 work + 2001-10-03 Ken Raeburn * block_size.c, checksum_length.c, cksumtype_to_string.c, diff --git a/src/lib/crypto/keyhash_provider/ChangeLog b/src/lib/crypto/keyhash_provider/ChangeLog index 8a40911a2..5ca3844da 100644 --- a/src/lib/crypto/keyhash_provider/ChangeLog +++ b/src/lib/crypto/keyhash_provider/ChangeLog @@ -1,3 +1,13 @@ +2001-10-22 Sam Hartman + + * t_cksum.c (main): Include key usage in hash call. + + * k5_md5des.c (k5_md5des_hash): add usage + + * k5_md4des.c (k5_md4des_hash): add key usage + + * descbc.c (k5_descbc_hash): Add key usage + 2001-05-31 Ezra Peisach * k5_md4des.c (k5_md4des_verify): Get rid of local variable that diff --git a/src/lib/crypto/keyhash_provider/descbc.c b/src/lib/crypto/keyhash_provider/descbc.c index 0394779e6..9682fbb3b 100644 --- a/src/lib/crypto/keyhash_provider/descbc.c +++ b/src/lib/crypto/keyhash_provider/descbc.c @@ -37,7 +37,7 @@ k5_descbc_hash_size(size_t *output) } static krb5_error_code -k5_descbc_hash(const krb5_keyblock *key, const krb5_data *ivec, +k5_descbc_hash(const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *ivec, const krb5_data *input, krb5_data *output) { mit_des_key_schedule schedule; diff --git a/src/lib/crypto/keyhash_provider/k5_md4des.c b/src/lib/crypto/keyhash_provider/k5_md4des.c index 8c622055f..8e03357d1 100644 --- a/src/lib/crypto/keyhash_provider/k5_md4des.c +++ b/src/lib/crypto/keyhash_provider/k5_md4des.c @@ -48,7 +48,7 @@ k5_md4des_hash_size(size_t *output) that's less efficient, and there's no need for this to be generic */ static krb5_error_code -k5_md4des_hash(const krb5_keyblock *key, const krb5_data *ivec, +k5_md4des_hash(const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *ivec, const krb5_data *input, krb5_data *output) { krb5_error_code ret; diff --git a/src/lib/crypto/keyhash_provider/k5_md5des.c b/src/lib/crypto/keyhash_provider/k5_md5des.c index 35b98b4a0..012bc850c 100644 --- a/src/lib/crypto/keyhash_provider/k5_md5des.c +++ b/src/lib/crypto/keyhash_provider/k5_md5des.c @@ -48,7 +48,7 @@ k5_md5des_hash_size(size_t *output) that's less efficient, and there's no need for this to be generic */ static krb5_error_code -k5_md5des_hash(const krb5_keyblock *key, const krb5_data *ivec, +k5_md5des_hash(const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *ivec, const krb5_data *input, krb5_data *output) { krb5_error_code ret; diff --git a/src/lib/crypto/keyhash_provider/t_cksum.c b/src/lib/crypto/keyhash_provider/t_cksum.c index ce9ef23bb..21847c84f 100644 --- a/src/lib/crypto/keyhash_provider/t_cksum.c +++ b/src/lib/crypto/keyhash_provider/t_cksum.c @@ -102,7 +102,7 @@ main(argc, argv) plaintext.length = strlen(argv[msgindex]); plaintext.data = argv[msgindex]; - if ((kret = (*(khp.hash))(&keyblock, 0, &plaintext, &newstyle_checksum))) { + if ((kret = (*(khp.hash))(&keyblock, 0, 0, &plaintext, &newstyle_checksum))) { printf("krb5_calculate_checksum choked with %d\n", kret); break; } diff --git a/src/lib/crypto/make_checksum.c b/src/lib/crypto/make_checksum.c index db0c7c32a..5d7be934b 100644 --- a/src/lib/crypto/make_checksum.c +++ b/src/lib/crypto/make_checksum.c @@ -85,7 +85,7 @@ krb5_c_make_checksum(context, cksumtype, key, usage, input, cksum) } } - ret = (*(krb5_cksumtypes_list[i].keyhash->hash))(key, 0, input, &data); + ret = (*(krb5_cksumtypes_list[i].keyhash->hash))(key, usage, 0, input, &data); } else if (krb5_cksumtypes_list[i].flags & KRB5_CKSUMFLAG_DERIVE) { /* any key is ok */ #ifdef ATHENA_DES3_KLUDGE