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