1 /* This is a generated file */
2 #ifndef __hx509_protos_h__
3 #define __hx509_protos_h__
11 #ifndef HX509_LIB_FUNCTION
13 #define HX509_LIB_FUNCTION _stdcall
15 #define HX509_LIB_FUNCTION
20 hx509_bitstring_print (
21 const heim_bit_string */
*b*/
,
22 hx509_vprint_func
/*func*/,
27 hx509_context
/*context*/,
29 hx509_cert
/*signer*/,
30 hx509_cert */
*certificate*/
);
34 hx509_context
/*context*/,
36 hx509_private_key
/*signer*/,
37 hx509_cert */
*certificate*/
);
40 hx509_ca_tbs_add_crl_dp_uri (
41 hx509_context
/*context*/,
44 hx509_name
/*issuername*/);
47 hx509_ca_tbs_add_eku (
48 hx509_context
/*context*/,
50 const heim_oid */
*oid*/
);
53 hx509_ca_tbs_add_san_hostname (
54 hx509_context
/*context*/,
56 const char */
*dnsname*/
);
59 hx509_ca_tbs_add_san_jid (
60 hx509_context
/*context*/,
65 hx509_ca_tbs_add_san_ms_upn (
66 hx509_context
/*context*/,
68 const char */
*principal*/
);
71 hx509_ca_tbs_add_san_otherName (
72 hx509_context
/*context*/,
74 const heim_oid */
*oid*/
,
75 const heim_octet_string */
*os*/
);
78 hx509_ca_tbs_add_san_pkinit (
79 hx509_context
/*context*/,
81 const char */
*principal*/
);
84 hx509_ca_tbs_add_san_rfc822name (
85 hx509_context
/*context*/,
87 const char */
*rfc822Name*/
);
90 hx509_ca_tbs_free (hx509_ca_tbs */
*tbs*/
);
94 hx509_context
/*context*/,
95 hx509_ca_tbs */
*tbs*/
);
99 hx509_context
/*context*/,
100 hx509_ca_tbs
/*tbs*/,
101 int /*pathLenConstraint*/);
104 hx509_ca_tbs_set_domaincontroller (
105 hx509_context
/*context*/,
106 hx509_ca_tbs
/*tbs*/);
109 hx509_ca_tbs_set_notAfter (
110 hx509_context
/*context*/,
111 hx509_ca_tbs
/*tbs*/,
115 hx509_ca_tbs_set_notAfter_lifetime (
116 hx509_context
/*context*/,
117 hx509_ca_tbs
/*tbs*/,
121 hx509_ca_tbs_set_notBefore (
122 hx509_context
/*context*/,
123 hx509_ca_tbs
/*tbs*/,
127 hx509_ca_tbs_set_proxy (
128 hx509_context
/*context*/,
129 hx509_ca_tbs
/*tbs*/,
130 int /*pathLenConstraint*/);
133 hx509_ca_tbs_set_serialnumber (
134 hx509_context
/*context*/,
135 hx509_ca_tbs
/*tbs*/,
136 const heim_integer */
*serialNumber*/
);
139 hx509_ca_tbs_set_spki (
140 hx509_context
/*context*/,
141 hx509_ca_tbs
/*tbs*/,
142 const SubjectPublicKeyInfo */
*spki*/
);
145 hx509_ca_tbs_set_subject (
146 hx509_context
/*context*/,
147 hx509_ca_tbs
/*tbs*/,
148 hx509_name
/*subject*/);
151 hx509_ca_tbs_set_template (
152 hx509_context
/*context*/,
153 hx509_ca_tbs
/*tbs*/,
155 hx509_cert
/*cert*/);
158 hx509_ca_tbs_subject_expand (
159 hx509_context
/*context*/,
160 hx509_ca_tbs
/*tbs*/,
164 hx509_ca_tbs_template_units (void);
168 hx509_context
/*context*/,
170 heim_octet_string */
*os*/
);
173 hx509_cert_check_eku (
174 hx509_context
/*context*/,
176 const heim_oid */
*eku*/
,
177 int /*allow_any_eku*/);
185 hx509_cert_find_subjectAltName_otherName (
186 hx509_context
/*context*/,
188 const heim_oid */
*oid*/
,
189 hx509_octet_string_list */
*list*/
);
192 hx509_cert_free (hx509_cert
/*cert*/);
195 hx509_cert_get_SPKI (
196 hx509_context
/*context*/,
198 SubjectPublicKeyInfo */
*spki*/
);
201 hx509_cert_get_SPKI_AlgorithmIdentifier (
202 hx509_context
/*context*/,
204 AlgorithmIdentifier */
*alg*/
);
207 hx509_cert_get_attribute (
209 const heim_oid */
*oid*/
);
212 hx509_cert_get_base_subject (
213 hx509_context
/*context*/,
215 hx509_name */
*name*/
);
218 hx509_cert_get_friendly_name (hx509_cert
/*cert*/);
221 hx509_cert_get_issuer (
223 hx509_name */
*name*/
);
226 hx509_cert_get_notAfter (hx509_cert
/*p*/);
229 hx509_cert_get_notBefore (hx509_cert
/*p*/);
232 hx509_cert_get_serialnumber (
234 heim_integer */
*i*/
);
237 hx509_cert_get_subject (
239 hx509_name */
*name*/
);
242 hx509_cert_have_private_key (hx509_cert
/*p*/);
246 hx509_context
/*context*/,
247 const Certificate */
*c*/
,
248 hx509_cert */
*cert*/
);
251 hx509_cert_init_data (
252 hx509_context
/*context*/,
255 hx509_cert */
*cert*/
);
258 hx509_cert_keyusage_print (
259 hx509_context
/*context*/,
264 hx509_cert_ref (hx509_cert
/*cert*/);
267 hx509_cert_set_friendly_name (
269 const char */
*name*/
);
273 hx509_context
/*context*/,
274 hx509_certs
/*certs*/,
275 hx509_cert
/*cert*/);
279 hx509_context
/*context*/,
282 const char */
*name*/
);
285 hx509_certs_end_seq (
286 hx509_context
/*context*/,
287 hx509_certs
/*certs*/,
288 hx509_cursor
/*cursor*/);
292 hx509_context
/*context*/,
293 hx509_certs
/*certs*/,
294 const hx509_query */
*q*/
,
298 hx509_certs_free (hx509_certs */
*certs*/
);
302 hx509_context
/*context*/,
303 hx509_certs
/*certs*/,
304 int (*/
*func*/
)(void *, const char *),
309 hx509_context
/*context*/,
310 const char */
*name*/
,
313 hx509_certs */
*certs*/
);
317 hx509_context
/*context*/,
318 hx509_certs
/*certs*/,
319 int (*/
*func*/
)(hx509_context
, void *, hx509_cert
),
324 hx509_context
/*context*/,
326 hx509_certs
/*from*/);
329 hx509_certs_next_cert (
330 hx509_context
/*context*/,
331 hx509_certs
/*certs*/,
332 hx509_cursor
/*cursor*/,
333 hx509_cert */
*cert*/
);
336 hx509_certs_start_seq (
337 hx509_context
/*context*/,
338 hx509_certs
/*certs*/,
339 hx509_cursor */
*cursor*/
);
343 hx509_context
/*context*/,
344 hx509_certs
/*certs*/,
346 hx509_lock
/*lock*/);
349 hx509_ci_print_names (
350 hx509_context
/*context*/,
355 hx509_clear_error_string (hx509_context
/*context*/);
358 hx509_cms_create_signed_1 (
359 hx509_context
/*context*/,
361 const heim_oid */
*eContentType*/
,
362 const void */
*data*/
,
364 const AlgorithmIdentifier */
*digest_alg*/
,
366 hx509_peer_info
/*peer*/,
367 hx509_certs
/*anchors*/,
368 hx509_certs
/*pool*/,
369 heim_octet_string */
*signed_data*/
);
372 hx509_cms_decrypt_encrypted (
373 hx509_context
/*context*/,
375 const void */
*data*/
,
377 heim_oid */
*contentType*/
,
378 heim_octet_string */
*content*/
);
381 hx509_cms_envelope_1 (
382 hx509_context
/*context*/,
385 const void */
*data*/
,
387 const heim_oid */
*encryption_type*/
,
388 const heim_oid */
*contentType*/
,
389 heim_octet_string */
*content*/
);
392 hx509_cms_unenvelope (
393 hx509_context
/*context*/,
394 hx509_certs
/*certs*/,
396 const void */
*data*/
,
398 const heim_octet_string */
*encryptedContent*/
,
399 heim_oid */
*contentType*/
,
400 heim_octet_string */
*content*/
);
403 hx509_cms_unwrap_ContentInfo (
404 const heim_octet_string */
*in*/
,
406 heim_octet_string */
*out*/
,
410 hx509_cms_verify_signed (
411 hx509_context
/*context*/,
412 hx509_verify_ctx
/*ctx*/,
413 const void */
*data*/
,
415 const heim_octet_string */
*signedContent*/
,
416 hx509_certs
/*pool*/,
417 heim_oid */
*contentType*/
,
418 heim_octet_string */
*content*/
,
419 hx509_certs */
*signer_certs*/
);
422 hx509_cms_wrap_ContentInfo (
423 const heim_oid */
*oid*/
,
424 const heim_octet_string */
*buf*/
,
425 heim_octet_string */
*res*/
);
428 hx509_context_free (hx509_context */
*context*/
);
431 hx509_context_init (hx509_context */
*context*/
);
434 hx509_context_set_missing_revoke (
435 hx509_context
/*context*/,
439 hx509_crl_add_revoked_certs (
440 hx509_context
/*context*/,
442 hx509_certs
/*certs*/);
446 hx509_context
/*context*/,
451 hx509_context
/*context*/,
456 hx509_context
/*context*/,
462 hx509_context
/*context*/,
463 hx509_cert
/*signer*/,
465 heim_octet_string */
*os*/
);
467 const AlgorithmIdentifier
*
468 hx509_crypto_aes128_cbc (void);
470 const AlgorithmIdentifier
*
471 hx509_crypto_aes256_cbc (void);
474 hx509_crypto_available (
475 hx509_context
/*context*/,
477 hx509_cert
/*source*/,
478 AlgorithmIdentifier
**/
*val*/
,
479 unsigned int */
*plen*/
);
482 hx509_crypto_decrypt (
483 hx509_crypto
/*crypto*/,
484 const void */
*data*/
,
485 const size_t /*length*/,
486 heim_octet_string */
*ivec*/
,
487 heim_octet_string */
*clear*/
);
489 const AlgorithmIdentifier
*
490 hx509_crypto_des_rsdi_ede3_cbc (void);
493 hx509_crypto_destroy (hx509_crypto
/*crypto*/);
496 hx509_crypto_encrypt (
497 hx509_crypto
/*crypto*/,
498 const void */
*data*/
,
499 const size_t /*length*/,
500 const heim_octet_string */
*ivec*/
,
501 heim_octet_string
**/
*ciphertext*/
);
504 hx509_crypto_enctype_by_name (const char */
*name*/
);
507 hx509_crypto_free_algs (
508 AlgorithmIdentifier */
*val*/
,
509 unsigned int /*len*/);
512 hx509_crypto_get_params (
513 hx509_context
/*context*/,
514 hx509_crypto
/*crypto*/,
515 const heim_octet_string */
*ivec*/
,
516 heim_octet_string */
*param*/
);
520 hx509_context
/*context*/,
521 const char */
*provider*/
,
522 const heim_oid */
*enctype*/
,
523 hx509_crypto */
*crypto*/
);
526 hx509_crypto_provider (hx509_crypto
/*crypto*/);
529 hx509_crypto_random_iv (
530 hx509_crypto
/*crypto*/,
531 heim_octet_string */
*ivec*/
);
534 hx509_crypto_select (
535 const hx509_context
/*context*/,
537 const hx509_private_key
/*source*/,
538 hx509_peer_info
/*peer*/,
539 AlgorithmIdentifier */
*selected*/
);
542 hx509_crypto_set_key_data (
543 hx509_crypto
/*crypto*/,
544 const void */
*data*/
,
548 hx509_crypto_set_key_name (
549 hx509_crypto
/*crypto*/,
550 const char */
*name*/
);
553 hx509_crypto_set_params (
554 hx509_context
/*context*/,
555 hx509_crypto
/*crypto*/,
556 const heim_octet_string */
*param*/
,
557 heim_octet_string */
*ivec*/
);
560 hx509_crypto_set_random_key (
561 hx509_crypto
/*crypto*/,
562 heim_octet_string */
*key*/
);
566 hx509_context
/*context*/,
569 const char */
*value*/
);
572 hx509_env_free (hx509_env */
*env*/
);
576 hx509_context
/*context*/,
581 hx509_context
/*context*/,
588 hx509_context
/*context*/,
595 hx509_free_error_string (char */
*str*/
);
598 hx509_free_octet_string_list (hx509_octet_string_list */
*list*/
);
601 hx509_general_name_unparse (
602 GeneralName */
*name*/
,
606 hx509_get_error_string (
607 hx509_context
/*context*/,
612 hx509_context
/*context*/,
613 hx509_certs
/*certs*/,
617 hx509_lock_add_cert (
618 hx509_context
/*context*/,
620 hx509_cert
/*cert*/);
623 hx509_lock_add_certs (
624 hx509_context
/*context*/,
626 hx509_certs
/*certs*/);
629 hx509_lock_add_password (
631 const char */
*password*/
);
634 hx509_lock_command_string (
636 const char */
*string*/
);
639 hx509_lock_free (hx509_lock
/*lock*/);
643 hx509_context
/*context*/,
644 hx509_lock */
*lock*/
);
649 hx509_prompt */
*prompt*/
);
652 hx509_lock_reset_certs (
653 hx509_context
/*context*/,
654 hx509_lock
/*lock*/);
657 hx509_lock_reset_passwords (hx509_lock
/*lock*/);
660 hx509_lock_reset_promper (hx509_lock
/*lock*/);
663 hx509_lock_set_prompter (
665 hx509_prompter_fct
/*prompt*/,
670 const hx509_name
/*name*/,
671 heim_octet_string */
*os*/
);
680 hx509_context
/*context*/,
681 const hx509_name
/*from*/,
686 hx509_context
/*context*/,
691 hx509_name_free (hx509_name */
*name*/
);
694 hx509_name_is_null_p (const hx509_name
/*name*/);
697 hx509_name_normalize (
698 hx509_context
/*context*/,
699 hx509_name
/*name*/);
703 const hx509_name
/*from*/,
707 hx509_name_to_string (
708 const hx509_name
/*name*/,
713 hx509_context
/*context*/,
714 hx509_certs
/*reqcerts*/,
715 hx509_certs
/*pool*/,
716 hx509_cert
/*signer*/,
717 const AlgorithmIdentifier */
*digest*/
,
718 heim_octet_string */
*request*/
,
719 heim_octet_string */
*nonce*/
);
723 hx509_context
/*context*/,
727 const void */
*data*/
,
729 time_t */
*expiration*/
);
733 const heim_oid */
*oid*/
,
734 hx509_vprint_func
/*func*/,
739 const heim_oid */
*oid*/
,
744 hx509_context
/*context*/,
746 hx509_name */
*name*/
);
749 hx509_peer_info_alloc (
750 hx509_context
/*context*/,
751 hx509_peer_info */
*peer*/
);
754 hx509_peer_info_free (hx509_peer_info
/*peer*/);
757 hx509_peer_info_set_cert (
758 hx509_peer_info
/*peer*/,
759 hx509_cert
/*cert*/);
762 hx509_peer_info_set_cms_algs (
763 hx509_context
/*context*/,
764 hx509_peer_info
/*peer*/,
765 const AlgorithmIdentifier */
*val*/
,
769 hx509_pem_add_header (
770 hx509_pem_header
**/
*headers*/
,
771 const char */
*header*/
,
772 const char */
*value*/
);
775 hx509_pem_find_header (
776 const hx509_pem_header */
*h*/
,
777 const char */
*header*/
);
780 hx509_pem_free_header (hx509_pem_header */
*headers*/
);
784 hx509_context
/*context*/,
786 hx509_pem_read_func
/*func*/,
791 hx509_context
/*context*/,
792 const char */
*type*/
,
793 hx509_pem_header */
*headers*/
,
795 const void */
*data*/
,
805 hx509_prompt_hidden (hx509_prompt_type
/*type*/);
809 hx509_context
/*context*/,
810 hx509_query
**/
*q*/
);
814 hx509_context
/*context*/,
818 hx509_query_match_cmp_func (
820 int (*/
*func*/
)(void *, hx509_cert
),
824 hx509_query_match_friendly_name (
826 const char */
*name*/
);
829 hx509_query_match_issuer_serial (
831 const Name */
*issuer*/
,
832 const heim_integer */
*serialNumber*/
);
835 hx509_query_match_option (
837 hx509_query_option
/*option*/);
840 hx509_query_statistic_file (
841 hx509_context
/*context*/,
845 hx509_query_unparse_stats (
846 hx509_context
/*context*/,
851 hx509_revoke_add_crl (
852 hx509_context
/*context*/,
853 hx509_revoke_ctx
/*ctx*/,
854 const char */
*path*/
);
857 hx509_revoke_add_ocsp (
858 hx509_context
/*context*/,
859 hx509_revoke_ctx
/*ctx*/,
860 const char */
*path*/
);
863 hx509_revoke_free (hx509_revoke_ctx */
*ctx*/
);
867 hx509_context
/*context*/,
868 hx509_revoke_ctx */
*ctx*/
);
871 hx509_revoke_ocsp_print (
872 hx509_context
/*context*/,
873 const char */
*path*/
,
877 hx509_revoke_verify (
878 hx509_context
/*context*/,
879 hx509_revoke_ctx
/*ctx*/,
880 hx509_certs
/*certs*/,
883 hx509_cert
/*parent_cert*/);
886 hx509_set_error_string (
887 hx509_context
/*context*/,
894 hx509_set_error_stringv (
895 hx509_context
/*context*/,
901 const AlgorithmIdentifier
*
902 hx509_signature_md2 (void);
904 const AlgorithmIdentifier
*
905 hx509_signature_md5 (void);
907 const AlgorithmIdentifier
*
908 hx509_signature_rsa (void);
910 const AlgorithmIdentifier
*
911 hx509_signature_rsa_pkcs1_x509 (void);
913 const AlgorithmIdentifier
*
914 hx509_signature_rsa_with_md2 (void);
916 const AlgorithmIdentifier
*
917 hx509_signature_rsa_with_md5 (void);
919 const AlgorithmIdentifier
*
920 hx509_signature_rsa_with_sha1 (void);
922 const AlgorithmIdentifier
*
923 hx509_signature_rsa_with_sha256 (void);
925 const AlgorithmIdentifier
*
926 hx509_signature_rsa_with_sha384 (void);
928 const AlgorithmIdentifier
*
929 hx509_signature_rsa_with_sha512 (void);
931 const AlgorithmIdentifier
*
932 hx509_signature_sha1 (void);
934 const AlgorithmIdentifier
*
935 hx509_signature_sha256 (void);
937 const AlgorithmIdentifier
*
938 hx509_signature_sha384 (void);
940 const AlgorithmIdentifier
*
941 hx509_signature_sha512 (void);
944 hx509_unparse_der_name (
945 const void */
*data*/
,
950 hx509_validate_cert (
951 hx509_context
/*context*/,
952 hx509_validate_ctx
/*ctx*/,
953 hx509_cert
/*cert*/);
956 hx509_validate_ctx_add_flags (
957 hx509_validate_ctx
/*ctx*/,
961 hx509_validate_ctx_free (hx509_validate_ctx
/*ctx*/);
964 hx509_validate_ctx_init (
965 hx509_context
/*context*/,
966 hx509_validate_ctx */
*ctx*/
);
969 hx509_validate_ctx_set_print (
970 hx509_validate_ctx
/*ctx*/,
971 hx509_vprint_func
/*func*/,
975 hx509_verify_attach_anchors (
976 hx509_verify_ctx
/*ctx*/,
977 hx509_certs
/*set*/);
980 hx509_verify_attach_revoke (
981 hx509_verify_ctx
/*ctx*/,
982 hx509_revoke_ctx
/*revoke_ctx*/);
985 hx509_verify_ctx_f_allow_default_trustanchors (
986 hx509_verify_ctx
/*ctx*/,
990 hx509_verify_destroy_ctx (hx509_verify_ctx
/*ctx*/);
993 hx509_verify_hostname (
994 hx509_context
/*context*/,
995 const hx509_cert
/*cert*/,
997 hx509_hostname_type
/*type*/,
998 const char */
*hostname*/
,
999 const struct sockaddr */
*sa*/
,
1003 hx509_verify_init_ctx (
1004 hx509_context
/*context*/,
1005 hx509_verify_ctx */
*ctx*/
);
1009 hx509_context
/*context*/,
1010 hx509_verify_ctx
/*ctx*/,
1011 hx509_cert
/*cert*/,
1012 hx509_certs
/*pool*/);
1015 hx509_verify_set_max_depth (
1016 hx509_verify_ctx
/*ctx*/,
1017 unsigned int /*max_depth*/);
1020 hx509_verify_set_proxy_certificate (
1021 hx509_verify_ctx
/*ctx*/,
1025 hx509_verify_set_strict_rfc3280_verification (
1026 hx509_verify_ctx
/*ctx*/,
1030 hx509_verify_set_time (
1031 hx509_verify_ctx
/*ctx*/,
1035 hx509_verify_signature (
1036 hx509_context
/*context*/,
1037 const hx509_cert
/*signer*/,
1038 const AlgorithmIdentifier */
*alg*/
,
1039 const heim_octet_string */
*data*/
,
1040 const heim_octet_string */
*sig*/
);
1043 hx509_xfree (void */
*ptr*/
);
1049 #endif /* __hx509_protos_h__ */