xref: /freebsd/crypto/heimdal/lib/hx509/hx509-protos.h (revision f4b37ed0f8b307b1f3f0f630ca725d68f1dff30d)
1 /* This is a generated file */
2 #ifndef __hx509_protos_h__
3 #define __hx509_protos_h__
4 
5 #include <stdarg.h>
6 
7 #ifdef __cplusplus
8 extern "C" {
9 #endif
10 
11 #ifndef HX509_LIB
12 #ifndef HX509_LIB_FUNCTION
13 #if defined(_WIN32)
14 #define HX509_LIB_FUNCTION __declspec(dllimport)
15 #define HX509_LIB_CALL __stdcall
16 #define HX509_LIB_VARIABLE __declspec(dllimport)
17 #else
18 #define HX509_LIB_FUNCTION
19 #define HX509_LIB_CALL
20 #define HX509_LIB_VARIABLE
21 #endif
22 #endif
23 #endif
24 void
25 hx509_bitstring_print (
26 	const heim_bit_string */*b*/,
27 	hx509_vprint_func /*func*/,
28 	void */*ctx*/);
29 
30 int
31 hx509_ca_sign (
32 	hx509_context /*context*/,
33 	hx509_ca_tbs /*tbs*/,
34 	hx509_cert /*signer*/,
35 	hx509_cert */*certificate*/);
36 
37 int
38 hx509_ca_sign_self (
39 	hx509_context /*context*/,
40 	hx509_ca_tbs /*tbs*/,
41 	hx509_private_key /*signer*/,
42 	hx509_cert */*certificate*/);
43 
44 int
45 hx509_ca_tbs_add_crl_dp_uri (
46 	hx509_context /*context*/,
47 	hx509_ca_tbs /*tbs*/,
48 	const char */*uri*/,
49 	hx509_name /*issuername*/);
50 
51 int
52 hx509_ca_tbs_add_eku (
53 	hx509_context /*context*/,
54 	hx509_ca_tbs /*tbs*/,
55 	const heim_oid */*oid*/);
56 
57 int
58 hx509_ca_tbs_add_san_hostname (
59 	hx509_context /*context*/,
60 	hx509_ca_tbs /*tbs*/,
61 	const char */*dnsname*/);
62 
63 int
64 hx509_ca_tbs_add_san_jid (
65 	hx509_context /*context*/,
66 	hx509_ca_tbs /*tbs*/,
67 	const char */*jid*/);
68 
69 int
70 hx509_ca_tbs_add_san_ms_upn (
71 	hx509_context /*context*/,
72 	hx509_ca_tbs /*tbs*/,
73 	const char */*principal*/);
74 
75 int
76 hx509_ca_tbs_add_san_otherName (
77 	hx509_context /*context*/,
78 	hx509_ca_tbs /*tbs*/,
79 	const heim_oid */*oid*/,
80 	const heim_octet_string */*os*/);
81 
82 int
83 hx509_ca_tbs_add_san_pkinit (
84 	hx509_context /*context*/,
85 	hx509_ca_tbs /*tbs*/,
86 	const char */*principal*/);
87 
88 int
89 hx509_ca_tbs_add_san_rfc822name (
90 	hx509_context /*context*/,
91 	hx509_ca_tbs /*tbs*/,
92 	const char */*rfc822Name*/);
93 
94 void
95 hx509_ca_tbs_free (hx509_ca_tbs */*tbs*/);
96 
97 int
98 hx509_ca_tbs_init (
99 	hx509_context /*context*/,
100 	hx509_ca_tbs */*tbs*/);
101 
102 int
103 hx509_ca_tbs_set_ca (
104 	hx509_context /*context*/,
105 	hx509_ca_tbs /*tbs*/,
106 	int /*pathLenConstraint*/);
107 
108 int
109 hx509_ca_tbs_set_domaincontroller (
110 	hx509_context /*context*/,
111 	hx509_ca_tbs /*tbs*/);
112 
113 int
114 hx509_ca_tbs_set_notAfter (
115 	hx509_context /*context*/,
116 	hx509_ca_tbs /*tbs*/,
117 	time_t /*t*/);
118 
119 int
120 hx509_ca_tbs_set_notAfter_lifetime (
121 	hx509_context /*context*/,
122 	hx509_ca_tbs /*tbs*/,
123 	time_t /*delta*/);
124 
125 int
126 hx509_ca_tbs_set_notBefore (
127 	hx509_context /*context*/,
128 	hx509_ca_tbs /*tbs*/,
129 	time_t /*t*/);
130 
131 int
132 hx509_ca_tbs_set_proxy (
133 	hx509_context /*context*/,
134 	hx509_ca_tbs /*tbs*/,
135 	int /*pathLenConstraint*/);
136 
137 int
138 hx509_ca_tbs_set_serialnumber (
139 	hx509_context /*context*/,
140 	hx509_ca_tbs /*tbs*/,
141 	const heim_integer */*serialNumber*/);
142 
143 int
144 hx509_ca_tbs_set_spki (
145 	hx509_context /*context*/,
146 	hx509_ca_tbs /*tbs*/,
147 	const SubjectPublicKeyInfo */*spki*/);
148 
149 int
150 hx509_ca_tbs_set_subject (
151 	hx509_context /*context*/,
152 	hx509_ca_tbs /*tbs*/,
153 	hx509_name /*subject*/);
154 
155 int
156 hx509_ca_tbs_set_template (
157 	hx509_context /*context*/,
158 	hx509_ca_tbs /*tbs*/,
159 	int /*flags*/,
160 	hx509_cert /*cert*/);
161 
162 int
163 hx509_ca_tbs_set_unique (
164 	hx509_context /*context*/,
165 	hx509_ca_tbs /*tbs*/,
166 	const heim_bit_string */*subjectUniqueID*/,
167 	const heim_bit_string */*issuerUniqueID*/);
168 
169 int
170 hx509_ca_tbs_subject_expand (
171 	hx509_context /*context*/,
172 	hx509_ca_tbs /*tbs*/,
173 	hx509_env /*env*/);
174 
175 const struct units *
176 hx509_ca_tbs_template_units (void);
177 
178 int
179 hx509_cert_binary (
180 	hx509_context /*context*/,
181 	hx509_cert /*c*/,
182 	heim_octet_string */*os*/);
183 
184 int
185 hx509_cert_check_eku (
186 	hx509_context /*context*/,
187 	hx509_cert /*cert*/,
188 	const heim_oid */*eku*/,
189 	int /*allow_any_eku*/);
190 
191 int
192 hx509_cert_cmp (
193 	hx509_cert /*p*/,
194 	hx509_cert /*q*/);
195 
196 int
197 hx509_cert_find_subjectAltName_otherName (
198 	hx509_context /*context*/,
199 	hx509_cert /*cert*/,
200 	const heim_oid */*oid*/,
201 	hx509_octet_string_list */*list*/);
202 
203 void
204 hx509_cert_free (hx509_cert /*cert*/);
205 
206 int
207 hx509_cert_get_SPKI (
208 	hx509_context /*context*/,
209 	hx509_cert /*p*/,
210 	SubjectPublicKeyInfo */*spki*/);
211 
212 int
213 hx509_cert_get_SPKI_AlgorithmIdentifier (
214 	hx509_context /*context*/,
215 	hx509_cert /*p*/,
216 	AlgorithmIdentifier */*alg*/);
217 
218 hx509_cert_attribute
219 hx509_cert_get_attribute (
220 	hx509_cert /*cert*/,
221 	const heim_oid */*oid*/);
222 
223 int
224 hx509_cert_get_base_subject (
225 	hx509_context /*context*/,
226 	hx509_cert /*c*/,
227 	hx509_name */*name*/);
228 
229 const char *
230 hx509_cert_get_friendly_name (hx509_cert /*cert*/);
231 
232 int
233 hx509_cert_get_issuer (
234 	hx509_cert /*p*/,
235 	hx509_name */*name*/);
236 
237 int
238 hx509_cert_get_issuer_unique_id (
239 	hx509_context /*context*/,
240 	hx509_cert /*p*/,
241 	heim_bit_string */*issuer*/);
242 
243 time_t
244 hx509_cert_get_notAfter (hx509_cert /*p*/);
245 
246 time_t
247 hx509_cert_get_notBefore (hx509_cert /*p*/);
248 
249 int
250 hx509_cert_get_serialnumber (
251 	hx509_cert /*p*/,
252 	heim_integer */*i*/);
253 
254 int
255 hx509_cert_get_subject (
256 	hx509_cert /*p*/,
257 	hx509_name */*name*/);
258 
259 int
260 hx509_cert_get_subject_unique_id (
261 	hx509_context /*context*/,
262 	hx509_cert /*p*/,
263 	heim_bit_string */*subject*/);
264 
265 int
266 hx509_cert_have_private_key (hx509_cert /*p*/);
267 
268 int
269 hx509_cert_init (
270 	hx509_context /*context*/,
271 	const Certificate */*c*/,
272 	hx509_cert */*cert*/);
273 
274 int
275 hx509_cert_init_data (
276 	hx509_context /*context*/,
277 	const void */*ptr*/,
278 	size_t /*len*/,
279 	hx509_cert */*cert*/);
280 
281 int
282 hx509_cert_keyusage_print (
283 	hx509_context /*context*/,
284 	hx509_cert /*c*/,
285 	char **/*s*/);
286 
287 int
288 hx509_cert_public_encrypt (
289 	hx509_context /*context*/,
290 	const heim_octet_string */*cleartext*/,
291 	const hx509_cert /*p*/,
292 	heim_oid */*encryption_oid*/,
293 	heim_octet_string */*ciphertext*/);
294 
295 hx509_cert
296 hx509_cert_ref (hx509_cert /*cert*/);
297 
298 int
299 hx509_cert_set_friendly_name (
300 	hx509_cert /*cert*/,
301 	const char */*name*/);
302 
303 int
304 hx509_certs_add (
305 	hx509_context /*context*/,
306 	hx509_certs /*certs*/,
307 	hx509_cert /*cert*/);
308 
309 int
310 hx509_certs_append (
311 	hx509_context /*context*/,
312 	hx509_certs /*to*/,
313 	hx509_lock /*lock*/,
314 	const char */*name*/);
315 
316 int
317 hx509_certs_end_seq (
318 	hx509_context /*context*/,
319 	hx509_certs /*certs*/,
320 	hx509_cursor /*cursor*/);
321 
322 int
323 hx509_certs_filter (
324 	hx509_context /*context*/,
325 	hx509_certs /*certs*/,
326 	const hx509_query */*q*/,
327 	hx509_certs */*result*/);
328 
329 int
330 hx509_certs_find (
331 	hx509_context /*context*/,
332 	hx509_certs /*certs*/,
333 	const hx509_query */*q*/,
334 	hx509_cert */*r*/);
335 
336 void
337 hx509_certs_free (hx509_certs */*certs*/);
338 
339 int
340 hx509_certs_info (
341 	hx509_context /*context*/,
342 	hx509_certs /*certs*/,
343 	int (*/*func*/)(void *, const char *),
344 	void */*ctx*/);
345 
346 int
347 hx509_certs_init (
348 	hx509_context /*context*/,
349 	const char */*name*/,
350 	int /*flags*/,
351 	hx509_lock /*lock*/,
352 	hx509_certs */*certs*/);
353 
354 #ifdef __BLOCKS__
355 int
356 hx509_certs_iter (
357 	hx509_context /*context*/,
358 	hx509_certs /*certs*/,
359 	int (^func)(hx509_cert));
360 #endif /* __BLOCKS__ */
361 
362 int
363 hx509_certs_iter_f (
364 	hx509_context /*context*/,
365 	hx509_certs /*certs*/,
366 	int (*/*func*/)(hx509_context, void *, hx509_cert),
367 	void */*ctx*/);
368 
369 int
370 hx509_certs_merge (
371 	hx509_context /*context*/,
372 	hx509_certs /*to*/,
373 	hx509_certs /*from*/);
374 
375 int
376 hx509_certs_next_cert (
377 	hx509_context /*context*/,
378 	hx509_certs /*certs*/,
379 	hx509_cursor /*cursor*/,
380 	hx509_cert */*cert*/);
381 
382 hx509_certs
383 hx509_certs_ref (hx509_certs /*certs*/);
384 
385 int
386 hx509_certs_start_seq (
387 	hx509_context /*context*/,
388 	hx509_certs /*certs*/,
389 	hx509_cursor */*cursor*/);
390 
391 int
392 hx509_certs_store (
393 	hx509_context /*context*/,
394 	hx509_certs /*certs*/,
395 	int /*flags*/,
396 	hx509_lock /*lock*/);
397 
398 int
399 hx509_ci_print_names (
400 	hx509_context /*context*/,
401 	void */*ctx*/,
402 	hx509_cert /*c*/);
403 
404 void
405 hx509_clear_error_string (hx509_context /*context*/);
406 
407 int
408 hx509_cms_create_signed (
409 	hx509_context /*context*/,
410 	int /*flags*/,
411 	const heim_oid */*eContentType*/,
412 	const void */*data*/,
413 	size_t /*length*/,
414 	const AlgorithmIdentifier */*digest_alg*/,
415 	hx509_certs /*certs*/,
416 	hx509_peer_info /*peer*/,
417 	hx509_certs /*anchors*/,
418 	hx509_certs /*pool*/,
419 	heim_octet_string */*signed_data*/);
420 
421 int
422 hx509_cms_create_signed_1 (
423 	hx509_context /*context*/,
424 	int /*flags*/,
425 	const heim_oid */*eContentType*/,
426 	const void */*data*/,
427 	size_t /*length*/,
428 	const AlgorithmIdentifier */*digest_alg*/,
429 	hx509_cert /*cert*/,
430 	hx509_peer_info /*peer*/,
431 	hx509_certs /*anchors*/,
432 	hx509_certs /*pool*/,
433 	heim_octet_string */*signed_data*/);
434 
435 int
436 hx509_cms_decrypt_encrypted (
437 	hx509_context /*context*/,
438 	hx509_lock /*lock*/,
439 	const void */*data*/,
440 	size_t /*length*/,
441 	heim_oid */*contentType*/,
442 	heim_octet_string */*content*/);
443 
444 int
445 hx509_cms_envelope_1 (
446 	hx509_context /*context*/,
447 	int /*flags*/,
448 	hx509_cert /*cert*/,
449 	const void */*data*/,
450 	size_t /*length*/,
451 	const heim_oid */*encryption_type*/,
452 	const heim_oid */*contentType*/,
453 	heim_octet_string */*content*/);
454 
455 int
456 hx509_cms_unenvelope (
457 	hx509_context /*context*/,
458 	hx509_certs /*certs*/,
459 	int /*flags*/,
460 	const void */*data*/,
461 	size_t /*length*/,
462 	const heim_octet_string */*encryptedContent*/,
463 	time_t /*time_now*/,
464 	heim_oid */*contentType*/,
465 	heim_octet_string */*content*/);
466 
467 int
468 hx509_cms_unwrap_ContentInfo (
469 	const heim_octet_string */*in*/,
470 	heim_oid */*oid*/,
471 	heim_octet_string */*out*/,
472 	int */*have_data*/);
473 
474 int
475 hx509_cms_verify_signed (
476 	hx509_context /*context*/,
477 	hx509_verify_ctx /*ctx*/,
478 	unsigned int /*flags*/,
479 	const void */*data*/,
480 	size_t /*length*/,
481 	const heim_octet_string */*signedContent*/,
482 	hx509_certs /*pool*/,
483 	heim_oid */*contentType*/,
484 	heim_octet_string */*content*/,
485 	hx509_certs */*signer_certs*/);
486 
487 int
488 hx509_cms_wrap_ContentInfo (
489 	const heim_oid */*oid*/,
490 	const heim_octet_string */*buf*/,
491 	heim_octet_string */*res*/);
492 
493 void
494 hx509_context_free (hx509_context */*context*/);
495 
496 int
497 hx509_context_init (hx509_context */*context*/);
498 
499 void
500 hx509_context_set_missing_revoke (
501 	hx509_context /*context*/,
502 	int /*flag*/);
503 
504 int
505 hx509_crl_add_revoked_certs (
506 	hx509_context /*context*/,
507 	hx509_crl /*crl*/,
508 	hx509_certs /*certs*/);
509 
510 int
511 hx509_crl_alloc (
512 	hx509_context /*context*/,
513 	hx509_crl */*crl*/);
514 
515 void
516 hx509_crl_free (
517 	hx509_context /*context*/,
518 	hx509_crl */*crl*/);
519 
520 int
521 hx509_crl_lifetime (
522 	hx509_context /*context*/,
523 	hx509_crl /*crl*/,
524 	int /*delta*/);
525 
526 int
527 hx509_crl_sign (
528 	hx509_context /*context*/,
529 	hx509_cert /*signer*/,
530 	hx509_crl /*crl*/,
531 	heim_octet_string */*os*/);
532 
533 const AlgorithmIdentifier *
534 hx509_crypto_aes128_cbc (void);
535 
536 const AlgorithmIdentifier *
537 hx509_crypto_aes256_cbc (void);
538 
539 void
540 hx509_crypto_allow_weak (hx509_crypto /*crypto*/);
541 
542 int
543 hx509_crypto_available (
544 	hx509_context /*context*/,
545 	int /*type*/,
546 	hx509_cert /*source*/,
547 	AlgorithmIdentifier **/*val*/,
548 	unsigned int */*plen*/);
549 
550 int
551 hx509_crypto_decrypt (
552 	hx509_crypto /*crypto*/,
553 	const void */*data*/,
554 	const size_t /*length*/,
555 	heim_octet_string */*ivec*/,
556 	heim_octet_string */*clear*/);
557 
558 const AlgorithmIdentifier *
559 hx509_crypto_des_rsdi_ede3_cbc (void);
560 
561 void
562 hx509_crypto_destroy (hx509_crypto /*crypto*/);
563 
564 int
565 hx509_crypto_encrypt (
566 	hx509_crypto /*crypto*/,
567 	const void */*data*/,
568 	const size_t /*length*/,
569 	const heim_octet_string */*ivec*/,
570 	heim_octet_string **/*ciphertext*/);
571 
572 const heim_oid *
573 hx509_crypto_enctype_by_name (const char */*name*/);
574 
575 void
576 hx509_crypto_free_algs (
577 	AlgorithmIdentifier */*val*/,
578 	unsigned int /*len*/);
579 
580 int
581 hx509_crypto_get_params (
582 	hx509_context /*context*/,
583 	hx509_crypto /*crypto*/,
584 	const heim_octet_string */*ivec*/,
585 	heim_octet_string */*param*/);
586 
587 int
588 hx509_crypto_init (
589 	hx509_context /*context*/,
590 	const char */*provider*/,
591 	const heim_oid */*enctype*/,
592 	hx509_crypto */*crypto*/);
593 
594 const char *
595 hx509_crypto_provider (hx509_crypto /*crypto*/);
596 
597 int
598 hx509_crypto_random_iv (
599 	hx509_crypto /*crypto*/,
600 	heim_octet_string */*ivec*/);
601 
602 int
603 hx509_crypto_select (
604 	const hx509_context /*context*/,
605 	int /*type*/,
606 	const hx509_private_key /*source*/,
607 	hx509_peer_info /*peer*/,
608 	AlgorithmIdentifier */*selected*/);
609 
610 int
611 hx509_crypto_set_key_data (
612 	hx509_crypto /*crypto*/,
613 	const void */*data*/,
614 	size_t /*length*/);
615 
616 int
617 hx509_crypto_set_key_name (
618 	hx509_crypto /*crypto*/,
619 	const char */*name*/);
620 
621 void
622 hx509_crypto_set_padding (
623 	hx509_crypto /*crypto*/,
624 	int /*padding_type*/);
625 
626 int
627 hx509_crypto_set_params (
628 	hx509_context /*context*/,
629 	hx509_crypto /*crypto*/,
630 	const heim_octet_string */*param*/,
631 	heim_octet_string */*ivec*/);
632 
633 int
634 hx509_crypto_set_random_key (
635 	hx509_crypto /*crypto*/,
636 	heim_octet_string */*key*/);
637 
638 int
639 hx509_env_add (
640 	hx509_context /*context*/,
641 	hx509_env */*env*/,
642 	const char */*key*/,
643 	const char */*value*/);
644 
645 int
646 hx509_env_add_binding (
647 	hx509_context /*context*/,
648 	hx509_env */*env*/,
649 	const char */*key*/,
650 	hx509_env /*list*/);
651 
652 const char *
653 hx509_env_find (
654 	hx509_context /*context*/,
655 	hx509_env /*env*/,
656 	const char */*key*/);
657 
658 hx509_env
659 hx509_env_find_binding (
660 	hx509_context /*context*/,
661 	hx509_env /*env*/,
662 	const char */*key*/);
663 
664 void
665 hx509_env_free (hx509_env */*env*/);
666 
667 const char *
668 hx509_env_lfind (
669 	hx509_context /*context*/,
670 	hx509_env /*env*/,
671 	const char */*key*/,
672 	size_t /*len*/);
673 
674 void
675 hx509_err (
676 	hx509_context /*context*/,
677 	int /*exit_code*/,
678 	int /*error_code*/,
679 	const char */*fmt*/,
680 	...);
681 
682 hx509_private_key_ops *
683 hx509_find_private_alg (const heim_oid */*oid*/);
684 
685 void
686 hx509_free_error_string (char */*str*/);
687 
688 void
689 hx509_free_octet_string_list (hx509_octet_string_list */*list*/);
690 
691 int
692 hx509_general_name_unparse (
693 	GeneralName */*name*/,
694 	char **/*str*/);
695 
696 char *
697 hx509_get_error_string (
698 	hx509_context /*context*/,
699 	int /*error_code*/);
700 
701 int
702 hx509_get_one_cert (
703 	hx509_context /*context*/,
704 	hx509_certs /*certs*/,
705 	hx509_cert */*c*/);
706 
707 int
708 hx509_lock_add_cert (
709 	hx509_context /*context*/,
710 	hx509_lock /*lock*/,
711 	hx509_cert /*cert*/);
712 
713 int
714 hx509_lock_add_certs (
715 	hx509_context /*context*/,
716 	hx509_lock /*lock*/,
717 	hx509_certs /*certs*/);
718 
719 int
720 hx509_lock_add_password (
721 	hx509_lock /*lock*/,
722 	const char */*password*/);
723 
724 int
725 hx509_lock_command_string (
726 	hx509_lock /*lock*/,
727 	const char */*string*/);
728 
729 void
730 hx509_lock_free (hx509_lock /*lock*/);
731 
732 int
733 hx509_lock_init (
734 	hx509_context /*context*/,
735 	hx509_lock */*lock*/);
736 
737 int
738 hx509_lock_prompt (
739 	hx509_lock /*lock*/,
740 	hx509_prompt */*prompt*/);
741 
742 void
743 hx509_lock_reset_certs (
744 	hx509_context /*context*/,
745 	hx509_lock /*lock*/);
746 
747 void
748 hx509_lock_reset_passwords (hx509_lock /*lock*/);
749 
750 void
751 hx509_lock_reset_promper (hx509_lock /*lock*/);
752 
753 int
754 hx509_lock_set_prompter (
755 	hx509_lock /*lock*/,
756 	hx509_prompter_fct /*prompt*/,
757 	void */*data*/);
758 
759 int
760 hx509_name_binary (
761 	const hx509_name /*name*/,
762 	heim_octet_string */*os*/);
763 
764 int
765 hx509_name_cmp (
766 	hx509_name /*n1*/,
767 	hx509_name /*n2*/);
768 
769 int
770 hx509_name_copy (
771 	hx509_context /*context*/,
772 	const hx509_name /*from*/,
773 	hx509_name */*to*/);
774 
775 int
776 hx509_name_expand (
777 	hx509_context /*context*/,
778 	hx509_name /*name*/,
779 	hx509_env /*env*/);
780 
781 void
782 hx509_name_free (hx509_name */*name*/);
783 
784 int
785 hx509_name_is_null_p (const hx509_name /*name*/);
786 
787 int
788 hx509_name_normalize (
789 	hx509_context /*context*/,
790 	hx509_name /*name*/);
791 
792 int
793 hx509_name_to_Name (
794 	const hx509_name /*from*/,
795 	Name */*to*/);
796 
797 int
798 hx509_name_to_string (
799 	const hx509_name /*name*/,
800 	char **/*str*/);
801 
802 int
803 hx509_ocsp_request (
804 	hx509_context /*context*/,
805 	hx509_certs /*reqcerts*/,
806 	hx509_certs /*pool*/,
807 	hx509_cert /*signer*/,
808 	const AlgorithmIdentifier */*digest*/,
809 	heim_octet_string */*request*/,
810 	heim_octet_string */*nonce*/);
811 
812 int
813 hx509_ocsp_verify (
814 	hx509_context /*context*/,
815 	time_t /*now*/,
816 	hx509_cert /*cert*/,
817 	int /*flags*/,
818 	const void */*data*/,
819 	size_t /*length*/,
820 	time_t */*expiration*/);
821 
822 void
823 hx509_oid_print (
824 	const heim_oid */*oid*/,
825 	hx509_vprint_func /*func*/,
826 	void */*ctx*/);
827 
828 int
829 hx509_oid_sprint (
830 	const heim_oid */*oid*/,
831 	char **/*str*/);
832 
833 int
834 hx509_parse_name (
835 	hx509_context /*context*/,
836 	const char */*str*/,
837 	hx509_name */*name*/);
838 
839 int
840 hx509_parse_private_key (
841 	hx509_context /*context*/,
842 	const AlgorithmIdentifier */*keyai*/,
843 	const void */*data*/,
844 	size_t /*len*/,
845 	hx509_key_format_t /*format*/,
846 	hx509_private_key */*private_key*/);
847 
848 int
849 hx509_peer_info_add_cms_alg (
850 	hx509_context /*context*/,
851 	hx509_peer_info /*peer*/,
852 	const AlgorithmIdentifier */*val*/);
853 
854 int
855 hx509_peer_info_alloc (
856 	hx509_context /*context*/,
857 	hx509_peer_info */*peer*/);
858 
859 void
860 hx509_peer_info_free (hx509_peer_info /*peer*/);
861 
862 int
863 hx509_peer_info_set_cert (
864 	hx509_peer_info /*peer*/,
865 	hx509_cert /*cert*/);
866 
867 int
868 hx509_peer_info_set_cms_algs (
869 	hx509_context /*context*/,
870 	hx509_peer_info /*peer*/,
871 	const AlgorithmIdentifier */*val*/,
872 	size_t /*len*/);
873 
874 int
875 hx509_pem_add_header (
876 	hx509_pem_header **/*headers*/,
877 	const char */*header*/,
878 	const char */*value*/);
879 
880 const char *
881 hx509_pem_find_header (
882 	const hx509_pem_header */*h*/,
883 	const char */*header*/);
884 
885 void
886 hx509_pem_free_header (hx509_pem_header */*headers*/);
887 
888 int
889 hx509_pem_read (
890 	hx509_context /*context*/,
891 	FILE */*f*/,
892 	hx509_pem_read_func /*func*/,
893 	void */*ctx*/);
894 
895 int
896 hx509_pem_write (
897 	hx509_context /*context*/,
898 	const char */*type*/,
899 	hx509_pem_header */*headers*/,
900 	FILE */*f*/,
901 	const void */*data*/,
902 	size_t /*size*/);
903 
904 int
905 hx509_print_cert (
906 	hx509_context /*context*/,
907 	hx509_cert /*cert*/,
908 	FILE */*out*/);
909 
910 void
911 hx509_print_stdout (
912 	void */*ctx*/,
913 	const char */*fmt*/,
914 	va_list /*va*/);
915 
916 int
917 hx509_private_key2SPKI (
918 	hx509_context /*context*/,
919 	hx509_private_key /*private_key*/,
920 	SubjectPublicKeyInfo */*spki*/);
921 
922 void
923 hx509_private_key_assign_rsa (
924 	hx509_private_key /*key*/,
925 	void */*ptr*/);
926 
927 int
928 hx509_private_key_free (hx509_private_key */*key*/);
929 
930 int
931 hx509_private_key_init (
932 	hx509_private_key */*key*/,
933 	hx509_private_key_ops */*ops*/,
934 	void */*keydata*/);
935 
936 int
937 hx509_private_key_private_decrypt (
938 	hx509_context /*context*/,
939 	const heim_octet_string */*ciphertext*/,
940 	const heim_oid */*encryption_oid*/,
941 	hx509_private_key /*p*/,
942 	heim_octet_string */*cleartext*/);
943 
944 int
945 hx509_prompt_hidden (hx509_prompt_type /*type*/);
946 
947 int
948 hx509_query_alloc (
949 	hx509_context /*context*/,
950 	hx509_query **/*q*/);
951 
952 void
953 hx509_query_free (
954 	hx509_context /*context*/,
955 	hx509_query */*q*/);
956 
957 int
958 hx509_query_match_cmp_func (
959 	hx509_query */*q*/,
960 	int (*/*func*/)(hx509_context, hx509_cert, void *),
961 	void */*ctx*/);
962 
963 int
964 hx509_query_match_eku (
965 	hx509_query */*q*/,
966 	const heim_oid */*eku*/);
967 
968 int
969 hx509_query_match_expr (
970 	hx509_context /*context*/,
971 	hx509_query */*q*/,
972 	const char */*expr*/);
973 
974 int
975 hx509_query_match_friendly_name (
976 	hx509_query */*q*/,
977 	const char */*name*/);
978 
979 int
980 hx509_query_match_issuer_serial (
981 	hx509_query */*q*/,
982 	const Name */*issuer*/,
983 	const heim_integer */*serialNumber*/);
984 
985 void
986 hx509_query_match_option (
987 	hx509_query */*q*/,
988 	hx509_query_option /*option*/);
989 
990 void
991 hx509_query_statistic_file (
992 	hx509_context /*context*/,
993 	const char */*fn*/);
994 
995 void
996 hx509_query_unparse_stats (
997 	hx509_context /*context*/,
998 	int /*printtype*/,
999 	FILE */*out*/);
1000 
1001 void
1002 hx509_request_free (hx509_request */*req*/);
1003 
1004 int
1005 hx509_request_get_SubjectPublicKeyInfo (
1006 	hx509_context /*context*/,
1007 	hx509_request /*req*/,
1008 	SubjectPublicKeyInfo */*key*/);
1009 
1010 int
1011 hx509_request_get_name (
1012 	hx509_context /*context*/,
1013 	hx509_request /*req*/,
1014 	hx509_name */*name*/);
1015 
1016 int
1017 hx509_request_init (
1018 	hx509_context /*context*/,
1019 	hx509_request */*req*/);
1020 
1021 int
1022 hx509_request_set_SubjectPublicKeyInfo (
1023 	hx509_context /*context*/,
1024 	hx509_request /*req*/,
1025 	const SubjectPublicKeyInfo */*key*/);
1026 
1027 int
1028 hx509_request_set_name (
1029 	hx509_context /*context*/,
1030 	hx509_request /*req*/,
1031 	hx509_name /*name*/);
1032 
1033 int
1034 hx509_revoke_add_crl (
1035 	hx509_context /*context*/,
1036 	hx509_revoke_ctx /*ctx*/,
1037 	const char */*path*/);
1038 
1039 int
1040 hx509_revoke_add_ocsp (
1041 	hx509_context /*context*/,
1042 	hx509_revoke_ctx /*ctx*/,
1043 	const char */*path*/);
1044 
1045 void
1046 hx509_revoke_free (hx509_revoke_ctx */*ctx*/);
1047 
1048 int
1049 hx509_revoke_init (
1050 	hx509_context /*context*/,
1051 	hx509_revoke_ctx */*ctx*/);
1052 
1053 int
1054 hx509_revoke_ocsp_print (
1055 	hx509_context /*context*/,
1056 	const char */*path*/,
1057 	FILE */*out*/);
1058 
1059 int
1060 hx509_revoke_verify (
1061 	hx509_context /*context*/,
1062 	hx509_revoke_ctx /*ctx*/,
1063 	hx509_certs /*certs*/,
1064 	time_t /*now*/,
1065 	hx509_cert /*cert*/,
1066 	hx509_cert /*parent_cert*/);
1067 
1068 void
1069 hx509_set_error_string (
1070 	hx509_context /*context*/,
1071 	int /*flags*/,
1072 	int /*code*/,
1073 	const char */*fmt*/,
1074 	...);
1075 
1076 void
1077 hx509_set_error_stringv (
1078 	hx509_context /*context*/,
1079 	int /*flags*/,
1080 	int /*code*/,
1081 	const char */*fmt*/,
1082 	va_list /*ap*/);
1083 
1084 const AlgorithmIdentifier *
1085 hx509_signature_ecPublicKey (void);
1086 
1087 const AlgorithmIdentifier *
1088 hx509_signature_ecdsa_with_sha1 (void);
1089 
1090 const AlgorithmIdentifier *
1091 hx509_signature_ecdsa_with_sha256 (void);
1092 
1093 const AlgorithmIdentifier *
1094 hx509_signature_md5 (void);
1095 
1096 const AlgorithmIdentifier *
1097 hx509_signature_rsa (void);
1098 
1099 const AlgorithmIdentifier *
1100 hx509_signature_rsa_pkcs1_x509 (void);
1101 
1102 const AlgorithmIdentifier *
1103 hx509_signature_rsa_with_md5 (void);
1104 
1105 const AlgorithmIdentifier *
1106 hx509_signature_rsa_with_sha1 (void);
1107 
1108 const AlgorithmIdentifier *
1109 hx509_signature_rsa_with_sha256 (void);
1110 
1111 const AlgorithmIdentifier *
1112 hx509_signature_rsa_with_sha384 (void);
1113 
1114 const AlgorithmIdentifier *
1115 hx509_signature_rsa_with_sha512 (void);
1116 
1117 const AlgorithmIdentifier *
1118 hx509_signature_sha1 (void);
1119 
1120 const AlgorithmIdentifier *
1121 hx509_signature_sha256 (void);
1122 
1123 const AlgorithmIdentifier *
1124 hx509_signature_sha384 (void);
1125 
1126 const AlgorithmIdentifier *
1127 hx509_signature_sha512 (void);
1128 
1129 int
1130 hx509_unparse_der_name (
1131 	const void */*data*/,
1132 	size_t /*length*/,
1133 	char **/*str*/);
1134 
1135 int
1136 hx509_validate_cert (
1137 	hx509_context /*context*/,
1138 	hx509_validate_ctx /*ctx*/,
1139 	hx509_cert /*cert*/);
1140 
1141 void
1142 hx509_validate_ctx_add_flags (
1143 	hx509_validate_ctx /*ctx*/,
1144 	int /*flags*/);
1145 
1146 void
1147 hx509_validate_ctx_free (hx509_validate_ctx /*ctx*/);
1148 
1149 int
1150 hx509_validate_ctx_init (
1151 	hx509_context /*context*/,
1152 	hx509_validate_ctx */*ctx*/);
1153 
1154 void
1155 hx509_validate_ctx_set_print (
1156 	hx509_validate_ctx /*ctx*/,
1157 	hx509_vprint_func /*func*/,
1158 	void */*c*/);
1159 
1160 void
1161 hx509_verify_attach_anchors (
1162 	hx509_verify_ctx /*ctx*/,
1163 	hx509_certs /*set*/);
1164 
1165 void
1166 hx509_verify_attach_revoke (
1167 	hx509_verify_ctx /*ctx*/,
1168 	hx509_revoke_ctx /*revoke_ctx*/);
1169 
1170 void
1171 hx509_verify_ctx_f_allow_best_before_signature_algs (
1172 	hx509_context /*ctx*/,
1173 	int /*boolean*/);
1174 
1175 void
1176 hx509_verify_ctx_f_allow_default_trustanchors (
1177 	hx509_verify_ctx /*ctx*/,
1178 	int /*boolean*/);
1179 
1180 void
1181 hx509_verify_destroy_ctx (hx509_verify_ctx /*ctx*/);
1182 
1183 int
1184 hx509_verify_hostname (
1185 	hx509_context /*context*/,
1186 	const hx509_cert /*cert*/,
1187 	int /*flags*/,
1188 	hx509_hostname_type /*type*/,
1189 	const char */*hostname*/,
1190 	const struct sockaddr */*sa*/,
1191 	int /*sa_size*/);
1192 
1193 int
1194 hx509_verify_init_ctx (
1195 	hx509_context /*context*/,
1196 	hx509_verify_ctx */*ctx*/);
1197 
1198 int
1199 hx509_verify_path (
1200 	hx509_context /*context*/,
1201 	hx509_verify_ctx /*ctx*/,
1202 	hx509_cert /*cert*/,
1203 	hx509_certs /*pool*/);
1204 
1205 void
1206 hx509_verify_set_max_depth (
1207 	hx509_verify_ctx /*ctx*/,
1208 	unsigned int /*max_depth*/);
1209 
1210 void
1211 hx509_verify_set_proxy_certificate (
1212 	hx509_verify_ctx /*ctx*/,
1213 	int /*boolean*/);
1214 
1215 void
1216 hx509_verify_set_strict_rfc3280_verification (
1217 	hx509_verify_ctx /*ctx*/,
1218 	int /*boolean*/);
1219 
1220 void
1221 hx509_verify_set_time (
1222 	hx509_verify_ctx /*ctx*/,
1223 	time_t /*t*/);
1224 
1225 int
1226 hx509_verify_signature (
1227 	hx509_context /*context*/,
1228 	const hx509_cert /*signer*/,
1229 	const AlgorithmIdentifier */*alg*/,
1230 	const heim_octet_string */*data*/,
1231 	const heim_octet_string */*sig*/);
1232 
1233 void
1234 hx509_xfree (void */*ptr*/);
1235 
1236 int
1237 yywrap (void);
1238 
1239 #ifdef __cplusplus
1240 }
1241 #endif
1242 
1243 #endif /* __hx509_protos_h__ */
1244