+2001-10-30 Ezra Peisach <epeisach@mit.edu>
+
+ * k5unseal.c: Fix whitespace in copyright message.
+
+ * k5seal.c (make_seal_token_v1): Cleanup code for mic
+ tokens. Essentially revert code to Sam's 10/25 code, with one
+ correction - allocation of data_ptr - use msglen and not tmsglen.
+ Additionally, do not rely on malloc(0) being non-NULL.
+
2001-10-27 Sam Hartman <hartmans@mit.edu>
- * k5seal.c (make_seal_token_v1): Use usage 15 only for mic tokens, not for seal tokens without encryption
+ * k5seal.c (make_seal_token_v1): Use usage 15 only for mic tokens,
+ not for seal tokens without encryption
2001-10-26 Ezra Peisach <epeisach@mit.edu>
md5cksum.length = sumlen;
- if ((plain = (unsigned char *) xmalloc(msglen)) == NULL) {
+ if ((plain = (unsigned char *) xmalloc(msglen ? msglen : 1)) == NULL) {
xfree(t);
return(ENOMEM);
}
/* 8 = head of token body as specified by mech spec */
if (! (data_ptr =
- (char *) xmalloc(8 +
- ((bigend || (toktype != KG_TOK_SEAL_MSG))
- ? text->length : tmsglen)))) {
+ (char *) xmalloc(8 + (bigend ? text->length : msglen)))) {
xfree(plain);
xfree(t);
return(ENOMEM);
}
(void) memcpy(data_ptr, ptr-2, 8);
- if (bigend || (toktype != KG_TOK_SEAL_MSG))
+ if (bigend)
(void) memcpy(data_ptr+8, text->value, text->length);
else
(void) memcpy(data_ptr+8, plain, msglen);
- plaind.length = 8 +
- ((bigend || (toktype != KG_TOK_SEAL_MSG))? text->length : msglen);
+ plaind.length = 8 + (bigend ? text->length : msglen);
plaind.data = data_ptr;
code = krb5_c_make_checksum(context, md5cksum.checksum_type, seq,
sign_usage, &plaind, &md5cksum);
/*
- * Copyright2001 by the Massachusetts Institute of Technology.
+ * Copyright 2001 by the Massachusetts Institute of Technology.
* Copyright 1993 by OpenVision Technologies, Inc.
*
* Permission to use, copy, modify, distribute, and sell this software