+Tue Mar 25 00:32:55 1997 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * preauth.c (obtain_sam_padata): Fix handling of the sam-timestamp
+ and sam-usec fields, which should always be set if the
+ nonce is not available, not just SAM_USE_SAD_AS_KEY is
+ being used. [krb5-libs/325]
+
Mon Mar 24 12:21:38 1997 Theodore Ts'o <tytso@rsts-11.mit.edu>
* t_ser.c: Clean up error reporting for krb5_init_context(). Also
}
enc_sam_response_enc.sam_nonce = sam_challenge->sam_nonce;
+ if (!sam_challenge->sam_nonce) {
+ retval = krb5_us_timeofday(context,
+ &enc_sam_response_enc.sam_timestamp,
+ &enc_sam_response_enc.sam_usec);
+ sam_response.sam_patimestamp = enc_sam_response_enc.sam_timestamp;
+ }
+ if (retval)
+ return retval;
if (sam_challenge->sam_flags & KRB5_SAM_SEND_ENCRYPTED_SAD) {
/* encrypt passcode in key by stuffing it here */
int pcsize = 256;
enc_sam_response_enc.sam_passcode.data = passcode;
enc_sam_response_enc.sam_passcode.length = pcsize;
} else if (sam_challenge->sam_flags & KRB5_SAM_USE_SAD_AS_KEY) {
- if (sam_challenge->sam_nonce) {
- /* use nonce in the next AS request? */
- } else {
- retval = krb5_us_timeofday(context,
- &enc_sam_response_enc.sam_timestamp,
- &enc_sam_response_enc.sam_usec);
- sam_response.sam_patimestamp = enc_sam_response_enc.sam_timestamp;
- }
- if (retval)
- return retval;
prompt = handle_sam_labels(sam_challenge);
retval = sam_get_pass_from_user(context, etype_info, key_proc,
key_seed, request, &sam_use_key,