+Wed Mar 13 12:52:32 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
+
+ * krb5_decode.c (decode_krb5_ticket, decode_krb5_enc_tkt_part,
+ decode_krb5_authenticator, decode_krb5_error,
+ decode_krb5_ap_req, decode_krb5_ap_rep,
+ decode_krb5_ap_rep_enc_part, decode_krb5_safe,
+ decode_krb5_priv, decode_krb5_enc_priv_part,
+ decode_krb5_cred, decode_krb5_enc_part): Add magic values.
+
+ * asn1_k_decode.c (asn1_decode_passwdsequence): Set magic values
+ in structures.
+ (asn1_decode_kdc_req_body): Set magic in
+ authorization_data if not sent OTW.
+
Tue Feb 27 19:23:55 1996 Theodore Y. Ts'o <tytso@dcl>
* krb5_decode.c (decode_krb5_enc_tkt_part): If starttime is not
if(tagnum == 10){
get_field(val->authorization_data,10,asn1_decode_encrypted_data); }
else{
- val->authorization_data.magic = 0;
+ val->authorization_data.magic = KV5M_ENC_DATA;
val->authorization_data.enctype = 0;
val->authorization_data.kvno = 0;
val->authorization_data.ciphertext.data = NULL;
alloc_field(val->passwd,krb5_data);
get_lenfield(val->passwd->length,val->passwd->data,
0,asn1_decode_charstring);
+ val->passwd->magic = KV5M_DATA;
alloc_field(val->phrase,krb5_data);
get_lenfield(val->phrase->length,val->phrase->data,
1,asn1_decode_charstring);
+ val->phrase->magic = KV5M_DATA;
end_structure();
+ val->magic = KV5M_PASSWD_PHRASE_ELEMENT;
}
cleanup();
}
opt_field(*((*rep)->subkey),6,asn1_decode_encryption_key);
opt_field((*rep)->seq_number,7,asn1_decode_int32);
opt_field((*rep)->authorization_data,8,asn1_decode_authorization_data);
+ (*rep)->magic = KV5M_AUTHENTICATOR;
end_structure();
}
cleanup_manual();
get_field((*rep)->server,1,asn1_decode_realm);
get_field((*rep)->server,2,asn1_decode_principal_name);
get_field((*rep)->enc_part,3,asn1_decode_encrypted_data);
+ (*rep)->magic = KV5M_TICKET;
end_structure();
}
cleanup_manual();
opt_field((*rep)->times.renew_till,8,asn1_decode_kerberos_time);
opt_field((*rep)->caddrs,9,asn1_decode_host_addresses);
opt_field((*rep)->authorization_data,10,asn1_decode_authorization_data);
+ (*rep)->magic = KV5M_ENC_TKT_PART;
end_structure();
}
cleanup_manual();
get_field(*((*rep)->ticket),3,asn1_decode_ticket);
get_field((*rep)->authenticator,4,asn1_decode_encrypted_data);
end_structure();
+ (*rep)->magic = KV5M_AP_REQ;
}
cleanup_manual();
error_out:
}
get_field((*rep)->enc_part,2,asn1_decode_encrypted_data);
end_structure();
+ (*rep)->magic = KV5M_AP_REP;
}
cleanup(free);
}
opt_field(*((*rep)->subkey),2,asn1_decode_encryption_key);
opt_field((*rep)->seq_number,3,asn1_decode_int32);
end_structure();
+ (*rep)->magic = KV5M_AP_REP_ENC_PART;
}
cleanup_manual();
error_out:
get_field(**rep,2,asn1_decode_krb_safe_body);
alloc_field((*rep)->checksum,krb5_checksum);
get_field(*((*rep)->checksum),3,asn1_decode_checksum);
+ (*rep)->magic = KV5M_SAFE;
end_structure();
}
cleanup_manual();
#endif
}
get_field((*rep)->enc_part,3,asn1_decode_encrypted_data);
+ (*rep)->magic = KV5M_PRIV;
end_structure();
}
cleanup(free);
get_field(*((*rep)->s_address),4,asn1_decode_host_address);
if(tagnum == 5){ alloc_field((*rep)->r_address,krb5_address); }
opt_field(*((*rep)->r_address),5,asn1_decode_host_address);
+ (*rep)->magic = KV5M_PRIV_ENC_PART;
end_structure();
}
cleanup_manual();
}
get_field((*rep)->tickets,2,asn1_decode_sequence_of_ticket);
get_field((*rep)->enc_part,3,asn1_decode_encrypted_data);
+ (*rep)->magic = KV5M_CRED;
end_structure();
}
cleanup(free);
opt_field(*((*rep)->s_address),4,asn1_decode_host_address);
if(tagnum == 5){ alloc_field((*rep)->r_address,krb5_address); }
opt_field(*((*rep)->r_address),5,asn1_decode_host_address);
+ (*rep)->magic = KV5M_CRED_ENC_PART;
end_structure();
}
cleanup_manual();
get_field((*rep)->server,10,asn1_decode_principal_name);
opt_lenfield((*rep)->text.length,(*rep)->text.data,11,asn1_decode_generalstring);
opt_lenfield((*rep)->e_data.length,(*rep)->e_data.data,12,asn1_decode_charstring);
+ (*rep)->magic = KV5M_ERROR;
end_structure();
}
cleanup_manual();
{ begin_structure();
get_field((*rep)->sequence_count,0,asn1_decode_int);
get_field((*rep)->element,1,asn1_decode_sequence_of_passwdsequence);
+ (*rep)->magic = KV5M_PWD_DATA;
end_structure (); }
cleanup(free);
}