+Thu Dec 25 20:57:53 1997 Tom Yu <chaoself@mit.edu>
+
+ * init_rkey.c (mit_des_init_random_key): Punt the struct; use
+ explicit variables instead because we're no longer doing a
+ memcpy. In addition, fill p_state->sequence.data a byte at a
+ time. [krb5-libs/492]
+
Mon Oct 27 01:06:34 1997 Tom Yu <tlyu@mit.edu>
* d3_cbc.c, des.h, des_int.h, f_cbc.c, f_cksum.c, f_ecb.c,
krb5_error_code kret = 0;
krb5_address **addrs = 0;
krb5_data seed;
- struct tval {
- krb5_int32 seconds;
- krb5_int32 microseconds;
- } timenow;
+ krb5_int32 now;
+ krb5_int32 unow;
+ unsigned char *cp;
switch (enctype)
{
if (kret) goto cleanup;
/* sequence = time */
- (void) krb5_crypto_us_timeofday(&timenow.seconds,
- &timenow.microseconds);
- memcpy((char *)p_state->sequence.data, (char *)&timenow, sizeof(timenow));
+ (void) krb5_crypto_us_timeofday(&now, &unow);
+ cp = p_state->sequence.data;
+ *cp++ = (now >> 24) & 0xff;
+ *cp++ = (now >> 16) & 0xff;
+ *cp++ = (now >> 8) & 0xff;
+ *cp++ = now & 0xff;
+ *cp++ = (unow >> 24) & 0xff;
+ *cp++ = (unow >> 16) & 0xff;
+ *cp++ = (unow >> 8) & 0xff;
+ *cp++ = unow &0xff;
/* seed = random(tmp.seed, time) */
kret = mit_des_random_key(NULL, p_state, &new_key);