summaryrefslogtreecommitdiffstats
path: root/src/tests/asn.1/ktest.h
blob: 59e87047c6dacbde129ec8c7b022a5a44a1153d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
#ifndef __KTEST_H__
#define __KTEST_H__

#include "k5-int.h"

#define SAMPLE_USEC 123456
#define SAMPLE_TIME 771228197  /* Fri Jun 10  6:03:17 GMT 1994 */
#define SAMPLE_SEQ_NUMBER 17
#define SAMPLE_NONCE 42
#define SAMPLE_FLAGS 0xFEDCBA98
#define SAMPLE_ERROR 0x3C;
krb5_error_code ktest_make_sample_data
	(krb5_data *d);
krb5_error_code ktest_make_sample_authenticator
	(krb5_authenticator *a);
  krb5_error_code ktest_make_sample_principal
	(krb5_principal *p);
  krb5_error_code ktest_make_sample_checksum
	(krb5_checksum *cs);
  krb5_error_code ktest_make_sample_keyblock
	(krb5_keyblock *kb);
krb5_error_code ktest_make_sample_ticket
	(krb5_ticket *tkt);
  krb5_error_code ktest_make_sample_enc_data
	(krb5_enc_data *ed);
krb5_error_code ktest_make_sample_enc_tkt_part
	(krb5_enc_tkt_part *etp);
  krb5_error_code ktest_make_sample_transited
	(krb5_transited *t);
  krb5_error_code ktest_make_sample_ticket_times
	(krb5_ticket_times *tt);
  krb5_error_code ktest_make_sample_addresses
	(krb5_address ***caddrs);
  krb5_error_code ktest_make_sample_address
	(krb5_address *a);
  krb5_error_code ktest_make_sample_authorization_data
	(krb5_authdata ***ad);
  krb5_error_code ktest_make_sample_authdata
	(krb5_authdata *ad);
krb5_error_code ktest_make_sample_enc_kdc_rep_part
	(krb5_enc_kdc_rep_part *ekr);
krb5_error_code ktest_make_sample_kdc_req
	(krb5_kdc_req *kr);

  krb5_error_code ktest_make_sample_last_req
	(krb5_last_req_entry ***lr);
  krb5_error_code ktest_make_sample_last_req_entry
	(krb5_last_req_entry **lre);
krb5_error_code ktest_make_sample_kdc_rep
	(krb5_kdc_rep *kdcr);
  krb5_error_code ktest_make_sample_pa_data_array
	(krb5_pa_data ***pad);
  krb5_error_code ktest_make_sample_empty_pa_data_array
	(krb5_pa_data ***pad);
  krb5_error_code ktest_make_sample_pa_data
	(krb5_pa_data *pad);
krb5_error_code ktest_make_sample_ap_req
	(krb5_ap_req *ar);
krb5_error_code ktest_make_sample_ap_rep
	(krb5_ap_rep *ar);
krb5_error_code ktest_make_sample_ap_rep_enc_part
	(krb5_ap_rep_enc_part *arep);
krb5_error_code ktest_make_sample_kdc_req_body
	(krb5_kdc_req *krb);
krb5_error_code ktest_make_sample_safe
	(krb5_safe *s);
krb5_error_code ktest_make_sample_priv
	(krb5_priv *p);
krb5_error_code ktest_make_sample_priv_enc_part
	(krb5_priv_enc_part *pep);
krb5_error_code ktest_make_sample_cred
	(krb5_cred *c);
krb5_error_code ktest_make_sample_cred_enc_part
	(krb5_cred_enc_part *cep);
  krb5_error_code ktest_make_sample_sequence_of_ticket
	(krb5_ticket ***sot);
krb5_error_code ktest_make_sample_error
	(krb5_error *kerr);
krb5_error_code ktest_make_sequence_of_cred_info
	(krb5_cred_info ***soci);
  krb5_error_code ktest_make_sample_cred_info
	(krb5_cred_info *ci);
krb5_error_code ktest_make_sample_passwd_phrase_element
	(passwd_phrase_element *ppe);
krb5_error_code ktest_make_sample_krb5_pwd_data
	(krb5_pwd_data *pd);
krb5_error_code ktest_make_sample_alt_method
	(krb5_alt_method *am);

krb5_error_code ktest_make_sample_etype_info
    (krb5_etype_info_entry *** p);
krb5_error_code ktest_make_sample_pa_enc_ts
	(krb5_pa_enc_ts *am);
krb5_error_code ktest_make_sample_sam_challenge
	(krb5_sam_challenge * p);
krb5_error_code ktest_make_sample_sam_response
	(krb5_sam_response * p);

/*----------------------------------------------------------------------*/

void ktest_empty_authorization_data
	(krb5_authdata **ad);
void ktest_destroy_authorization_data
	(krb5_authdata ***ad);
  void ktest_destroy_authorization_data
	(krb5_authdata ***ad);
void ktest_empty_addresses
	(krb5_address **a);
void ktest_destroy_addresses
	(krb5_address ***a);
  void ktest_destroy_address
	(krb5_address **a);
void ktest_empty_pa_data_array
	(krb5_pa_data **pad);
void ktest_destroy_pa_data_array
	(krb5_pa_data ***pad);
  void ktest_destroy_pa_data
	(krb5_pa_data **pad);

void ktest_destroy_data
	(krb5_data **d);
void ktest_empty_data
	(krb5_data *d);
void ktest_destroy_principal
	(krb5_principal *p);
void ktest_destroy_checksum
	(krb5_checksum **cs);
void ktest_destroy_keyblock
	(krb5_keyblock **kb);
void ktest_destroy_authdata
	(krb5_authdata **ad);
void ktest_destroy_sequence_of_integer
	(long **soi);
void ktest_destroy_sequence_of_ticket
	(krb5_ticket ***sot);
  void ktest_destroy_ticket
	(krb5_ticket **tkt);
void ktest_destroy_enc_data
	(krb5_enc_data *ed);

void ktest_destroy_etype_info_entry
	(krb5_etype_info_entry *i);
void ktest_destroy_etype_info
	(krb5_etype_info_entry **info);

extern krb5_context test_context;
extern char *sample_principal_name;

#endif