r23456: Update Samba4 to current lorikeet-heimdal.
[tprouty/samba.git] / source / heimdal / lib / hx509 / hx509-private.h
1 /* This is a generated file */
2 #ifndef __hx509_private_h__
3 #define __hx509_private_h__
4
5 #include <stdarg.h>
6
7 int
8 _hx509_Certificate_cmp (
9         const Certificate */*p*/,
10         const Certificate */*q*/);
11
12 int
13 _hx509_Name_to_string (
14         const Name */*n*/,
15         char **/*str*/);
16
17 time_t
18 _hx509_Time2time_t (const Time */*t*/);
19
20 void
21 _hx509_abort (
22         const char */*fmt*/,
23         ...);
24
25 int
26 _hx509_calculate_path (
27         hx509_context /*context*/,
28         int /*flags*/,
29         time_t /*time_now*/,
30         hx509_certs /*anchors*/,
31         unsigned int /*max_depth*/,
32         hx509_cert /*cert*/,
33         hx509_certs /*pool*/,
34         hx509_path */*path*/);
35
36 int
37 _hx509_cert_assign_key (
38         hx509_cert /*cert*/,
39         hx509_private_key /*private_key*/);
40
41 int
42 _hx509_cert_get_eku (
43         hx509_context /*context*/,
44         hx509_cert /*cert*/,
45         ExtKeyUsage */*e*/);
46
47 int
48 _hx509_cert_get_keyusage (
49         hx509_context /*context*/,
50         hx509_cert /*c*/,
51         KeyUsage */*ku*/);
52
53 int
54 _hx509_cert_get_version (const Certificate */*t*/);
55
56 int
57 _hx509_cert_is_parent_cmp (
58         const Certificate */*subject*/,
59         const Certificate */*issuer*/,
60         int /*allow_self_signed*/);
61
62 int
63 _hx509_cert_private_decrypt (
64         hx509_context /*context*/,
65         const heim_octet_string */*ciphertext*/,
66         const heim_oid */*encryption_oid*/,
67         hx509_cert /*p*/,
68         heim_octet_string */*cleartext*/);
69
70 hx509_private_key
71 _hx509_cert_private_key (hx509_cert /*p*/);
72
73 int
74 _hx509_cert_private_key_exportable (hx509_cert /*p*/);
75
76 int
77 _hx509_cert_public_encrypt (
78         hx509_context /*context*/,
79         const heim_octet_string */*cleartext*/,
80         const hx509_cert /*p*/,
81         heim_oid */*encryption_oid*/,
82         heim_octet_string */*ciphertext*/);
83
84 void
85 _hx509_cert_set_release (
86         hx509_cert /*cert*/,
87         _hx509_cert_release_func /*release*/,
88         void */*ctx*/);
89
90 int
91 _hx509_certs_keys_add (
92         hx509_context /*context*/,
93         hx509_certs /*certs*/,
94         hx509_private_key /*key*/);
95
96 void
97 _hx509_certs_keys_free (
98         hx509_context /*context*/,
99         hx509_private_key */*keys*/);
100
101 int
102 _hx509_certs_keys_get (
103         hx509_context /*context*/,
104         hx509_certs /*certs*/,
105         hx509_private_key **/*keys*/);
106
107 int
108 _hx509_check_key_usage (
109         hx509_context /*context*/,
110         hx509_cert /*cert*/,
111         unsigned /*flags*/,
112         int /*req_present*/);
113
114 int
115 _hx509_collector_alloc (
116         hx509_context /*context*/,
117         hx509_lock /*lock*/,
118         struct hx509_collector **/*collector*/);
119
120 int
121 _hx509_collector_certs_add (
122         hx509_context /*context*/,
123         struct hx509_collector */*c*/,
124         hx509_cert /*cert*/);
125
126 int
127 _hx509_collector_collect_certs (
128         hx509_context /*context*/,
129         struct hx509_collector */*c*/,
130         hx509_certs */*ret_certs*/);
131
132 int
133 _hx509_collector_collect_private_keys (
134         hx509_context /*context*/,
135         struct hx509_collector */*c*/,
136         hx509_private_key **/*keys*/);
137
138 void
139 _hx509_collector_free (struct hx509_collector */*c*/);
140
141 hx509_lock
142 _hx509_collector_get_lock (struct hx509_collector */*c*/);
143
144 int
145 _hx509_collector_private_key_add (
146         hx509_context /*context*/,
147         struct hx509_collector */*c*/,
148         const AlgorithmIdentifier */*alg*/,
149         hx509_private_key /*private_key*/,
150         const heim_octet_string */*key_data*/,
151         const heim_octet_string */*localKeyId*/);
152
153 int
154 _hx509_create_signature (
155         hx509_context /*context*/,
156         const hx509_private_key /*signer*/,
157         const AlgorithmIdentifier */*alg*/,
158         const heim_octet_string */*data*/,
159         AlgorithmIdentifier */*signatureAlgorithm*/,
160         heim_octet_string */*sig*/);
161
162 int
163 _hx509_create_signature_bitstring (
164         hx509_context /*context*/,
165         const hx509_private_key /*signer*/,
166         const AlgorithmIdentifier */*alg*/,
167         const heim_octet_string */*data*/,
168         AlgorithmIdentifier */*signatureAlgorithm*/,
169         heim_bit_string */*sig*/);
170
171 int
172 _hx509_find_extension_subject_key_id (
173         const Certificate */*issuer*/,
174         SubjectKeyIdentifier */*si*/);
175
176 int
177 _hx509_generate_private_key (
178         hx509_context /*context*/,
179         struct hx509_generate_private_context */*ctx*/,
180         hx509_private_key */*private_key*/);
181
182 int
183 _hx509_generate_private_key_bits (
184         hx509_context /*context*/,
185         struct hx509_generate_private_context */*ctx*/,
186         unsigned long /*bits*/);
187
188 void
189 _hx509_generate_private_key_free (struct hx509_generate_private_context **/*ctx*/);
190
191 int
192 _hx509_generate_private_key_init (
193         hx509_context /*context*/,
194         const heim_oid */*oid*/,
195         struct hx509_generate_private_context **/*ctx*/);
196
197 int
198 _hx509_generate_private_key_is_ca (
199         hx509_context /*context*/,
200         struct hx509_generate_private_context */*ctx*/);
201
202 Certificate *
203 _hx509_get_cert (hx509_cert /*cert*/);
204
205 void
206 _hx509_ks_dir_register (hx509_context /*context*/);
207
208 void
209 _hx509_ks_file_register (hx509_context /*context*/);
210
211 void
212 _hx509_ks_keychain_register (hx509_context /*context*/);
213
214 void
215 _hx509_ks_mem_register (hx509_context /*context*/);
216
217 void
218 _hx509_ks_null_register (hx509_context /*context*/);
219
220 void
221 _hx509_ks_pkcs11_register (hx509_context /*context*/);
222
223 void
224 _hx509_ks_pkcs12_register (hx509_context /*context*/);
225
226 void
227 _hx509_ks_register (
228         hx509_context /*context*/,
229         struct hx509_keyset_ops */*ops*/);
230
231 int
232 _hx509_lock_find_cert (
233         hx509_lock /*lock*/,
234         const hx509_query */*q*/,
235         hx509_cert */*c*/);
236
237 const struct _hx509_password *
238 _hx509_lock_get_passwords (hx509_lock /*lock*/);
239
240 hx509_certs
241 _hx509_lock_unlock_certs (hx509_lock /*lock*/);
242
243 int
244 _hx509_map_file (
245         const char */*fn*/,
246         void **/*data*/,
247         size_t */*length*/,
248         struct stat */*rsb*/);
249
250 int
251 _hx509_map_file_os (
252         const char */*fn*/,
253         heim_octet_string */*os*/,
254         struct stat */*rsb*/);
255
256 int
257 _hx509_match_keys (
258         hx509_cert /*c*/,
259         hx509_private_key /*private_key*/);
260
261 int
262 _hx509_name_cmp (
263         const Name */*n1*/,
264         const Name */*n2*/);
265
266 int
267 _hx509_name_ds_cmp (
268         const DirectoryString */*ds1*/,
269         const DirectoryString */*ds2*/);
270
271 int
272 _hx509_name_from_Name (
273         const Name */*n*/,
274         hx509_name */*name*/);
275
276 int
277 _hx509_name_modify (
278         hx509_context /*context*/,
279         Name */*name*/,
280         int /*append*/,
281         const heim_oid */*oid*/,
282         const char */*str*/);
283
284 int
285 _hx509_parse_private_key (
286         hx509_context /*context*/,
287         const heim_oid */*key_oid*/,
288         const void */*data*/,
289         size_t /*len*/,
290         hx509_private_key */*private_key*/);
291
292 int
293 _hx509_path_append (
294         hx509_context /*context*/,
295         hx509_path */*path*/,
296         hx509_cert /*cert*/);
297
298 void
299 _hx509_path_free (hx509_path */*path*/);
300
301 int
302 _hx509_pbe_decrypt (
303         hx509_context /*context*/,
304         hx509_lock /*lock*/,
305         const AlgorithmIdentifier */*ai*/,
306         const heim_octet_string */*econtent*/,
307         heim_octet_string */*content*/);
308
309 void
310 _hx509_pi_printf (
311         int (*/*func*/)(void *, const char *),
312         void */*ctx*/,
313         const char */*fmt*/,
314         ...);
315
316 int
317 _hx509_private_key2SPKI (
318         hx509_context /*context*/,
319         hx509_private_key /*private_key*/,
320         SubjectPublicKeyInfo */*spki*/);
321
322 void
323 _hx509_private_key_assign_rsa (
324         hx509_private_key /*key*/,
325         void */*ptr*/);
326
327 int
328 _hx509_private_key_export (
329         hx509_context /*context*/,
330         const hx509_private_key /*key*/,
331         heim_octet_string */*data*/);
332
333 int
334 _hx509_private_key_exportable (hx509_private_key /*key*/);
335
336 int
337 _hx509_private_key_free (hx509_private_key */*key*/);
338
339 int
340 _hx509_private_key_init (
341         hx509_private_key */*key*/,
342         hx509_private_key_ops */*ops*/,
343         void */*keydata*/);
344
345 int
346 _hx509_private_key_oid (
347         hx509_context /*context*/,
348         const hx509_private_key /*key*/,
349         heim_oid */*data*/);
350
351 int
352 _hx509_private_key_private_decrypt (
353         hx509_context /*context*/,
354         const heim_octet_string */*ciphertext*/,
355         const heim_oid */*encryption_oid*/,
356         hx509_private_key /*p*/,
357         heim_octet_string */*cleartext*/);
358
359 hx509_private_key
360 _hx509_private_key_ref (hx509_private_key /*key*/);
361
362 const char *
363 _hx509_private_pem_name (hx509_private_key /*key*/);
364
365 int
366 _hx509_public_encrypt (
367         hx509_context /*context*/,
368         const heim_octet_string */*cleartext*/,
369         const Certificate */*cert*/,
370         heim_oid */*encryption_oid*/,
371         heim_octet_string */*ciphertext*/);
372
373 void
374 _hx509_query_clear (hx509_query */*q*/);
375
376 int
377 _hx509_query_match_cert (
378         hx509_context /*context*/,
379         const hx509_query */*q*/,
380         hx509_cert /*cert*/);
381
382 void
383 _hx509_query_statistic (
384         hx509_context /*context*/,
385         int /*type*/,
386         const hx509_query */*q*/);
387
388 int
389 _hx509_request_add_dns_name (
390         hx509_context /*context*/,
391         hx509_request /*req*/,
392         const char */*hostname*/);
393
394 int
395 _hx509_request_add_eku (
396         hx509_context /*context*/,
397         hx509_request /*req*/,
398         const heim_oid */*oid*/);
399
400 int
401 _hx509_request_add_email (
402         hx509_context /*context*/,
403         hx509_request /*req*/,
404         const char */*email*/);
405
406 void
407 _hx509_request_free (hx509_request */*req*/);
408
409 int
410 _hx509_request_init (
411         hx509_context /*context*/,
412         hx509_request */*req*/);
413
414 int
415 _hx509_request_set_SubjectPublicKeyInfo (
416         hx509_context /*context*/,
417         hx509_request /*req*/,
418         const SubjectPublicKeyInfo */*key*/);
419
420 int
421 _hx509_request_set_name (
422         hx509_context /*context*/,
423         hx509_request /*req*/,
424         hx509_name /*name*/);
425
426 int
427 _hx509_request_to_pkcs10 (
428         hx509_context /*context*/,
429         const hx509_request /*req*/,
430         const hx509_private_key /*signer*/,
431         heim_octet_string */*request*/);
432
433 int
434 _hx509_set_cert_attribute (
435         hx509_context /*context*/,
436         hx509_cert /*cert*/,
437         const heim_oid */*oid*/,
438         const heim_octet_string */*attr*/);
439
440 void
441 _hx509_unmap_file (
442         void */*data*/,
443         size_t /*len*/);
444
445 void
446 _hx509_unmap_file_os (heim_octet_string */*os*/);
447
448 int
449 _hx509_unparse_Name (
450         const Name */*aname*/,
451         char **/*str*/);
452
453 int
454 _hx509_verify_signature (
455         hx509_context /*context*/,
456         const Certificate */*signer*/,
457         const AlgorithmIdentifier */*alg*/,
458         const heim_octet_string */*data*/,
459         const heim_octet_string */*sig*/);
460
461 int
462 _hx509_verify_signature_bitstring (
463         hx509_context /*context*/,
464         const Certificate */*signer*/,
465         const AlgorithmIdentifier */*alg*/,
466         const heim_octet_string */*data*/,
467         const heim_bit_string */*sig*/);
468
469 int
470 _hx509_write_file (
471         const char */*fn*/,
472         const void */*data*/,
473         size_t /*length*/);
474
475 #endif /* __hx509_private_h__ */