svn rev #24918: trunk/src/ include/ lib/gssapi/krb5/
ghudson@MIT.EDU
ghudson at MIT.EDU
Mon May 9 14:06:15 EDT 2011
http://src.mit.edu/fisheye/changelog/krb5/?cs=24918
Commit By: ghudson
Log Message:
Use internal crypto functions directly from util_crypt.c, avoiding a
dependency on the accessor.
Changed Files:
U trunk/src/include/k5-int.h
U trunk/src/lib/gssapi/krb5/util_crypt.c
Modified: trunk/src/include/k5-int.h
===================================================================
--- trunk/src/include/k5-int.h 2011-05-09 17:28:07 UTC (rev 24917)
+++ trunk/src/include/k5-int.h 2011-05-09 18:06:15 UTC (rev 24918)
@@ -643,8 +643,6 @@
void *cache;
};
-/* These crypto functions are used by GSSAPI via the accessor. */
-
krb5_error_code
krb5int_arcfour_gsscrypt(const krb5_keyblock *keyblock, krb5_keyusage usage,
const krb5_data *kd_data, krb5_crypto_iov *data,
Modified: trunk/src/lib/gssapi/krb5/util_crypt.c
===================================================================
--- trunk/src/lib/gssapi/krb5/util_crypt.c 2011-05-09 17:28:07 UTC (rev 24917)
+++ trunk/src/lib/gssapi/krb5/util_crypt.c 2011-05-09 18:06:15 UTC (rev 24918)
@@ -102,7 +102,6 @@
krb5_cksumtype *cksumtype)
{
krb5_error_code code;
- krb5int_access kaccess;
assert(ctx != NULL);
assert(subkey != NULL);
@@ -115,15 +114,11 @@
ctx->sealalg = -1;
}
- code = krb5int_accessor(&kaccess, KRB5INT_ACCESS_VERSION);
+ code = krb5int_c_mandatory_cksumtype(context, subkey->keyblock.enctype,
+ cksumtype);
if (code != 0)
return code;
- code = (*kaccess.mandatory_cksumtype)(context, subkey->keyblock.enctype,
- cksumtype);
- if (code != 0)
- return code;
-
switch (subkey->keyblock.enctype) {
case ENCTYPE_DES_CBC_MD5:
case ENCTYPE_DES_CBC_MD4:
@@ -316,15 +311,11 @@
krb5_error_code code;
krb5_data kd = make_data((char *) kd_data, kd_data_len);
krb5_crypto_iov kiov;
- krb5int_access kaccess;
- code = krb5int_accessor(&kaccess, KRB5INT_ACCESS_VERSION);
- if (code)
- return code;
memcpy(output_buf, input_buf, input_len);
kiov.flags = KRB5_CRYPTO_TYPE_DATA;
kiov.data = make_data(output_buf, input_len);
- return (*kaccess.arcfour_gsscrypt)(keyblock, usage, &kd, &kiov, 1);
+ return krb5int_arcfour_gsscrypt(keyblock, usage, &kd, &kiov, 1);
}
/* AEAD */
@@ -581,19 +572,15 @@
{
krb5_error_code code;
krb5_data kd = make_data((char *) kd_data, kd_data_len);
- krb5int_access kaccess;
krb5_crypto_iov *kiov = NULL;
size_t kiov_len = 0;
- code = krb5int_accessor (&kaccess, KRB5INT_ACCESS_VERSION);
- if (code)
- return code;
code = kg_translate_iov(context, 0 /* proto */, 0 /* dce_style */,
0 /* ec */, 0 /* rrc */, keyblock->enctype,
iov, iov_count, &kiov, &kiov_len);
if (code)
return code;
- code = (*kaccess.arcfour_gsscrypt)(keyblock, usage, &kd, kiov, kiov_len);
+ code = krb5int_arcfour_gsscrypt(keyblock, usage, &kd, kiov, kiov_len);
free(kiov);
return code;
}
More information about the cvs-krb5
mailing list