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 int
197 _hx509_generate_private_key (
198 	hx509_context /*context*/,
199 	struct hx509_generate_private_context */*ctx*/,
200 	hx509_private_key */*private_key*/);
201 
202 int
203 _hx509_generate_private_key_bits (
204 	hx509_context /*context*/,
205 	struct hx509_generate_private_context */*ctx*/,
206 	unsigned long /*bits*/);
207 
208 void
209 _hx509_generate_private_key_free (struct hx509_generate_private_context **/*ctx*/);
210 
211 int
212 _hx509_generate_private_key_init (
213 	hx509_context /*context*/,
214 	const heim_oid */*oid*/,
215 	struct hx509_generate_private_context **/*ctx*/);
216 
217 int
218 _hx509_generate_private_key_is_ca (
219 	hx509_context /*context*/,
220 	struct hx509_generate_private_context */*ctx*/);
221 
222 Certificate *
223 _hx509_get_cert (hx509_cert /*cert*/);
224 
225 void
226 _hx509_ks_dir_register (hx509_context /*context*/);
227 
228 void
229 _hx509_ks_file_register (hx509_context /*context*/);
230 
231 void
232 _hx509_ks_keychain_register (hx509_context /*context*/);
233 
234 void
235 _hx509_ks_mem_register (hx509_context /*context*/);
236 
237 void
238 _hx509_ks_null_register (hx509_context /*context*/);
239 
240 void
241 _hx509_ks_pkcs11_register (hx509_context /*context*/);
242 
243 void
244 _hx509_ks_pkcs12_register (hx509_context /*context*/);
245 
246 void
247 _hx509_ks_register (
248 	hx509_context /*context*/,
249 	struct hx509_keyset_ops */*ops*/);
250 
251 int
252 _hx509_lock_find_cert (
253 	hx509_lock /*lock*/,
254 	const hx509_query */*q*/,
255 	hx509_cert */*c*/);
256 
257 const struct _hx509_password *
258 _hx509_lock_get_passwords (hx509_lock /*lock*/);
259 
260 hx509_certs
261 _hx509_lock_unlock_certs (hx509_lock /*lock*/);
262 
263 struct hx_expr *
264 _hx509_make_expr (
265 	enum hx_expr_op /*op*/,
266 	void */*arg1*/,
267 	void */*arg2*/);
268 
269 int
270 _hx509_map_file_os (
271 	const char */*fn*/,
272 	heim_octet_string */*os*/);
273 
274 int
275 _hx509_match_keys (
276 	hx509_cert /*c*/,
277 	hx509_private_key /*key*/);
278 
279 int
280 _hx509_name_cmp (
281 	const Name */*n1*/,
282 	const Name */*n2*/,
283 	int */*c*/);
284 
285 int
286 _hx509_name_ds_cmp (
287 	const DirectoryString */*ds1*/,
288 	const DirectoryString */*ds2*/,
289 	int */*diff*/);
290 
291 int
292 _hx509_name_from_Name (
293 	const Name */*n*/,
294 	hx509_name */*name*/);
295 
296 int
297 _hx509_name_modify (
298 	hx509_context /*context*/,
299 	Name */*name*/,
300 	int /*append*/,
301 	const heim_oid */*oid*/,
302 	const char */*str*/);
303 
304 int
305 _hx509_path_append (
306 	hx509_context /*context*/,
307 	hx509_path */*path*/,
308 	hx509_cert /*cert*/);
309 
310 void
311 _hx509_path_free (hx509_path */*path*/);
312 
313 int
314 _hx509_pbe_decrypt (
315 	hx509_context /*context*/,
316 	hx509_lock /*lock*/,
317 	const AlgorithmIdentifier */*ai*/,
318 	const heim_octet_string */*econtent*/,
319 	heim_octet_string */*content*/);
320 
321 int
322 _hx509_pbe_encrypt (
323 	hx509_context /*context*/,
324 	hx509_lock /*lock*/,
325 	const AlgorithmIdentifier */*ai*/,
326 	const heim_octet_string */*content*/,
327 	heim_octet_string */*econtent*/);
328 
329 void
330 _hx509_pi_printf (
331 	int (*/*func*/)(void *, const char *),
332 	void */*ctx*/,
333 	const char */*fmt*/,
334 	...);
335 
336 int
337 _hx509_private_key_export (
338 	hx509_context /*context*/,
339 	const hx509_private_key /*key*/,
340 	hx509_key_format_t /*format*/,
341 	heim_octet_string */*data*/);
342 
343 int
344 _hx509_private_key_exportable (hx509_private_key /*key*/);
345 
346 BIGNUM *
347 _hx509_private_key_get_internal (
348 	hx509_context /*context*/,
349 	hx509_private_key /*key*/,
350 	const char */*type*/);
351 
352 int
353 _hx509_private_key_oid (
354 	hx509_context /*context*/,
355 	const hx509_private_key /*key*/,
356 	heim_oid */*data*/);
357 
358 hx509_private_key
359 _hx509_private_key_ref (hx509_private_key /*key*/);
360 
361 const char *
362 _hx509_private_pem_name (hx509_private_key /*key*/);
363 
364 int
365 _hx509_public_encrypt (
366 	hx509_context /*context*/,
367 	const heim_octet_string */*cleartext*/,
368 	const Certificate */*cert*/,
369 	heim_oid */*encryption_oid*/,
370 	heim_octet_string */*ciphertext*/);
371 
372 void
373 _hx509_query_clear (hx509_query */*q*/);
374 
375 int
376 _hx509_query_match_cert (
377 	hx509_context /*context*/,
378 	const hx509_query */*q*/,
379 	hx509_cert /*cert*/);
380 
381 void
382 _hx509_query_statistic (
383 	hx509_context /*context*/,
384 	int /*type*/,
385 	const hx509_query */*q*/);
386 
387 int
388 _hx509_request_add_dns_name (
389 	hx509_context /*context*/,
390 	hx509_request /*req*/,
391 	const char */*hostname*/);
392 
393 int
394 _hx509_request_add_eku (
395 	hx509_context /*context*/,
396 	hx509_request /*req*/,
397 	const heim_oid */*oid*/);
398 
399 int
400 _hx509_request_add_email (
401 	hx509_context /*context*/,
402 	hx509_request /*req*/,
403 	const char */*email*/);
404 
405 int
406 _hx509_request_parse (
407 	hx509_context /*context*/,
408 	const char */*path*/,
409 	hx509_request */*req*/);
410 
411 int
412 _hx509_request_print (
413 	hx509_context /*context*/,
414 	hx509_request /*req*/,
415 	FILE */*f*/);
416 
417 int
418 _hx509_request_to_pkcs10 (
419 	hx509_context /*context*/,
420 	const hx509_request /*req*/,
421 	const hx509_private_key /*signer*/,
422 	heim_octet_string */*request*/);
423 
424 hx509_revoke_ctx
425 _hx509_revoke_ref (hx509_revoke_ctx /*ctx*/);
426 
427 void
428 _hx509_sel_yyerror (const char */*s*/);
429 
430 int
431 _hx509_self_signed_valid (
432 	hx509_context /*context*/,
433 	const AlgorithmIdentifier */*alg*/);
434 
435 int
436 _hx509_set_cert_attribute (
437 	hx509_context /*context*/,
438 	hx509_cert /*cert*/,
439 	const heim_oid */*oid*/,
440 	const heim_octet_string */*attr*/);
441 
442 int
443 _hx509_signature_best_before (
444 	hx509_context /*context*/,
445 	const AlgorithmIdentifier */*alg*/,
446 	time_t /*t*/);
447 
448 void
449 _hx509_unmap_file_os (heim_octet_string */*os*/);
450 
451 int
452 _hx509_unparse_Name (
453 	const Name */*aname*/,
454 	char **/*str*/);
455 
456 time_t
457 _hx509_verify_get_time (hx509_verify_ctx /*ctx*/);
458 
459 int
460 _hx509_verify_signature (
461 	hx509_context /*context*/,
462 	const hx509_cert /*cert*/,
463 	const AlgorithmIdentifier */*alg*/,
464 	const heim_octet_string */*data*/,
465 	const heim_octet_string */*sig*/);
466 
467 int
468 _hx509_verify_signature_bitstring (
469 	hx509_context /*context*/,
470 	const hx509_cert /*signer*/,
471 	const AlgorithmIdentifier */*alg*/,
472 	const heim_octet_string */*data*/,
473 	const heim_bit_string */*sig*/);
474 
475 int
476 _hx509_write_file (
477 	const char */*fn*/,
478 	const void */*data*/,
479 	size_t /*length*/);
480 
481 #endif /* __hx509_private_h__ */
482