[krbdev.mit.edu #6293] Seed: Kerberos: can't log in to external KDC
Zhanna Tsitkova via RT
rt-comment at krbdev.mit.edu
Thu Dec 4 14:01:33 EST 2008
diff -Nur -x '*~' -x '*.orig' -x '*.rej' -x '*.pbxbtree' -x '*.pbxindex' -x lha.mode1v3 -x lha.mode2v3 -x lha.pbxuser -x windows -x .DS_Store Kerberos.AEP-6.5fc1.orig/KerberosFramework/Kerberos5/Sources/lib/crypto/enc_provider/des.c Kerberos.AEP-6.5fc1/KerberosFramework/Kerberos5/Sources/lib/crypto/enc_provider/des.c
--- Kerberos.AEP-6.5fc1.orig/KerberosFramework/Kerberos5/Sources/lib/crypto/enc_provider/des.c 2008-11-21 20:27:44.000000000 -0800
+++ Kerberos.AEP-6.5fc1/KerberosFramework/Kerberos5/Sources/lib/crypto/enc_provider/des.c 2008-11-21 21:42:27.000000000 -0800
@@ -124,13 +124,6 @@
const unsigned char *ip;
size_t i, len, movedData;
-#if 0
- if (key->length != 8)
- return(KRB5_BAD_KEYSIZE);
-#endif
- if (length != 8)
- return(KRB5_BAD_KEYSIZE);
-
memcpy(buf, ivec, sizeof(buf));
/*
@@ -140,31 +133,30 @@
ip = (const unsigned char *)in;
len = length;
while (len > 0) {
- for (i = 0; i < len && i < 8; i++)
- buf[i] ^= (*ip++);
- len -= i;
-
- /*
- * Encrypt what we have
- */
-
- ret = CCCrypt(kCCEncrypt,
- kCCAlgorithmDES,
- kCCOptionECBMode,
- key,
- 8,
- NULL,
- buf,
- sizeof(buf),
- buf,
- sizeof(buf),
- &movedData);
- if (ret)
- return(KRB5_CRYPTO_INTERNAL);
+ for (i = 0; i < len && i < 8; i++)
+ buf[i] ^= (*ip++);
+ len -= i;
+
+ /*
+ * Encrypt what we have
+ */
+
+ ret = CCCrypt(kCCEncrypt,
+ kCCAlgorithmDES,
+ kCCOptionECBMode,
+ key,
+ 8,
+ NULL,
+ buf,
+ sizeof(buf),
+ buf,
+ sizeof(buf),
+ &movedData);
+ if (ret)
+ return(KRB5_CRYPTO_INTERNAL);
}
memcpy(out, buf, sizeof(buf));
-
#if 0
return right & 0xFFFFFFFFUL;
#endif
More information about the krb5-bugs
mailing list