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