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