1170f4091Selric /* This is a generated file */ 2170f4091Selric #ifndef __hx509_private_h__ 3170f4091Selric #define __hx509_private_h__ 4170f4091Selric 5170f4091Selric #include <stdarg.h> 6170f4091Selric 7170f4091Selric #if !defined(__GNUC__) && !defined(__attribute__) 8170f4091Selric #define __attribute__(x) 9170f4091Selric #endif 10170f4091Selric 11170f4091Selric int 12170f4091Selric _hx509_AlgorithmIdentifier_cmp ( 13170f4091Selric const AlgorithmIdentifier */*p*/, 14170f4091Selric const AlgorithmIdentifier */*q*/); 15170f4091Selric 16170f4091Selric int 17170f4091Selric _hx509_Certificate_cmp ( 18170f4091Selric const Certificate */*p*/, 19170f4091Selric const Certificate */*q*/); 20170f4091Selric 21170f4091Selric int 22170f4091Selric _hx509_Name_to_string ( 23170f4091Selric const Name */*n*/, 24170f4091Selric char **/*str*/); 25170f4091Selric 26170f4091Selric time_t 27170f4091Selric _hx509_Time2time_t (const Time */*t*/); 28170f4091Selric 29170f4091Selric void 30170f4091Selric _hx509_abort ( 31170f4091Selric const char */*fmt*/, 32170f4091Selric ...) 33*d3273b5bSchristos __attribute__ ((__noreturn__, __format__ (__printf__, 1, 2))); 34170f4091Selric 35170f4091Selric int 36170f4091Selric _hx509_calculate_path ( 37170f4091Selric hx509_context /*context*/, 38170f4091Selric int /*flags*/, 39170f4091Selric time_t /*time_now*/, 40170f4091Selric hx509_certs /*anchors*/, 41170f4091Selric unsigned int /*max_depth*/, 42170f4091Selric hx509_cert /*cert*/, 43170f4091Selric hx509_certs /*pool*/, 44170f4091Selric hx509_path */*path*/); 45170f4091Selric 46170f4091Selric int 47170f4091Selric _hx509_cert_assign_key ( 48170f4091Selric hx509_cert /*cert*/, 49170f4091Selric hx509_private_key /*private_key*/); 50170f4091Selric 51170f4091Selric int 52170f4091Selric _hx509_cert_get_eku ( 53170f4091Selric hx509_context /*context*/, 54170f4091Selric hx509_cert /*cert*/, 55170f4091Selric ExtKeyUsage */*e*/); 56170f4091Selric 57170f4091Selric int 58170f4091Selric _hx509_cert_get_keyusage ( 59170f4091Selric hx509_context /*context*/, 60170f4091Selric hx509_cert /*c*/, 61170f4091Selric KeyUsage */*ku*/); 62170f4091Selric 63170f4091Selric int 64170f4091Selric _hx509_cert_get_version (const Certificate */*t*/); 65170f4091Selric 66170f4091Selric int 67170f4091Selric _hx509_cert_is_parent_cmp ( 68170f4091Selric const Certificate */*subject*/, 69170f4091Selric const Certificate */*issuer*/, 70170f4091Selric int /*allow_self_signed*/); 71170f4091Selric 72170f4091Selric int 73170f4091Selric _hx509_cert_private_decrypt ( 74170f4091Selric hx509_context /*context*/, 75170f4091Selric const heim_octet_string */*ciphertext*/, 76170f4091Selric const heim_oid */*encryption_oid*/, 77170f4091Selric hx509_cert /*p*/, 78170f4091Selric heim_octet_string */*cleartext*/); 79170f4091Selric 80170f4091Selric hx509_private_key 81170f4091Selric _hx509_cert_private_key (hx509_cert /*p*/); 82170f4091Selric 83170f4091Selric int 84170f4091Selric _hx509_cert_private_key_exportable (hx509_cert /*p*/); 85170f4091Selric 86170f4091Selric void 87170f4091Selric _hx509_cert_set_release ( 88170f4091Selric hx509_cert /*cert*/, 89170f4091Selric _hx509_cert_release_func /*release*/, 90170f4091Selric void */*ctx*/); 91170f4091Selric 92170f4091Selric int 93170f4091Selric _hx509_cert_to_env ( 94170f4091Selric hx509_context /*context*/, 95170f4091Selric hx509_cert /*cert*/, 96170f4091Selric hx509_env */*env*/); 97170f4091Selric 98170f4091Selric int 99170f4091Selric _hx509_certs_keys_add ( 100170f4091Selric hx509_context /*context*/, 101170f4091Selric hx509_certs /*certs*/, 102170f4091Selric hx509_private_key /*key*/); 103170f4091Selric 104170f4091Selric void 105170f4091Selric _hx509_certs_keys_free ( 106170f4091Selric hx509_context /*context*/, 107170f4091Selric hx509_private_key */*keys*/); 108170f4091Selric 109170f4091Selric int 110170f4091Selric _hx509_certs_keys_get ( 111170f4091Selric hx509_context /*context*/, 112170f4091Selric hx509_certs /*certs*/, 113170f4091Selric hx509_private_key **/*keys*/); 114170f4091Selric 115170f4091Selric int 116170f4091Selric _hx509_check_key_usage ( 117170f4091Selric hx509_context /*context*/, 118170f4091Selric hx509_cert /*cert*/, 119170f4091Selric unsigned /*flags*/, 120170f4091Selric int /*req_present*/); 121170f4091Selric 122170f4091Selric int 123170f4091Selric _hx509_collector_alloc ( 124170f4091Selric hx509_context /*context*/, 125170f4091Selric hx509_lock /*lock*/, 126170f4091Selric struct hx509_collector **/*collector*/); 127170f4091Selric 128170f4091Selric int 129170f4091Selric _hx509_collector_certs_add ( 130170f4091Selric hx509_context /*context*/, 131170f4091Selric struct hx509_collector */*c*/, 132170f4091Selric hx509_cert /*cert*/); 133170f4091Selric 134170f4091Selric int 135170f4091Selric _hx509_collector_collect_certs ( 136170f4091Selric hx509_context /*context*/, 137170f4091Selric struct hx509_collector */*c*/, 138170f4091Selric hx509_certs */*ret_certs*/); 139170f4091Selric 140170f4091Selric int 141170f4091Selric _hx509_collector_collect_private_keys ( 142170f4091Selric hx509_context /*context*/, 143170f4091Selric struct hx509_collector */*c*/, 144170f4091Selric hx509_private_key **/*keys*/); 145170f4091Selric 146170f4091Selric void 147170f4091Selric _hx509_collector_free (struct hx509_collector */*c*/); 148170f4091Selric 149170f4091Selric hx509_lock 150170f4091Selric _hx509_collector_get_lock (struct hx509_collector */*c*/); 151170f4091Selric 152170f4091Selric int 153170f4091Selric _hx509_collector_private_key_add ( 154170f4091Selric hx509_context /*context*/, 155170f4091Selric struct hx509_collector */*c*/, 156170f4091Selric const AlgorithmIdentifier */*alg*/, 157170f4091Selric hx509_private_key /*private_key*/, 158170f4091Selric const heim_octet_string */*key_data*/, 159170f4091Selric const heim_octet_string */*localKeyId*/); 160170f4091Selric 161170f4091Selric int 162170f4091Selric _hx509_create_signature ( 163170f4091Selric hx509_context /*context*/, 164170f4091Selric const hx509_private_key /*signer*/, 165170f4091Selric const AlgorithmIdentifier */*alg*/, 166170f4091Selric const heim_octet_string */*data*/, 167170f4091Selric AlgorithmIdentifier */*signatureAlgorithm*/, 168170f4091Selric heim_octet_string */*sig*/); 169170f4091Selric 170170f4091Selric int 171170f4091Selric _hx509_create_signature_bitstring ( 172170f4091Selric hx509_context /*context*/, 173170f4091Selric const hx509_private_key /*signer*/, 174170f4091Selric const AlgorithmIdentifier */*alg*/, 175170f4091Selric const heim_octet_string */*data*/, 176170f4091Selric AlgorithmIdentifier */*signatureAlgorithm*/, 177170f4091Selric heim_bit_string */*sig*/); 178170f4091Selric 179170f4091Selric int 180170f4091Selric _hx509_expr_eval ( 181170f4091Selric hx509_context /*context*/, 182170f4091Selric hx509_env /*env*/, 183170f4091Selric struct hx_expr */*expr*/); 184170f4091Selric 185170f4091Selric void 186170f4091Selric _hx509_expr_free (struct hx_expr */*expr*/); 187170f4091Selric 188170f4091Selric struct hx_expr * 189170f4091Selric _hx509_expr_parse (const char */*buf*/); 190170f4091Selric 191170f4091Selric int 192170f4091Selric _hx509_find_extension_subject_key_id ( 193170f4091Selric const Certificate */*issuer*/, 194170f4091Selric SubjectKeyIdentifier */*si*/); 195170f4091Selric 196*d3273b5bSchristos const struct signature_alg * 197*d3273b5bSchristos _hx509_find_sig_alg (const heim_oid */*oid*/); 198*d3273b5bSchristos 199170f4091Selric int 200170f4091Selric _hx509_generate_private_key ( 201170f4091Selric hx509_context /*context*/, 202170f4091Selric struct hx509_generate_private_context */*ctx*/, 203170f4091Selric hx509_private_key */*private_key*/); 204170f4091Selric 205170f4091Selric int 206170f4091Selric _hx509_generate_private_key_bits ( 207170f4091Selric hx509_context /*context*/, 208170f4091Selric struct hx509_generate_private_context */*ctx*/, 209170f4091Selric unsigned long /*bits*/); 210170f4091Selric 211170f4091Selric void 212170f4091Selric _hx509_generate_private_key_free (struct hx509_generate_private_context **/*ctx*/); 213170f4091Selric 214170f4091Selric int 215170f4091Selric _hx509_generate_private_key_init ( 216170f4091Selric hx509_context /*context*/, 217170f4091Selric const heim_oid */*oid*/, 218170f4091Selric struct hx509_generate_private_context **/*ctx*/); 219170f4091Selric 220170f4091Selric int 221170f4091Selric _hx509_generate_private_key_is_ca ( 222170f4091Selric hx509_context /*context*/, 223170f4091Selric struct hx509_generate_private_context */*ctx*/); 224170f4091Selric 225170f4091Selric Certificate * 226170f4091Selric _hx509_get_cert (hx509_cert /*cert*/); 227170f4091Selric 228170f4091Selric void 229170f4091Selric _hx509_ks_dir_register (hx509_context /*context*/); 230170f4091Selric 231170f4091Selric void 232170f4091Selric _hx509_ks_file_register (hx509_context /*context*/); 233170f4091Selric 234170f4091Selric void 235170f4091Selric _hx509_ks_keychain_register (hx509_context /*context*/); 236170f4091Selric 237170f4091Selric void 238170f4091Selric _hx509_ks_mem_register (hx509_context /*context*/); 239170f4091Selric 240170f4091Selric void 241170f4091Selric _hx509_ks_null_register (hx509_context /*context*/); 242170f4091Selric 243170f4091Selric void 244170f4091Selric _hx509_ks_pkcs11_register (hx509_context /*context*/); 245170f4091Selric 246170f4091Selric void 247170f4091Selric _hx509_ks_pkcs12_register (hx509_context /*context*/); 248170f4091Selric 249170f4091Selric void 250170f4091Selric _hx509_ks_register ( 251170f4091Selric hx509_context /*context*/, 252170f4091Selric struct hx509_keyset_ops */*ops*/); 253170f4091Selric 254170f4091Selric int 255170f4091Selric _hx509_lock_find_cert ( 256170f4091Selric hx509_lock /*lock*/, 257170f4091Selric const hx509_query */*q*/, 258170f4091Selric hx509_cert */*c*/); 259170f4091Selric 260170f4091Selric const struct _hx509_password * 261170f4091Selric _hx509_lock_get_passwords (hx509_lock /*lock*/); 262170f4091Selric 263170f4091Selric hx509_certs 264170f4091Selric _hx509_lock_unlock_certs (hx509_lock /*lock*/); 265170f4091Selric 266170f4091Selric struct hx_expr * 267170f4091Selric _hx509_make_expr ( 268170f4091Selric enum hx_expr_op /*op*/, 269170f4091Selric void */*arg1*/, 270170f4091Selric void */*arg2*/); 271170f4091Selric 272170f4091Selric int 273170f4091Selric _hx509_map_file_os ( 274170f4091Selric const char */*fn*/, 275170f4091Selric heim_octet_string */*os*/); 276170f4091Selric 277170f4091Selric int 278170f4091Selric _hx509_match_keys ( 279170f4091Selric hx509_cert /*c*/, 280170f4091Selric hx509_private_key /*key*/); 281170f4091Selric 282170f4091Selric int 283170f4091Selric _hx509_name_cmp ( 284170f4091Selric const Name */*n1*/, 285170f4091Selric const Name */*n2*/, 286170f4091Selric int */*c*/); 287170f4091Selric 288170f4091Selric int 289170f4091Selric _hx509_name_ds_cmp ( 290170f4091Selric const DirectoryString */*ds1*/, 291170f4091Selric const DirectoryString */*ds2*/, 292170f4091Selric int */*diff*/); 293170f4091Selric 294170f4091Selric int 295170f4091Selric _hx509_name_from_Name ( 296170f4091Selric const Name */*n*/, 297170f4091Selric hx509_name */*name*/); 298170f4091Selric 299170f4091Selric int 300170f4091Selric _hx509_name_modify ( 301170f4091Selric hx509_context /*context*/, 302170f4091Selric Name */*name*/, 303170f4091Selric int /*append*/, 304170f4091Selric const heim_oid */*oid*/, 305170f4091Selric const char */*str*/); 306170f4091Selric 307170f4091Selric int 308170f4091Selric _hx509_path_append ( 309170f4091Selric hx509_context /*context*/, 310170f4091Selric hx509_path */*path*/, 311170f4091Selric hx509_cert /*cert*/); 312170f4091Selric 313170f4091Selric void 314170f4091Selric _hx509_path_free (hx509_path */*path*/); 315170f4091Selric 316170f4091Selric int 317170f4091Selric _hx509_pbe_decrypt ( 318170f4091Selric hx509_context /*context*/, 319170f4091Selric hx509_lock /*lock*/, 320170f4091Selric const AlgorithmIdentifier */*ai*/, 321170f4091Selric const heim_octet_string */*econtent*/, 322170f4091Selric heim_octet_string */*content*/); 323170f4091Selric 324170f4091Selric int 325170f4091Selric _hx509_pbe_encrypt ( 326170f4091Selric hx509_context /*context*/, 327170f4091Selric hx509_lock /*lock*/, 328170f4091Selric const AlgorithmIdentifier */*ai*/, 329170f4091Selric const heim_octet_string */*content*/, 330170f4091Selric heim_octet_string */*econtent*/); 331170f4091Selric 332170f4091Selric void 333170f4091Selric _hx509_pi_printf ( 334170f4091Selric int (*/*func*/)(void *, const char *), 335170f4091Selric void */*ctx*/, 336170f4091Selric const char */*fmt*/, 337170f4091Selric ...); 338170f4091Selric 339*d3273b5bSchristos void 340*d3273b5bSchristos _hx509_private_eckey_free (void */*eckey*/); 341*d3273b5bSchristos 342170f4091Selric int 343170f4091Selric _hx509_private_key_export ( 344170f4091Selric hx509_context /*context*/, 345170f4091Selric const hx509_private_key /*key*/, 346170f4091Selric hx509_key_format_t /*format*/, 347170f4091Selric heim_octet_string */*data*/); 348170f4091Selric 349170f4091Selric int 350170f4091Selric _hx509_private_key_exportable (hx509_private_key /*key*/); 351170f4091Selric 352170f4091Selric BIGNUM * 353170f4091Selric _hx509_private_key_get_internal ( 354170f4091Selric hx509_context /*context*/, 355170f4091Selric hx509_private_key /*key*/, 356170f4091Selric const char */*type*/); 357170f4091Selric 358170f4091Selric int 359170f4091Selric _hx509_private_key_oid ( 360170f4091Selric hx509_context /*context*/, 361170f4091Selric const hx509_private_key /*key*/, 362170f4091Selric heim_oid */*data*/); 363170f4091Selric 364170f4091Selric hx509_private_key 365170f4091Selric _hx509_private_key_ref (hx509_private_key /*key*/); 366170f4091Selric 367170f4091Selric const char * 368170f4091Selric _hx509_private_pem_name (hx509_private_key /*key*/); 369170f4091Selric 370170f4091Selric int 371170f4091Selric _hx509_public_encrypt ( 372170f4091Selric hx509_context /*context*/, 373170f4091Selric const heim_octet_string */*cleartext*/, 374170f4091Selric const Certificate */*cert*/, 375170f4091Selric heim_oid */*encryption_oid*/, 376170f4091Selric heim_octet_string */*ciphertext*/); 377170f4091Selric 378170f4091Selric void 379170f4091Selric _hx509_query_clear (hx509_query */*q*/); 380170f4091Selric 381170f4091Selric int 382170f4091Selric _hx509_query_match_cert ( 383170f4091Selric hx509_context /*context*/, 384170f4091Selric const hx509_query */*q*/, 385170f4091Selric hx509_cert /*cert*/); 386170f4091Selric 387170f4091Selric void 388170f4091Selric _hx509_query_statistic ( 389170f4091Selric hx509_context /*context*/, 390170f4091Selric int /*type*/, 391170f4091Selric const hx509_query */*q*/); 392170f4091Selric 393170f4091Selric int 394170f4091Selric _hx509_request_add_dns_name ( 395170f4091Selric hx509_context /*context*/, 396170f4091Selric hx509_request /*req*/, 397170f4091Selric const char */*hostname*/); 398170f4091Selric 399170f4091Selric int 400170f4091Selric _hx509_request_add_eku ( 401170f4091Selric hx509_context /*context*/, 402170f4091Selric hx509_request /*req*/, 403170f4091Selric const heim_oid */*oid*/); 404170f4091Selric 405170f4091Selric int 406170f4091Selric _hx509_request_add_email ( 407170f4091Selric hx509_context /*context*/, 408170f4091Selric hx509_request /*req*/, 409170f4091Selric const char */*email*/); 410170f4091Selric 411170f4091Selric int 412170f4091Selric _hx509_request_parse ( 413170f4091Selric hx509_context /*context*/, 414170f4091Selric const char */*path*/, 415170f4091Selric hx509_request */*req*/); 416170f4091Selric 417170f4091Selric int 418170f4091Selric _hx509_request_print ( 419170f4091Selric hx509_context /*context*/, 420170f4091Selric hx509_request /*req*/, 421170f4091Selric FILE */*f*/); 422170f4091Selric 423170f4091Selric int 424170f4091Selric _hx509_request_to_pkcs10 ( 425170f4091Selric hx509_context /*context*/, 426170f4091Selric const hx509_request /*req*/, 427170f4091Selric const hx509_private_key /*signer*/, 428170f4091Selric heim_octet_string */*request*/); 429170f4091Selric 430170f4091Selric hx509_revoke_ctx 431170f4091Selric _hx509_revoke_ref (hx509_revoke_ctx /*ctx*/); 432170f4091Selric 433170f4091Selric void 4345a3d3c76Spettai _hx509_sel_yyerror (const char */*s*/); 435170f4091Selric 436170f4091Selric int 437170f4091Selric _hx509_self_signed_valid ( 438170f4091Selric hx509_context /*context*/, 439170f4091Selric const AlgorithmIdentifier */*alg*/); 440170f4091Selric 441170f4091Selric int 442170f4091Selric _hx509_set_cert_attribute ( 443170f4091Selric hx509_context /*context*/, 444170f4091Selric hx509_cert /*cert*/, 445170f4091Selric const heim_oid */*oid*/, 446170f4091Selric const heim_octet_string */*attr*/); 447170f4091Selric 448170f4091Selric int 449*d3273b5bSchristos _hx509_set_digest_alg ( 450*d3273b5bSchristos DigestAlgorithmIdentifier */*id*/, 451*d3273b5bSchristos const heim_oid */*oid*/, 452*d3273b5bSchristos const void */*param*/, 453*d3273b5bSchristos size_t /*length*/); 454*d3273b5bSchristos 455*d3273b5bSchristos int 456*d3273b5bSchristos _hx509_signature_is_weak ( 457170f4091Selric hx509_context /*context*/, 458*d3273b5bSchristos const AlgorithmIdentifier */*alg*/); 459170f4091Selric 460170f4091Selric void 461170f4091Selric _hx509_unmap_file_os (heim_octet_string */*os*/); 462170f4091Selric 463170f4091Selric int 464170f4091Selric _hx509_unparse_Name ( 465170f4091Selric const Name */*aname*/, 466170f4091Selric char **/*str*/); 467170f4091Selric 468170f4091Selric time_t 469170f4091Selric _hx509_verify_get_time (hx509_verify_ctx /*ctx*/); 470170f4091Selric 471170f4091Selric int 472170f4091Selric _hx509_verify_signature ( 473170f4091Selric hx509_context /*context*/, 474170f4091Selric const hx509_cert /*cert*/, 475170f4091Selric const AlgorithmIdentifier */*alg*/, 476170f4091Selric const heim_octet_string */*data*/, 477170f4091Selric const heim_octet_string */*sig*/); 478170f4091Selric 479170f4091Selric int 480170f4091Selric _hx509_verify_signature_bitstring ( 481170f4091Selric hx509_context /*context*/, 482170f4091Selric const hx509_cert /*signer*/, 483170f4091Selric const AlgorithmIdentifier */*alg*/, 484170f4091Selric const heim_octet_string */*data*/, 485170f4091Selric const heim_bit_string */*sig*/); 486170f4091Selric 487170f4091Selric int 488170f4091Selric _hx509_write_file ( 489170f4091Selric const char */*fn*/, 490170f4091Selric const void */*data*/, 491170f4091Selric size_t /*length*/); 492170f4091Selric 493170f4091Selric #endif /* __hx509_private_h__ */ 494