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