svn rev #23449: trunk/src/lib/crypto/builtin/enc_provider/
ghudson@MIT.EDU
ghudson at MIT.EDU
Sun Dec 6 10:57:37 EST 2009
http://src.mit.edu/fisheye/changelog/krb5/?cs=23449
Commit By: ghudson
Log Message:
In the built-in des3 provider, remove the unused version of
validate_and_schedule, and drop the _iov suffix from the one we do
use. (Cleanup from r23444.)
Changed Files:
U trunk/src/lib/crypto/builtin/enc_provider/des3.c
Modified: trunk/src/lib/crypto/builtin/enc_provider/des3.c
===================================================================
--- trunk/src/lib/crypto/builtin/enc_provider/des3.c 2009-12-05 22:53:04 UTC (rev 23448)
+++ trunk/src/lib/crypto/builtin/enc_provider/des3.c 2009-12-06 15:57:36 UTC (rev 23449)
@@ -32,35 +32,9 @@
static krb5_error_code
validate_and_schedule(krb5_key key, const krb5_data *ivec,
- const krb5_data *input, const krb5_data *output,
+ const krb5_crypto_iov *data, size_t num_data,
mit_des3_key_schedule *schedule)
{
- /* key->keyblock.enctype was checked by the caller */
-
- if (key->keyblock.length != 24)
- return(KRB5_BAD_KEYSIZE);
- if ((input->length%8) != 0)
- return(KRB5_BAD_MSIZE);
- if (ivec && (ivec->length != 8))
- return(KRB5_BAD_MSIZE);
- if (input->length != output->length)
- return(KRB5_BAD_MSIZE);
-
- switch (mit_des3_key_sched(*(mit_des3_cblock *)key->keyblock.contents,
- *schedule)) {
- case -1:
- return(KRB5DES_BAD_KEYPAR);
- case -2:
- return(KRB5DES_WEAK_KEY);
- }
- return 0;
-}
-
-static krb5_error_code
-validate_and_schedule_iov(krb5_key key, const krb5_data *ivec,
- const krb5_crypto_iov *data, size_t num_data,
- mit_des3_key_schedule *schedule)
-{
size_t i, input_length;
for (i = 0, input_length = 0; i < num_data; i++) {
@@ -94,7 +68,7 @@
mit_des3_key_schedule schedule;
krb5_error_code err;
- err = validate_and_schedule_iov(key, ivec, data, num_data, &schedule);
+ err = validate_and_schedule(key, ivec, data, num_data, &schedule);
if (err)
return err;
@@ -116,7 +90,7 @@
mit_des3_key_schedule schedule;
krb5_error_code err;
- err = validate_and_schedule_iov(key, ivec, data, num_data, &schedule);
+ err = validate_and_schedule(key, ivec, data, num_data, &schedule);
if (err)
return err;
More information about the cvs-krb5
mailing list