and decode_krb5_pa_enc_ts.
* krb5_encode_test.c (main): Add tests for encode_krb5_enc_data
and encode_krb5_pa_enc_ts.
* ktest.c (ktest_make_sample_pa_enc_ts): New functions to test
{encode,decode}_krb5_pa_enc_ts().
* ktest_equal.c (ktest_equal_krb5_pa_enc_ts): New functions to test
{encode,decode}_krb5_pa_enc_ts().
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7052
dc483132-0cff-0310-8789-
dd5450dbe970
+Tue Oct 31 21:30:28 1995 Theodore Y. Ts'o <tytso@dcl>
+
+ * krb5_decode_test.c (main): Add tests for
+ decode_krb5_enc_data and decode_krb5_pa_enc_ts.
+
+ * krb5_encode_test.c (main): Add tests for
+ encode_krb5_enc_data and encode_krb5_pa_enc_ts.
+
+ * ktest.c (ktest_make_sample_pa_enc_ts): New functions to
+ test {encode,decode}_krb5_pa_enc_ts().
+
+ * ktest_equal.c (ktest_equal_krb5_pa_enc_ts): New functions to test
+ {encode,decode}_krb5_pa_enc_ts().
+
Sun Oct 15 10:51:22 1995 <tytso@rsts-11.mit.edu>
* ktest.c (ktest_make_sample_alt_method,
- ktest_make_sample_etype_info): Fixed signed/unsinged
- -Wall flame.
+ ktest_make_sample_etype_info): Fixed signed/unsinged -Wall
+ flame.
Fri Sep 29 14:23:47 1995 Theodore Y. Ts'o <tytso@dcl>
ktest_destroy_etype_info(ref);
}
+ /****************************************************************/
+ /* decode_pa_enc_ts */
+ {
+ setup(krb5_pa_enc_ts,"krb5_pa_enc_ts",ktest_make_sample_pa_enc_ts);
+ decode_run("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",decode_krb5_pa_enc_ts,ktest_equal_krb5_pa_enc_ts);
+ ref.pausec = 0;
+ decode_run("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",decode_krb5_pa_enc_ts,ktest_equal_krb5_pa_enc_ts);
+ }
+
+ /****************************************************************/
+ /* decode_enc_data */
+ {
+ setup(krb5_enc_data,"krb5_enc_data",ktest_make_sample_enc_data);
+ decode_run("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",decode_krb5_enc_data,ktest_equal_enc_data);
+ }
exit(error_count);
}
free(info);
}
+
+ /****************************************************************/
+ /* encode_pa_enc_ts */
+ {
+ krb5_pa_enc_ts pa_enc;
+ setup(pa_enc,krb5_pa_enc_ts,"pa_enc_ts",ktest_make_sample_pa_enc_ts);
+ encode_run(pa_enc,krb5_pa_enc_ts,"pa_enc_ts","",encode_krb5_pa_enc_ts);
+ pa_enc.pausec = 0;
+ encode_run(pa_enc,krb5_pa_enc_ts,"pa_enc_ts (no usec)","",encode_krb5_pa_enc_ts);
+ }
+
+ /****************************************************************/
+ /* encode_enc_data */
+ {
+ krb5_enc_data enc_data;
+ setup(enc_data,krb5_enc_data,"enc_data",ktest_make_sample_enc_data);
+ encode_run(enc_data,krb5_enc_data,"enc_data","",encode_krb5_enc_data);
+ }
+
exit(error_count);
}
return ENOMEM;
}
+krb5_error_code ktest_make_sample_pa_enc_ts(pa_enc)
+ krb5_pa_enc_ts * pa_enc;
+{
+ pa_enc->patimestamp = SAMPLE_TIME;
+ pa_enc->pausec = SAMPLE_USEC;
+
+ return 0;
+}
+
/****************************************************************/
/* destructors */
krb5_error_code ktest_make_sample_etype_info
KRB5_PROTOTYPE((krb5_etype_info_entry *** p));
+krb5_error_code ktest_make_sample_pa_enc_ts
+ KRB5_PROTOTYPE((krb5_pa_enc_ts *am));
/*----------------------------------------------------------------------*/
return TRUE;
}
+int ktest_equal_krb5_pa_enc_ts(ref, var)
+ krb5_pa_enc_ts *ref;
+ krb5_pa_enc_ts *var;
+{
+ int p=TRUE;
+ if(ref==var) return TRUE;
+ else if(ref == NULL || var == NULL) return FALSE;
+ p=p&&scalar_equal(patimestamp);
+ p=p&&scalar_equal(pausec);
+ return p;
+}
+
/**** arrays ****************************************************************/
int ktest_equal_array_of_data(length, ref, var)
generic(ktest_equal_passwd_phrase_element,passwd_phrase_element);
generic(ktest_equal_krb5_pwd_data,krb5_pwd_data);
generic(ktest_equal_krb5_alt_method,krb5_alt_method);
+generic(ktest_equal_krb5_pa_enc_ts,krb5_pa_enc_ts);
int ktest_equal_last_req
KRB5_PROTOTYPE((krb5_last_req_entry **ref, krb5_last_req_entry **var));