krb5_pa_data **pa;
ktest_make_sample_pa_data_array(&pa);
- retval = encode_krb5_padata_sequence(pa,&(code));
- if (retval) {
- com_err("encoding padata_sequence",retval,"");
- exit(1);
- }
- encoder_print_results(code, "padata_sequence", "");
- retval = encode_krb5_typed_data(pa, &code);
- if (retval) {
- com_err("encoding typed_data", retval, "");
- exit(1);
- }
- encoder_print_results(code, "typed_data", "");
-
+ encode_run(*pa, "padata_sequence", "", encode_krb5_padata_sequence);
+ encode_run(*pa, "typed_data", "", encode_krb5_typed_data);
ktest_destroy_pa_data_array(&pa);
- }
-
- /****************************************************************/
- /* encode_padata_sequence (empty) */
- {
- krb5_pa_data **pa;
ktest_make_sample_empty_pa_data_array(&pa);
- retval = encode_krb5_padata_sequence(pa,&(code));
- if (retval) {
- com_err("encoding padata_sequence(empty)",retval,"");
- exit(1);
- }
- encoder_print_results(code, "padata_sequence(empty)", "");
-
+ encode_run(*pa, "padata_sequence", "(empty)",
+ encode_krb5_padata_sequence);
ktest_destroy_pa_data_array(&pa);
}
krb5_etype_info_entry **info;
ktest_make_sample_etype_info(&info);
- retval = encode_krb5_etype_info(info,&(code));
- if (retval) {
- com_err("encoding etype_info",retval,"");
- exit(1);
- }
- encoder_print_results(code, "etype_info", "");
+ encode_run(*info, "etype_info", "", encode_krb5_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(info,&(code));
- if (retval) {
- com_err("encoding etype_info (only 1)",retval,"");
- exit(1);
- }
- encoder_print_results(code, "etype_info (only 1)", "");
+ encode_run(*info, "etype_info", "(only 1)", encode_krb5_etype_info);
ktest_destroy_etype_info_entry(info[0]); info[0] = 0;
-
- retval = encode_krb5_etype_info(info,&(code));
- if (retval) {
- com_err("encoding etype_info (no info)",retval,"");
- exit(1);
- }
- encoder_print_results(code, "etype_info (no info)", "");
+ encode_run(*info, "etype_info", "(no info)", encode_krb5_etype_info);
ktest_destroy_etype_info(info);
}
- /* encode_etype_info 2*/
+ /* encode_etype_info2 */
{
krb5_etype_info_entry **info;
ktest_make_sample_etype_info2(&info);
- retval = encode_krb5_etype_info2(info,&(code));
- if (retval) {
- com_err("encoding etype_info",retval,"");
- exit(1);
- }
- encoder_print_results(code, "etype_info2", "");
+ encode_run(*info, "etype_info2", "", encode_krb5_etype_info2);
+
ktest_destroy_etype_info_entry(info[2]); info[2] = 0;
ktest_destroy_etype_info_entry(info[1]); info[1] = 0;
+ encode_run(*info, "etype_info2", "(only 1)", encode_krb5_etype_info2);
- retval = encode_krb5_etype_info2(info,&(code));
- if (retval) {
- com_err("encoding etype_info (only 1)",retval,"");
- exit(1);
- }
- encoder_print_results(code, "etype_info2 (only 1)", "");
+ /* etype_info2 sequences aren't allowed to be empty. */
ktest_destroy_etype_info(info);
-/* ktest_destroy_etype_info_entry(info[0]); info[0] = 0;*/
-
}
/****************************************************************/
encode_krb5_typed_data: 30 24 30 10 A0 03 02 01 0D A1 09 04 07 70 61 2D 64 61 74 61 30 10 A0 03 02 01 0D A1 09 04 07 70 61 2D 64 61 74 61
encode_krb5_padata_sequence(empty): 30 00
encode_krb5_etype_info: 30 33 30 14 A0 03 02 01 00 A1 0D 04 0B 4D 6F 72 74 6F 6E 27 73 20 23 30 30 05 A0 03 02 01 01 30 14 A0 03 02 01 02 A1 0D 04 0B 4D 6F 72 74 6F 6E 27 73 20 23 32
-encode_krb5_etype_info (only 1): 30 16 30 14 A0 03 02 01 00 A1 0D 04 0B 4D 6F 72 74 6F 6E 27 73 20 23 30
-encode_krb5_etype_info (no info): 30 00
+encode_krb5_etype_info(only 1): 30 16 30 14 A0 03 02 01 00 A1 0D 04 0B 4D 6F 72 74 6F 6E 27 73 20 23 30
+encode_krb5_etype_info(no info): 30 00
encode_krb5_etype_info2: 30 51 30 1E A0 03 02 01 00 A1 0D 1B 0B 4D 6F 72 74 6F 6E 27 73 20 23 30 A2 08 04 06 73 32 6B 3A 20 30 30 0F A0 03 02 01 01 A2 08 04 06 73 32 6B 3A 20 31 30 1E A0 03 02 01 02 A1 0D 1B 0B 4D 6F 72 74 6F 6E 27 73 20 23 32 A2 08 04 06 73 32 6B 3A 20 32
-encode_krb5_etype_info2 (only 1): 30 20 30 1E A0 03 02 01 00 A1 0D 1B 0B 4D 6F 72 74 6F 6E 27 73 20 23 30 A2 08 04 06 73 32 6B 3A 20 30
+encode_krb5_etype_info2(only 1): 30 20 30 1E A0 03 02 01 00 A1 0D 1B 0B 4D 6F 72 74 6F 6E 27 73 20 23 30 A2 08 04 06 73 32 6B 3A 20 30
encode_krb5_pa_enc_ts: 30 1A A0 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A A1 05 02 03 01 E2 40
encode_krb5_pa_enc_ts (no usec): 30 13 A0 11 18 0F 31 39 39 34 30 36 31 30 30 36 30 33 31 37 5A
encode_krb5_enc_data: 30 23 A0 03 02 01 00 A1 03 02 01 05 A2 17 04 15 6B 72 62 41 53 4E 2E 31 20 74 65 73 74 20 6D 65 73 73 61 67 65