+Tue May 14 18:39:22 1996 Richard Basch <basch@lehman.com>
+
+ * mk_req_ext.c mk_safe.c send_tgs.c:
+ set the length field of the krb5_checksum structure before
+ calling krb5_calculate_checksum.
+
+ * str_conv.c: replaced sha-des3 cksum with hmac-sha.
+
Tue May 14 02:53:42 1996 Theodore Y. Ts'o <tytso@mit.edu>
* ser_ctx.c (krb5_context_size, krb5_context_externalize,
if (in_data) {
- if ((*auth_context)->req_cksumtype == 0x8003) {
- /* XXX Special hack for GSSAPI */
- checksum.checksum_type = 0x8003;
- checksum.length = in_data->length;
- checksum.contents = (krb5_octet *) in_data->data;
- } else {
- /* Generate checksum, XXX What should the seed be? */
- if ((checksum.contents = (krb5_octet *)malloc(krb5_checksum_size(context,
- (*auth_context)->req_cksumtype))) == NULL) {
- retval = ENOMEM;
- goto cleanup;
+ if ((*auth_context)->req_cksumtype == 0x8003) {
+ /* XXX Special hack for GSSAPI */
+ checksum.checksum_type = 0x8003;
+ checksum.length = in_data->length;
+ checksum.contents = (krb5_octet *) in_data->data;
+ } else {
+ /* Generate checksum, XXX What should the seed be? */
+ checksum.length =
+ krb5_checksum_size(context, (*auth_context)->req_cksumtype);
+ if ((checksum.contents = (krb5_octet *)malloc(checksum.length)) == NULL) {
+ retval = ENOMEM;
+ goto cleanup;
+ }
+ if ((retval = krb5_calculate_checksum(context,
+ (*auth_context)->req_cksumtype,
+ in_data->data, in_data->length,
+ (*auth_context)->keyblock->contents,
+ (*auth_context)->keyblock->length,
+ &checksum)))
+ goto cleanup_cksum;
}
- if ((retval = krb5_calculate_checksum(context,
- (*auth_context)->req_cksumtype,
- in_data->data, in_data->length,
- (*auth_context)->keyblock->contents,
- (*auth_context)->keyblock->length,
- &checksum)))
- goto cleanup_cksum;
- }
- checksump = &checksum;
+ checksump = &checksum;
}
/* Generate authenticator */
if ((retval = encode_krb5_safe(&safemsg, &scratch1)))
return retval;
- if (!(safe_checksum.contents =
- (krb5_octet *) malloc(krb5_checksum_size(context, sumtype)))) {
+ safe_checksum.length = krb5_checksum_size(context, sumtype);
+ if (!(safe_checksum.contents = (krb5_octet *) malloc(safe_checksum.length))) {
+
retval = ENOMEM;
goto cleanup_scratch;
}
krb5_data * toutbuf;
/* Generate checksum */
- if ((checksum.contents = (krb5_octet *)
- malloc(krb5_checksum_size(context,
- context->kdc_req_sumtype))) == NULL)
+ checksum.length = krb5_checksum_size(context, context->kdc_req_sumtype);
+ if ((checksum.contents = (krb5_octet *) malloc(checksum.length)) == NULL)
return(ENOMEM);
if ((retval = krb5_calculate_checksum(context, context->kdc_req_sumtype,
static const char cstype_md5_in[] = "md5";
static const char cstype_md5des_in[] = "md5-des";
static const char cstype_sha_in[] = "sha";
-static const char cstype_shades3_in[] = "sha-des3";
+static const char cstype_hmacsha_in[] = "hmac-sha";
static const char cstype_crc32_out[] = "CRC-32";
static const char cstype_md4_out[] = "RSA-MD4";
static const char cstype_md4des_out[] = "RSA-MD4 with DES cbc mode";
static const char cstype_md5_out[] = "RSA-MD5";
static const char cstype_md5des_out[] = "RSA-MD5 with DES cbc mode";
static const char cstype_sha_out[] = "NIST-SHA";
-static const char cstype_shades3_out[] = "NIST-SHA with DES-3 cbc mode";
+static const char cstype_hmacsha_out[] = "HMAC-SHA";
/* Absolute time strings */
static const char atime_full_digits[] = "%y%m%d%H%M%S";
{ CKSUMTYPE_RSA_MD5, cstype_md5_in, cstype_md5_out },
{ CKSUMTYPE_RSA_MD5_DES, cstype_md5des_in, cstype_md5des_out },
{ CKSUMTYPE_NIST_SHA, cstype_sha_in, cstype_sha_out },
-{ CKSUMTYPE_NIST_SHA_DES3,cstype_shades3_in, cstype_shades3_out }
+{ CKSUMTYPE_HMAC_SHA, cstype_hmacsha_in, cstype_hmacsha_out }
};
static const int cksumtype_table_nents = sizeof(cksumtype_table)/
sizeof(cksumtype_table[0]);