svn rev #23452: trunk/src/ include/ lib/crypto/crypto_tests/ lib/crypto/krb/ ...
ghudson@MIT.EDU
ghudson at MIT.EDU
Sun Dec 6 15:55:16 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=23452
Commit By: ghudson
Log Message:
Remove the ivec parameters from the keyhash provider functions, as
they are never used by callers.
Changed Files:
U trunk/src/include/k5-int.h
U trunk/src/lib/crypto/crypto_tests/t_cksum.c
U trunk/src/lib/crypto/krb/aead.c
U trunk/src/lib/crypto/krb/keyhash_provider/descbc.c
U trunk/src/lib/crypto/krb/keyhash_provider/hmac_md5.c
U trunk/src/lib/crypto/krb/keyhash_provider/k5_md4des.c
U trunk/src/lib/crypto/krb/keyhash_provider/k5_md5des.c
U trunk/src/lib/crypto/krb/keyhash_provider/md5_hmac.c
U trunk/src/lib/crypto/krb/make_checksum.c
U trunk/src/lib/crypto/krb/verify_checksum.c
U trunk/src/lib/crypto/krb/verify_checksum_iov.c
Modified: trunk/src/include/k5-int.h
===================================================================
--- trunk/src/include/k5-int.h 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/include/k5-int.h 2009-12-06 20:55:16 UTC (rev 23452)
@@ -675,20 +675,17 @@
size_t hashsize;
krb5_error_code (*hash)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec, const krb5_data *input,
- krb5_data *output);
+ const krb5_data *input, krb5_data *output);
krb5_error_code (*verify)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec, const krb5_data *input,
- const krb5_data *hash, krb5_boolean *valid);
+ const krb5_data *input, const krb5_data *hash,
+ krb5_boolean *valid);
krb5_error_code (*hash_iov)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec,
const krb5_crypto_iov *data, size_t num_data,
krb5_data *output);
krb5_error_code (*verify_iov)(krb5_key key, krb5_keyusage keyusage,
- const krb5_data *ivec,
const krb5_crypto_iov *data,
size_t num_data, const krb5_data *hash,
krb5_boolean *valid);
Modified: trunk/src/lib/crypto/crypto_tests/t_cksum.c
===================================================================
--- trunk/src/lib/crypto/crypto_tests/t_cksum.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/crypto_tests/t_cksum.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -127,13 +127,13 @@
plaintext.length = strlen(argv[msgindex]);
plaintext.data = argv[msgindex];
- if ((kret = (*(khp.hash))(key, 0, 0, &plaintext, &newstyle_checksum))) {
+ if ((kret = (*(khp.hash))(key, 0, &plaintext, &newstyle_checksum))) {
printf("krb5_calculate_checksum choked with %d\n", kret);
break;
}
print_checksum("correct", MD, argv[msgindex], &newstyle_checksum);
- if ((kret = (*(khp.verify))(key, 0, 0, &plaintext, &newstyle_checksum,
+ if ((kret = (*(khp.verify))(key, 0, &plaintext, &newstyle_checksum,
&valid))) {
printf("verify on new checksum choked with %d\n", kret);
break;
@@ -146,7 +146,7 @@
printf("Verify succeeded for \"%s\"\n", argv[msgindex]);
newstyle_checksum.data[0]++;
- if ((kret = (*(khp.verify))(key, 0, 0, &plaintext, &newstyle_checksum,
+ if ((kret = (*(khp.verify))(key, 0, &plaintext, &newstyle_checksum,
&valid))) {
printf("verify on new checksum choked with %d\n", kret);
break;
@@ -163,7 +163,7 @@
kret = 1;
break;
}
- if ((kret = (*(khp.verify))(key, 0, 0, &plaintext, &knowncksum_dat,
+ if ((kret = (*(khp.verify))(key, 0, &plaintext, &knowncksum_dat,
&valid))) {
printf("verify on known checksum choked with %d\n", kret);
break;
Modified: trunk/src/lib/crypto/krb/aead.c
===================================================================
--- trunk/src/lib/crypto/krb/aead.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/aead.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -79,7 +79,7 @@
if (cksum_type->keyhash->hash_iov == NULL)
return KRB5_BAD_ENCTYPE;
- ret = cksum_type->keyhash->hash_iov(key, usage, 0, data, num_data,
+ ret = cksum_type->keyhash->hash_iov(key, usage, data, num_data,
cksum_data);
} else if (cksum_type->flags & KRB5_CKSUMFLAG_DERIVE) {
ret = krb5int_dk_make_checksum(cksum_type->hash, key, usage, data,
Modified: trunk/src/lib/crypto/krb/keyhash_provider/descbc.c
===================================================================
--- trunk/src/lib/crypto/krb/keyhash_provider/descbc.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/keyhash_provider/descbc.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -30,8 +30,8 @@
#include "keyhash_provider.h"
static krb5_error_code
-k5_descbc_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, krb5_data *output)
+k5_descbc_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
mit_des_key_schedule schedule;
@@ -39,8 +39,6 @@
return(KRB5_BAD_KEYSIZE);
if ((input->length%8) != 0)
return(KRB5_BAD_MSIZE);
- if (ivec && (ivec->length != 8))
- return(KRB5_CRYPTO_INTERNAL);
if (output->length != 8)
return(KRB5_CRYPTO_INTERNAL);
@@ -56,7 +54,6 @@
mit_des_cbc_cksum((unsigned char *) input->data,
(unsigned char *) output->data, input->length,
schedule,
- ivec? (const unsigned char *)ivec->data:
(const unsigned char *)mit_des_zeroblock);
memset(schedule, 0, sizeof(schedule));
Modified: trunk/src/lib/crypto/krb/keyhash_provider/hmac_md5.c
===================================================================
--- trunk/src/lib/crypto/krb/keyhash_provider/hmac_md5.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/keyhash_provider/hmac_md5.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -37,8 +37,8 @@
#include "../aead.h"
static krb5_error_code
-k5_hmac_md5_hash(krb5_key key, krb5_keyusage usage, const krb5_data *iv,
- const krb5_data *input, krb5_data *output)
+k5_hmac_md5_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_keyusage ms_usage;
krb5_error_code ret;
@@ -80,7 +80,7 @@
}
static krb5_error_code
-k5_hmac_md5_hash_iov(krb5_key key, krb5_keyusage usage, const krb5_data *iv,
+k5_hmac_md5_hash_iov(krb5_key key, krb5_keyusage usage,
const krb5_crypto_iov *data, size_t num_data,
krb5_data *output)
{
Modified: trunk/src/lib/crypto/krb/keyhash_provider/k5_md4des.c
===================================================================
--- trunk/src/lib/crypto/krb/keyhash_provider/k5_md4des.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/keyhash_provider/k5_md4des.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -64,8 +64,8 @@
}
static krb5_error_code
-k5_md4des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, krb5_data *output)
+k5_md4des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_error_code ret;
krb5_data data;
@@ -113,7 +113,6 @@
static krb5_error_code
k5_md4des_verify(krb5_key key, krb5_keyusage usage,
- const krb5_data *ivec,
const krb5_data *input, const krb5_data *hash,
krb5_boolean *valid)
{
Modified: trunk/src/lib/crypto/krb/keyhash_provider/k5_md5des.c
===================================================================
--- trunk/src/lib/crypto/krb/keyhash_provider/k5_md5des.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/keyhash_provider/k5_md5des.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -64,8 +64,8 @@
}
static krb5_error_code
-k5_md5des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, krb5_data *output)
+k5_md5des_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_error_code ret;
krb5_data data;
@@ -113,9 +113,8 @@
}
static krb5_error_code
-k5_md5des_verify(krb5_key key, krb5_keyusage usage, const krb5_data *ivec,
- const krb5_data *input, const krb5_data *hash,
- krb5_boolean *valid)
+k5_md5des_verify(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ const krb5_data *hash, krb5_boolean *valid)
{
krb5_error_code ret;
krb5_MD5_CTX ctx;
Modified: trunk/src/lib/crypto/krb/keyhash_provider/md5_hmac.c
===================================================================
--- trunk/src/lib/crypto/krb/keyhash_provider/md5_hmac.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/keyhash_provider/md5_hmac.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -34,8 +34,8 @@
#include "hash_provider.h"
static krb5_error_code
-k5_md5_hmac_hash(krb5_key key, krb5_keyusage usage, const krb5_data *iv,
- const krb5_data *input, krb5_data *output)
+k5_md5_hmac_hash(krb5_key key, krb5_keyusage usage, const krb5_data *input,
+ krb5_data *output)
{
krb5_keyusage ms_usage;
krb5_MD5_CTX ctx;
Modified: trunk/src/lib/crypto/krb/make_checksum.c
===================================================================
--- trunk/src/lib/crypto/krb/make_checksum.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/make_checksum.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -82,9 +82,9 @@
keyhash = ctp->keyhash;
if (keyhash->hash == NULL) {
assert(keyhash->hash_iov != NULL);
- ret = (*keyhash->hash_iov)(key, usage, 0, &iov, 1, &data);
+ ret = (*keyhash->hash_iov)(key, usage, &iov, 1, &data);
} else {
- ret = (*keyhash->hash)(key, usage, 0, input, &data);
+ ret = (*keyhash->hash)(key, usage, input, &data);
}
} else if (ctp->flags & KRB5_CKSUMFLAG_DERIVE) {
ret = krb5int_dk_make_checksum(ctp->hash, key, usage, &iov, 1, &data);
Modified: trunk/src/lib/crypto/krb/verify_checksum.c
===================================================================
--- trunk/src/lib/crypto/krb/verify_checksum.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/verify_checksum.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -63,10 +63,9 @@
iov[0].data.data = data->data;
iov[0].data.length = data->length;
- return (*keyhash->verify_iov)(key, usage, 0, iov, 1, &indata,
- valid);
+ return (*keyhash->verify_iov)(key, usage, iov, 1, &indata, valid);
} else if (keyhash->verify != NULL) {
- return (*keyhash->verify)(key, usage, 0, data, &indata, valid);
+ return (*keyhash->verify)(key, usage, data, &indata, valid);
}
}
Modified: trunk/src/lib/crypto/krb/verify_checksum_iov.c
===================================================================
--- trunk/src/lib/crypto/krb/verify_checksum_iov.c 2009-12-06 16:25:22 UTC (rev 23451)
+++ trunk/src/lib/crypto/krb/verify_checksum_iov.c 2009-12-06 20:55:16 UTC (rev 23452)
@@ -60,7 +60,7 @@
/* If there's actually a verify function, call it. */
if (ctp->keyhash && ctp->keyhash->verify_iov) {
- return (*ctp->keyhash->verify_iov)(key, usage, 0, data, num_data,
+ return (*ctp->keyhash->verify_iov)(key, usage, data, num_data,
&checksum->data, valid);
}
More information about the cvs-krb5
mailing list