Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into manpage
[nivanova/samba-autobuild/.git] / source4 / 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_cert_to_env (
102         hx509_context /*context*/,
103         hx509_cert /*cert*/,
104         hx509_env */*env*/);
105
106 int
107 _hx509_certs_keys_add (
108         hx509_context /*context*/,
109         hx509_certs /*certs*/,
110         hx509_private_key /*key*/);
111
112 void
113 _hx509_certs_keys_free (
114         hx509_context /*context*/,
115         hx509_private_key */*keys*/);
116
117 int
118 _hx509_certs_keys_get (
119         hx509_context /*context*/,
120         hx509_certs /*certs*/,
121         hx509_private_key **/*keys*/);
122
123 hx509_certs
124 _hx509_certs_ref (hx509_certs /*certs*/);
125
126 int
127 _hx509_check_key_usage (
128         hx509_context /*context*/,
129         hx509_cert /*cert*/,
130         unsigned /*flags*/,
131         int /*req_present*/);
132
133 int
134 _hx509_collector_alloc (
135         hx509_context /*context*/,
136         hx509_lock /*lock*/,
137         struct hx509_collector **/*collector*/);
138
139 int
140 _hx509_collector_certs_add (
141         hx509_context /*context*/,
142         struct hx509_collector */*c*/,
143         hx509_cert /*cert*/);
144
145 int
146 _hx509_collector_collect_certs (
147         hx509_context /*context*/,
148         struct hx509_collector */*c*/,
149         hx509_certs */*ret_certs*/);
150
151 int
152 _hx509_collector_collect_private_keys (
153         hx509_context /*context*/,
154         struct hx509_collector */*c*/,
155         hx509_private_key **/*keys*/);
156
157 void
158 _hx509_collector_free (struct hx509_collector */*c*/);
159
160 hx509_lock
161 _hx509_collector_get_lock (struct hx509_collector */*c*/);
162
163 int
164 _hx509_collector_private_key_add (
165         hx509_context /*context*/,
166         struct hx509_collector */*c*/,
167         const AlgorithmIdentifier */*alg*/,
168         hx509_private_key /*private_key*/,
169         const heim_octet_string */*key_data*/,
170         const heim_octet_string */*localKeyId*/);
171
172 int
173 _hx509_create_signature (
174         hx509_context /*context*/,
175         const hx509_private_key /*signer*/,
176         const AlgorithmIdentifier */*alg*/,
177         const heim_octet_string */*data*/,
178         AlgorithmIdentifier */*signatureAlgorithm*/,
179         heim_octet_string */*sig*/);
180
181 int
182 _hx509_create_signature_bitstring (
183         hx509_context /*context*/,
184         const hx509_private_key /*signer*/,
185         const AlgorithmIdentifier */*alg*/,
186         const heim_octet_string */*data*/,
187         AlgorithmIdentifier */*signatureAlgorithm*/,
188         heim_bit_string */*sig*/);
189
190 int
191 _hx509_expr_eval (
192         hx509_context /*context*/,
193         hx509_env /*env*/,
194         struct hx_expr */*expr*/);
195
196 void
197 _hx509_expr_free (struct hx_expr */*expr*/);
198
199 struct hx_expr *
200 _hx509_expr_parse (const char */*buf*/);
201
202 int
203 _hx509_find_extension_subject_key_id (
204         const Certificate */*issuer*/,
205         SubjectKeyIdentifier */*si*/);
206
207 int
208 _hx509_generate_private_key (
209         hx509_context /*context*/,
210         struct hx509_generate_private_context */*ctx*/,
211         hx509_private_key */*private_key*/);
212
213 int
214 _hx509_generate_private_key_bits (
215         hx509_context /*context*/,
216         struct hx509_generate_private_context */*ctx*/,
217         unsigned long /*bits*/);
218
219 void
220 _hx509_generate_private_key_free (struct hx509_generate_private_context **/*ctx*/);
221
222 int
223 _hx509_generate_private_key_init (
224         hx509_context /*context*/,
225         const heim_oid */*oid*/,
226         struct hx509_generate_private_context **/*ctx*/);
227
228 int
229 _hx509_generate_private_key_is_ca (
230         hx509_context /*context*/,
231         struct hx509_generate_private_context */*ctx*/);
232
233 Certificate *
234 _hx509_get_cert (hx509_cert /*cert*/);
235
236 void
237 _hx509_ks_dir_register (hx509_context /*context*/);
238
239 void
240 _hx509_ks_file_register (hx509_context /*context*/);
241
242 void
243 _hx509_ks_keychain_register (hx509_context /*context*/);
244
245 void
246 _hx509_ks_mem_register (hx509_context /*context*/);
247
248 void
249 _hx509_ks_null_register (hx509_context /*context*/);
250
251 void
252 _hx509_ks_pkcs11_register (hx509_context /*context*/);
253
254 void
255 _hx509_ks_pkcs12_register (hx509_context /*context*/);
256
257 void
258 _hx509_ks_register (
259         hx509_context /*context*/,
260         struct hx509_keyset_ops */*ops*/);
261
262 int
263 _hx509_lock_find_cert (
264         hx509_lock /*lock*/,
265         const hx509_query */*q*/,
266         hx509_cert */*c*/);
267
268 const struct _hx509_password *
269 _hx509_lock_get_passwords (hx509_lock /*lock*/);
270
271 hx509_certs
272 _hx509_lock_unlock_certs (hx509_lock /*lock*/);
273
274 struct hx_expr *
275 _hx509_make_expr (
276         enum hx_expr_op /*op*/,
277         void */*arg1*/,
278         void */*arg2*/);
279
280 int
281 _hx509_map_file_os (
282         const char */*fn*/,
283         heim_octet_string */*os*/);
284
285 int
286 _hx509_match_keys (
287         hx509_cert /*c*/,
288         hx509_private_key /*private_key*/);
289
290 int
291 _hx509_name_cmp (
292         const Name */*n1*/,
293         const Name */*n2*/,
294         int */*c*/);
295
296 int
297 _hx509_name_ds_cmp (
298         const DirectoryString */*ds1*/,
299         const DirectoryString */*ds2*/,
300         int */*diff*/);
301
302 int
303 _hx509_name_from_Name (
304         const Name */*n*/,
305         hx509_name */*name*/);
306
307 int
308 _hx509_name_modify (
309         hx509_context /*context*/,
310         Name */*name*/,
311         int /*append*/,
312         const heim_oid */*oid*/,
313         const char */*str*/);
314
315 int
316 _hx509_parse_private_key (
317         hx509_context /*context*/,
318         const heim_oid */*key_oid*/,
319         const void */*data*/,
320         size_t /*len*/,
321         hx509_private_key */*private_key*/);
322
323 int
324 _hx509_path_append (
325         hx509_context /*context*/,
326         hx509_path */*path*/,
327         hx509_cert /*cert*/);
328
329 void
330 _hx509_path_free (hx509_path */*path*/);
331
332 int
333 _hx509_pbe_decrypt (
334         hx509_context /*context*/,
335         hx509_lock /*lock*/,
336         const AlgorithmIdentifier */*ai*/,
337         const heim_octet_string */*econtent*/,
338         heim_octet_string */*content*/);
339
340 int
341 _hx509_pbe_encrypt (
342         hx509_context /*context*/,
343         hx509_lock /*lock*/,
344         const AlgorithmIdentifier */*ai*/,
345         const heim_octet_string */*content*/,
346         heim_octet_string */*econtent*/);
347
348 void
349 _hx509_pi_printf (
350         int (*/*func*/)(void *, const char *),
351         void */*ctx*/,
352         const char */*fmt*/,
353         ...);
354
355 int
356 _hx509_private_key2SPKI (
357         hx509_context /*context*/,
358         hx509_private_key /*private_key*/,
359         SubjectPublicKeyInfo */*spki*/);
360
361 void
362 _hx509_private_key_assign_rsa (
363         hx509_private_key /*key*/,
364         void */*ptr*/);
365
366 int
367 _hx509_private_key_export (
368         hx509_context /*context*/,
369         const hx509_private_key /*key*/,
370         heim_octet_string */*data*/);
371
372 int
373 _hx509_private_key_exportable (hx509_private_key /*key*/);
374
375 int
376 _hx509_private_key_free (hx509_private_key */*key*/);
377
378 BIGNUM *
379 _hx509_private_key_get_internal (
380         hx509_context /*context*/,
381         hx509_private_key /*key*/,
382         const char */*type*/);
383
384 int
385 _hx509_private_key_init (
386         hx509_private_key */*key*/,
387         hx509_private_key_ops */*ops*/,
388         void */*keydata*/);
389
390 int
391 _hx509_private_key_oid (
392         hx509_context /*context*/,
393         const hx509_private_key /*key*/,
394         heim_oid */*data*/);
395
396 int
397 _hx509_private_key_private_decrypt (
398         hx509_context /*context*/,
399         const heim_octet_string */*ciphertext*/,
400         const heim_oid */*encryption_oid*/,
401         hx509_private_key /*p*/,
402         heim_octet_string */*cleartext*/);
403
404 hx509_private_key
405 _hx509_private_key_ref (hx509_private_key /*key*/);
406
407 const char *
408 _hx509_private_pem_name (hx509_private_key /*key*/);
409
410 int
411 _hx509_public_encrypt (
412         hx509_context /*context*/,
413         const heim_octet_string */*cleartext*/,
414         const Certificate */*cert*/,
415         heim_oid */*encryption_oid*/,
416         heim_octet_string */*ciphertext*/);
417
418 void
419 _hx509_query_clear (hx509_query */*q*/);
420
421 int
422 _hx509_query_match_cert (
423         hx509_context /*context*/,
424         const hx509_query */*q*/,
425         hx509_cert /*cert*/);
426
427 void
428 _hx509_query_statistic (
429         hx509_context /*context*/,
430         int /*type*/,
431         const hx509_query */*q*/);
432
433 int
434 _hx509_request_add_dns_name (
435         hx509_context /*context*/,
436         hx509_request /*req*/,
437         const char */*hostname*/);
438
439 int
440 _hx509_request_add_eku (
441         hx509_context /*context*/,
442         hx509_request /*req*/,
443         const heim_oid */*oid*/);
444
445 int
446 _hx509_request_add_email (
447         hx509_context /*context*/,
448         hx509_request /*req*/,
449         const char */*email*/);
450
451 void
452 _hx509_request_free (hx509_request */*req*/);
453
454 int
455 _hx509_request_get_SubjectPublicKeyInfo (
456         hx509_context /*context*/,
457         hx509_request /*req*/,
458         SubjectPublicKeyInfo */*key*/);
459
460 int
461 _hx509_request_get_name (
462         hx509_context /*context*/,
463         hx509_request /*req*/,
464         hx509_name */*name*/);
465
466 int
467 _hx509_request_init (
468         hx509_context /*context*/,
469         hx509_request */*req*/);
470
471 int
472 _hx509_request_parse (
473         hx509_context /*context*/,
474         const char */*path*/,
475         hx509_request */*req*/);
476
477 int
478 _hx509_request_print (
479         hx509_context /*context*/,
480         hx509_request /*req*/,
481         FILE */*f*/);
482
483 int
484 _hx509_request_set_SubjectPublicKeyInfo (
485         hx509_context /*context*/,
486         hx509_request /*req*/,
487         const SubjectPublicKeyInfo */*key*/);
488
489 int
490 _hx509_request_set_name (
491         hx509_context /*context*/,
492         hx509_request /*req*/,
493         hx509_name /*name*/);
494
495 int
496 _hx509_request_to_pkcs10 (
497         hx509_context /*context*/,
498         const hx509_request /*req*/,
499         const hx509_private_key /*signer*/,
500         heim_octet_string */*request*/);
501
502 hx509_revoke_ctx
503 _hx509_revoke_ref (hx509_revoke_ctx /*ctx*/);
504
505 void
506 _hx509_sel_yyerror (char */*s*/);
507
508 int
509 _hx509_set_cert_attribute (
510         hx509_context /*context*/,
511         hx509_cert /*cert*/,
512         const heim_oid */*oid*/,
513         const heim_octet_string */*attr*/);
514
515 void
516 _hx509_unmap_file_os (heim_octet_string */*os*/);
517
518 int
519 _hx509_unparse_Name (
520         const Name */*aname*/,
521         char **/*str*/);
522
523 time_t
524 _hx509_verify_get_time (hx509_verify_ctx /*ctx*/);
525
526 int
527 _hx509_verify_signature (
528         hx509_context /*context*/,
529         const Certificate */*signer*/,
530         const AlgorithmIdentifier */*alg*/,
531         const heim_octet_string */*data*/,
532         const heim_octet_string */*sig*/);
533
534 int
535 _hx509_verify_signature_bitstring (
536         hx509_context /*context*/,
537         const Certificate */*signer*/,
538         const AlgorithmIdentifier */*alg*/,
539         const heim_octet_string */*data*/,
540         const heim_bit_string */*sig*/);
541
542 int
543 _hx509_write_file (
544         const char */*fn*/,
545         const void */*data*/,
546         size_t /*length*/);
547
548 #endif /* __hx509_private_h__ */