hx509-private.h revision 178825
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 86int 87_hx509_cert_public_encrypt ( 88 hx509_context /*context*/, 89 const heim_octet_string */*cleartext*/, 90 const hx509_cert /*p*/, 91 heim_oid */*encryption_oid*/, 92 heim_octet_string */*ciphertext*/); 93 94void 95_hx509_cert_set_release ( 96 hx509_cert /*cert*/, 97 _hx509_cert_release_func /*release*/, 98 void */*ctx*/); 99 100int 101_hx509_certs_keys_add ( 102 hx509_context /*context*/, 103 hx509_certs /*certs*/, 104 hx509_private_key /*key*/); 105 106void 107_hx509_certs_keys_free ( 108 hx509_context /*context*/, 109 hx509_private_key */*keys*/); 110 111int 112_hx509_certs_keys_get ( 113 hx509_context /*context*/, 114 hx509_certs /*certs*/, 115 hx509_private_key **/*keys*/); 116 117hx509_certs 118_hx509_certs_ref (hx509_certs /*certs*/); 119 120int 121_hx509_check_key_usage ( 122 hx509_context /*context*/, 123 hx509_cert /*cert*/, 124 unsigned /*flags*/, 125 int /*req_present*/); 126 127int 128_hx509_collector_alloc ( 129 hx509_context /*context*/, 130 hx509_lock /*lock*/, 131 struct hx509_collector **/*collector*/); 132 133int 134_hx509_collector_certs_add ( 135 hx509_context /*context*/, 136 struct hx509_collector */*c*/, 137 hx509_cert /*cert*/); 138 139int 140_hx509_collector_collect_certs ( 141 hx509_context /*context*/, 142 struct hx509_collector */*c*/, 143 hx509_certs */*ret_certs*/); 144 145int 146_hx509_collector_collect_private_keys ( 147 hx509_context /*context*/, 148 struct hx509_collector */*c*/, 149 hx509_private_key **/*keys*/); 150 151void 152_hx509_collector_free (struct hx509_collector */*c*/); 153 154hx509_lock 155_hx509_collector_get_lock (struct hx509_collector */*c*/); 156 157int 158_hx509_collector_private_key_add ( 159 hx509_context /*context*/, 160 struct hx509_collector */*c*/, 161 const AlgorithmIdentifier */*alg*/, 162 hx509_private_key /*private_key*/, 163 const heim_octet_string */*key_data*/, 164 const heim_octet_string */*localKeyId*/); 165 166int 167_hx509_create_signature ( 168 hx509_context /*context*/, 169 const hx509_private_key /*signer*/, 170 const AlgorithmIdentifier */*alg*/, 171 const heim_octet_string */*data*/, 172 AlgorithmIdentifier */*signatureAlgorithm*/, 173 heim_octet_string */*sig*/); 174 175int 176_hx509_create_signature_bitstring ( 177 hx509_context /*context*/, 178 const hx509_private_key /*signer*/, 179 const AlgorithmIdentifier */*alg*/, 180 const heim_octet_string */*data*/, 181 AlgorithmIdentifier */*signatureAlgorithm*/, 182 heim_bit_string */*sig*/); 183 184int 185_hx509_find_extension_subject_key_id ( 186 const Certificate */*issuer*/, 187 SubjectKeyIdentifier */*si*/); 188 189int 190_hx509_generate_private_key ( 191 hx509_context /*context*/, 192 struct hx509_generate_private_context */*ctx*/, 193 hx509_private_key */*private_key*/); 194 195int 196_hx509_generate_private_key_bits ( 197 hx509_context /*context*/, 198 struct hx509_generate_private_context */*ctx*/, 199 unsigned long /*bits*/); 200 201void 202_hx509_generate_private_key_free (struct hx509_generate_private_context **/*ctx*/); 203 204int 205_hx509_generate_private_key_init ( 206 hx509_context /*context*/, 207 const heim_oid */*oid*/, 208 struct hx509_generate_private_context **/*ctx*/); 209 210int 211_hx509_generate_private_key_is_ca ( 212 hx509_context /*context*/, 213 struct hx509_generate_private_context */*ctx*/); 214 215Certificate * 216_hx509_get_cert (hx509_cert /*cert*/); 217 218void 219_hx509_ks_dir_register (hx509_context /*context*/); 220 221void 222_hx509_ks_file_register (hx509_context /*context*/); 223 224void 225_hx509_ks_keychain_register (hx509_context /*context*/); 226 227void 228_hx509_ks_mem_register (hx509_context /*context*/); 229 230void 231_hx509_ks_null_register (hx509_context /*context*/); 232 233void 234_hx509_ks_pkcs11_register (hx509_context /*context*/); 235 236void 237_hx509_ks_pkcs12_register (hx509_context /*context*/); 238 239void 240_hx509_ks_register ( 241 hx509_context /*context*/, 242 struct hx509_keyset_ops */*ops*/); 243 244int 245_hx509_lock_find_cert ( 246 hx509_lock /*lock*/, 247 const hx509_query */*q*/, 248 hx509_cert */*c*/); 249 250const struct _hx509_password * 251_hx509_lock_get_passwords (hx509_lock /*lock*/); 252 253hx509_certs 254_hx509_lock_unlock_certs (hx509_lock /*lock*/); 255 256int 257_hx509_map_file ( 258 const char */*fn*/, 259 void **/*data*/, 260 size_t */*length*/, 261 struct stat */*rsb*/); 262 263int 264_hx509_map_file_os ( 265 const char */*fn*/, 266 heim_octet_string */*os*/, 267 struct stat */*rsb*/); 268 269int 270_hx509_match_keys ( 271 hx509_cert /*c*/, 272 hx509_private_key /*private_key*/); 273 274int 275_hx509_name_cmp ( 276 const Name */*n1*/, 277 const Name */*n2*/); 278 279int 280_hx509_name_ds_cmp ( 281 const DirectoryString */*ds1*/, 282 const DirectoryString */*ds2*/); 283 284int 285_hx509_name_from_Name ( 286 const Name */*n*/, 287 hx509_name */*name*/); 288 289int 290_hx509_name_modify ( 291 hx509_context /*context*/, 292 Name */*name*/, 293 int /*append*/, 294 const heim_oid */*oid*/, 295 const char */*str*/); 296 297int 298_hx509_parse_private_key ( 299 hx509_context /*context*/, 300 const heim_oid */*key_oid*/, 301 const void */*data*/, 302 size_t /*len*/, 303 hx509_private_key */*private_key*/); 304 305int 306_hx509_path_append ( 307 hx509_context /*context*/, 308 hx509_path */*path*/, 309 hx509_cert /*cert*/); 310 311void 312_hx509_path_free (hx509_path */*path*/); 313 314int 315_hx509_pbe_decrypt ( 316 hx509_context /*context*/, 317 hx509_lock /*lock*/, 318 const AlgorithmIdentifier */*ai*/, 319 const heim_octet_string */*econtent*/, 320 heim_octet_string */*content*/); 321 322int 323_hx509_pbe_encrypt ( 324 hx509_context /*context*/, 325 hx509_lock /*lock*/, 326 const AlgorithmIdentifier */*ai*/, 327 const heim_octet_string */*content*/, 328 heim_octet_string */*econtent*/); 329 330void 331_hx509_pi_printf ( 332 int (*/*func*/)(void *, const char *), 333 void */*ctx*/, 334 const char */*fmt*/, 335 ...); 336 337int 338_hx509_private_key2SPKI ( 339 hx509_context /*context*/, 340 hx509_private_key /*private_key*/, 341 SubjectPublicKeyInfo */*spki*/); 342 343void 344_hx509_private_key_assign_rsa ( 345 hx509_private_key /*key*/, 346 void */*ptr*/); 347 348int 349_hx509_private_key_export ( 350 hx509_context /*context*/, 351 const hx509_private_key /*key*/, 352 heim_octet_string */*data*/); 353 354int 355_hx509_private_key_exportable (hx509_private_key /*key*/); 356 357int 358_hx509_private_key_free (hx509_private_key */*key*/); 359 360BIGNUM * 361_hx509_private_key_get_internal ( 362 hx509_context /*context*/, 363 hx509_private_key /*key*/, 364 const char */*type*/); 365 366int 367_hx509_private_key_init ( 368 hx509_private_key */*key*/, 369 hx509_private_key_ops */*ops*/, 370 void */*keydata*/); 371 372int 373_hx509_private_key_oid ( 374 hx509_context /*context*/, 375 const hx509_private_key /*key*/, 376 heim_oid */*data*/); 377 378int 379_hx509_private_key_private_decrypt ( 380 hx509_context /*context*/, 381 const heim_octet_string */*ciphertext*/, 382 const heim_oid */*encryption_oid*/, 383 hx509_private_key /*p*/, 384 heim_octet_string */*cleartext*/); 385 386hx509_private_key 387_hx509_private_key_ref (hx509_private_key /*key*/); 388 389const char * 390_hx509_private_pem_name (hx509_private_key /*key*/); 391 392int 393_hx509_public_encrypt ( 394 hx509_context /*context*/, 395 const heim_octet_string */*cleartext*/, 396 const Certificate */*cert*/, 397 heim_oid */*encryption_oid*/, 398 heim_octet_string */*ciphertext*/); 399 400void 401_hx509_query_clear (hx509_query */*q*/); 402 403int 404_hx509_query_match_cert ( 405 hx509_context /*context*/, 406 const hx509_query */*q*/, 407 hx509_cert /*cert*/); 408 409void 410_hx509_query_statistic ( 411 hx509_context /*context*/, 412 int /*type*/, 413 const hx509_query */*q*/); 414 415int 416_hx509_request_add_dns_name ( 417 hx509_context /*context*/, 418 hx509_request /*req*/, 419 const char */*hostname*/); 420 421int 422_hx509_request_add_eku ( 423 hx509_context /*context*/, 424 hx509_request /*req*/, 425 const heim_oid */*oid*/); 426 427int 428_hx509_request_add_email ( 429 hx509_context /*context*/, 430 hx509_request /*req*/, 431 const char */*email*/); 432 433void 434_hx509_request_free (hx509_request */*req*/); 435 436int 437_hx509_request_get_SubjectPublicKeyInfo ( 438 hx509_context /*context*/, 439 hx509_request /*req*/, 440 SubjectPublicKeyInfo */*key*/); 441 442int 443_hx509_request_get_name ( 444 hx509_context /*context*/, 445 hx509_request /*req*/, 446 hx509_name */*name*/); 447 448int 449_hx509_request_init ( 450 hx509_context /*context*/, 451 hx509_request */*req*/); 452 453int 454_hx509_request_parse ( 455 hx509_context /*context*/, 456 const char */*path*/, 457 hx509_request */*req*/); 458 459int 460_hx509_request_print ( 461 hx509_context /*context*/, 462 hx509_request /*req*/, 463 FILE */*f*/); 464 465int 466_hx509_request_set_SubjectPublicKeyInfo ( 467 hx509_context /*context*/, 468 hx509_request /*req*/, 469 const SubjectPublicKeyInfo */*key*/); 470 471int 472_hx509_request_set_name ( 473 hx509_context /*context*/, 474 hx509_request /*req*/, 475 hx509_name /*name*/); 476 477int 478_hx509_request_to_pkcs10 ( 479 hx509_context /*context*/, 480 const hx509_request /*req*/, 481 const hx509_private_key /*signer*/, 482 heim_octet_string */*request*/); 483 484hx509_revoke_ctx 485_hx509_revoke_ref (hx509_revoke_ctx /*ctx*/); 486 487int 488_hx509_set_cert_attribute ( 489 hx509_context /*context*/, 490 hx509_cert /*cert*/, 491 const heim_oid */*oid*/, 492 const heim_octet_string */*attr*/); 493 494void 495_hx509_unmap_file ( 496 void */*data*/, 497 size_t /*len*/); 498 499void 500_hx509_unmap_file_os (heim_octet_string */*os*/); 501 502int 503_hx509_unparse_Name ( 504 const Name */*aname*/, 505 char **/*str*/); 506 507int 508_hx509_verify_signature ( 509 hx509_context /*context*/, 510 const Certificate */*signer*/, 511 const AlgorithmIdentifier */*alg*/, 512 const heim_octet_string */*data*/, 513 const heim_octet_string */*sig*/); 514 515int 516_hx509_verify_signature_bitstring ( 517 hx509_context /*context*/, 518 const Certificate */*signer*/, 519 const AlgorithmIdentifier */*alg*/, 520 const heim_octet_string */*data*/, 521 const heim_bit_string */*sig*/); 522 523int 524_hx509_write_file ( 525 const char */*fn*/, 526 const void */*data*/, 527 size_t /*length*/); 528 529#endif /* __hx509_private_h__ */ 530