An integer which specifies the type of checksum to use. Used for
compatability with DCE security servers which do not support the
default @value{DefaultChecksumType} used by this version of Kerberos.
-The possible values and their meanings are as follows.
+Note that the ap_req_checksum_type variable's value is ignored. The
+kdc_req_checksum_type is only used for DES keys. The possible values and their meanings are as follows.
@comment taken from krb5/src/include/krb5.h[in]
@table @b
For compatability with DCE security servers which do not support the
default CKSUMTYPE_RSA_MD5 used by this version of Kerberos. Use a value
of 2 to use the CKSUMTYPE_RSA_MD4 instead. This applies to DCE 1.1 and
-earlier.
+earlier. This value is only used for DES keys; other keys use the
+preferred checksum type for those keys.
.IP ap_req_checksum_type
-This allows you to set the checksum type used in the authenticator of
-KRB_AP_REQ messages. The default value for this type is
-CKSUMTYPE_RSA_MD5. For compatibility with applications linked against
-DCE version 1.1 or earlier Kerberos libraries, use a value of 2 to use
-the CKSUMTYPE_RSA_MD4
-instead.
+This obsolete variable is not used.
.IP safe_checksum_type
This allows you to set the preferred keyed-checksum type for use in KRB_SAFE
checksum.length = in_data->length;
checksum.contents = (krb5_octet *) in_data->data;
} else {
+ krb5_cksumtype cksumtype;
+ retval = krb5int_c_mandatory_cksumtype(context, (*auth_context)->keyblock->enctype,
+ &cksumtype);
+ if (retval)
+ goto cleanup_cksum;
if ((retval = krb5_c_make_checksum(context,
- (*auth_context)->req_cksumtype,
+ cksumtype,
(*auth_context)->keyblock,
KRB5_KEYUSAGE_AP_REQ_AUTH_CKSUM,
in_data, &checksum)))
tgs_construct_tgsreq(krb5_context context, krb5_data *in_data,
krb5_creds *in_cred, krb5_data *outbuf, krb5_keyblock *subkey)
{
+ krb5_cksumtype cksumtype;
krb5_error_code retval;
krb5_checksum checksum;
krb5_authenticator authent;
request.authenticator.kvno = 0;
request.ap_options = 0;
request.ticket = 0;
-
+ switch (in_cred->keyblock.enctype) {
+ case ENCTYPE_DES_CBC_CRC:
+ case ENCTYPE_DES_CBC_MD4:
+ case ENCTYPE_DES_CBC_MD5:
+ cksumtype = context->kdc_req_sumtype;
+ break;
+ default:
+ retval = krb5int_c_mandatory_cksumtype(context, in_cred->keyblock.enctype, &cksumtype);
+ if (retval)
+ goto cleanup;
+ }
+
/* Generate checksum */
- if ((retval = krb5_c_make_checksum(context, context->kdc_req_sumtype,
+ if ((retval = krb5_c_make_checksum(context, cksumtype,
&in_cred->keyblock,
KRB5_KEYUSAGE_TGS_REQ_AUTH_CKSUM,
in_data, &checksum))) {