+Wed Nov 8 20:03:51 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * krb5_encode_test.c (main): In case of an error in the encoding
+ routines, exit. Otherwise, calling the print routines
+ will often lead to a coredump.
+
+ * ktest.c (ktest_make_sample_etype_info): Set etype.length to -1
+ to mean that the optional salt string is missing. (This
+ is change in the convention used by the ASN.1 encoder and
+ decoder for this ASN.1 structure.)
+
Tue Oct 31 21:30:28 1995 Theodore Y. Ts'o <tytso@dcl>
* krb5_decode_test.c (main): Add tests for
setup(ad,authorization_data,"authorization_data",ktest_make_sample_authorization_data);
retval = encode_krb5_authdata((const krb5_authdata**)ad,&(code));
- if(retval) com_err("encoding authorization_data",retval,"");
+ if(retval) {
+ com_err("encoding authorization_data",retval,"");
+ exit(1);
+ }
encoder_print_results(code, "authorization_data", "");
}
setup(pa,krb5_pa_data,"PreauthData",ktest_make_sample_pa_data_array);
retval = encode_krb5_padata_sequence((const krb5_pa_data**)pa,&(code));
- if(retval) com_err("encoding padata_sequence",retval,"");
+ if(retval) {
+ com_err("encoding padata_sequence",retval,"");
+ exit(1);
+ }
encoder_print_results(code, "padata_sequence", "");
}
setup(pa,krb5_pa_data,"EmptyPreauthData",ktest_make_sample_empty_pa_data_array);
retval = encode_krb5_padata_sequence((const krb5_pa_data**)pa,&(code));
- if(retval) com_err("encoding padata_sequence(empty)",retval,"");
+ if(retval) {
+ com_err("encoding padata_sequence(empty)",retval,"");
+ exit(1);
+ }
encoder_print_results(code, "padata_sequence(empty)", "");
}
setup(info,krb5_etype_info_entry **,"etype_info",
ktest_make_sample_etype_info);
retval = encode_krb5_etype_info((const krb5_etype_info_entry **)info,&(code));
- if(retval) com_err("encoding etype_info",retval,"");
+ if(retval) {
+ com_err("encoding etype_info",retval,"");
+ exit(1);
+ }
encoder_print_results(code, "etype_info", "");
ktest_destroy_etype_info_entry(info[2]); info[2] = 0;
ktest_destroy_etype_info_entry(info[1]); info[1] = 0;
retval = encode_krb5_etype_info((const krb5_etype_info_entry **)info,&(code));
- if(retval) com_err("encoding etype_info (only 1)",retval,"");
+ if(retval) {
+ com_err("encoding etype_info (only 1)",retval,"");
+ exit(1);
+ }
encoder_print_results(code, "etype_info (only 1)", "");
ktest_destroy_etype_info_entry(info[0]); info[0] = 0;
retval = encode_krb5_etype_info((const krb5_etype_info_entry **)info,&(code));
- if(retval) com_err("encoding etype_info (no info)",retval,"");
+ if(retval) {
+ com_err("encoding etype_info (no info)",retval,"");
+ exit(1);
+ }
encoder_print_results(code, "etype_info (no info)", "");
free(info);