retval = decode_krb5_ap_rep_enc_part(&code, &var);
if (retval != ASN1_OVERRUN) {
printf("ERROR: ");
+ error_count++;
} else {
printf("OK: ");
}
ktest_empty_pa_s4u_x509_user(&ref);
}
+ /****************************************************************/
+ /* decode_pa_pac_req */
+ {
+ /* This type has no encoder and is very simple. Test two
+ * hand-generated encodings. */
+ krb5_pa_pac_req *req1 = NULL, *req2 = NULL;
+ code = make_data("\x30\x05\xA0\x03\x01\x01\x00", 7);
+ retval = decode_krb5_pa_pac_req(&code, &req1);
+ if (retval) {
+ com_err(argv[0], retval, "while decoding PA-PAC-REQ");
+ exit(1);
+ }
+ code = make_data("\x30\x05\xA0\x03\x01\x01\xFF", 7);
+ retval = decode_krb5_pa_pac_req(&code, &req2);
+ if (retval) {
+ com_err(argv[0], retval, "while decoding PA-PAC-REQ");
+ exit(1);
+ }
+ if (req1->include_pac != 0 || req2->include_pac != 1) {
+ printf("ERROR: ");
+ error_count++;
+ } else {
+ printf("OK: ");
+ }
+ printf("pa_pac_rec\n");
+ free(req1);
+ free(req2);
+ }
+
/****************************************************************/
/* decode_ad_kdcissued */
{