svn rev #21626: branches/mskrb-integ/src/lib/gssapi/krb5/
lhoward@MIT.EDU
lhoward at MIT.EDU
Mon Dec 29 08:16:04 EST 2008
http://src.mit.edu/fisheye/changelog/krb5/?cs=21626
Commit By: lhoward
Log Message:
Cleanup kg_make_confounder() somewhat
Changed Files:
U branches/mskrb-integ/src/lib/gssapi/krb5/util_crypt.c
Modified: branches/mskrb-integ/src/lib/gssapi/krb5/util_crypt.c
===================================================================
--- branches/mskrb-integ/src/lib/gssapi/krb5/util_crypt.c 2008-12-29 12:36:31 UTC (rev 21625)
+++ branches/mskrb-integ/src/lib/gssapi/krb5/util_crypt.c 2008-12-29 13:16:03 UTC (rev 21626)
@@ -162,21 +162,14 @@
krb5_keyblock *key;
unsigned char *buf;
{
- krb5_error_code code;
- size_t blocksize;
+ int confsize;
krb5_data lrandom;
- /* We special case rc4*/
- if (key->enctype == ENCTYPE_ARCFOUR_HMAC ||
- key->enctype == ENCTYPE_ARCFOUR_HMAC_EXP) {
- blocksize = 8;
- } else {
- code = krb5_c_block_size(context, key->enctype, &blocksize);
- if (code)
- return(code);
- }
+ confsize = kg_confounder_size(context, key);
+ if (confsize < 0)
+ return KRB5_BAD_MSIZE;
- lrandom.length = blocksize;
+ lrandom.length = confsize;
lrandom.data = (char *)buf;
return(krb5_c_random_make_octets(context, &lrandom));
More information about the cvs-krb5
mailing list