1 /* This is a generated file */ 2 #ifndef __hdb_protos_h__ 3 #define __hdb_protos_h__ 4 #ifndef DOXY 5 6 #include <stdarg.h> 7 8 #ifdef __cplusplus 9 extern "C" { 10 #endif 11 12 krb5_error_code 13 entry2mit_string_int ( 14 krb5_context /*context*/, 15 krb5_storage */*sp*/, 16 hdb_entry */*ent*/); 17 18 /** 19 * This function adds an HDB entry's current keyset to the entry's key 20 * history. The current keyset is left alone; the caller is responsible 21 * for freeing it. 22 * 23 * @param context Context 24 * @param entry HDB entry 25 */ 26 27 krb5_error_code 28 hdb_add_current_keys_to_history ( 29 krb5_context /*context*/, 30 hdb_entry */*entry*/); 31 32 /** 33 * This function adds a key to an HDB entry's key history. 34 * 35 * @param context Context 36 * @param entry HDB entry 37 * @param kvno Key version number of the key to add to the history 38 * @param key The Key to add 39 */ 40 41 krb5_error_code 42 hdb_add_history_key ( 43 krb5_context /*context*/, 44 hdb_entry */*entry*/, 45 krb5_kvno /*kvno*/, 46 Key */*key*/); 47 48 krb5_error_code 49 hdb_add_master_key ( 50 krb5_context /*context*/, 51 krb5_keyblock */*key*/, 52 hdb_master_key */*inout*/); 53 54 /** 55 * This function changes an hdb_entry's kvno, swapping the current key 56 * set with a historical keyset. If no historical keys are found then 57 * an error is returned (the caller can still set entry->kvno directly). 58 * 59 * @param context krb5_context 60 * @param new_kvno New kvno for the entry 61 * @param entry hdb_entry to modify 62 */ 63 64 krb5_error_code 65 hdb_change_kvno ( 66 krb5_context /*context*/, 67 krb5_kvno /*new_kvno*/, 68 hdb_entry */*entry*/); 69 70 krb5_error_code 71 hdb_check_db_format ( 72 krb5_context /*context*/, 73 HDB */*db*/); 74 75 krb5_error_code 76 hdb_clear_extension ( 77 krb5_context /*context*/, 78 hdb_entry */*entry*/, 79 int /*type*/); 80 81 krb5_error_code 82 hdb_clear_master_key ( 83 krb5_context /*context*/, 84 HDB */*db*/); 85 86 /** 87 * Create a handle for a Kerberos database 88 * 89 * Create a handle for a Kerberos database backend specified by a 90 * filename. Doesn't create a file if its doesn't exists, you have to 91 * use O_CREAT to tell the backend to create the file. 92 */ 93 94 krb5_error_code 95 hdb_create ( 96 krb5_context /*context*/, 97 HDB **/*db*/, 98 const char */*filename*/); 99 100 krb5_error_code 101 hdb_db1_create ( 102 krb5_context /*context*/, 103 HDB **/*db*/, 104 const char */*filename*/); 105 106 krb5_error_code 107 hdb_db3_create ( 108 krb5_context /*context*/, 109 HDB **/*db*/, 110 const char */*filename*/); 111 112 /** 113 * Return the directory where the hdb database resides. 114 * 115 * @param context Kerberos 5 context. 116 * 117 * @return string pointing to directory. 118 */ 119 120 const char * 121 hdb_db_dir (krb5_context /*context*/); 122 123 const char * 124 hdb_dbinfo_get_acl_file ( 125 krb5_context /*context*/, 126 struct hdb_dbinfo */*dbp*/); 127 128 const krb5_config_binding * 129 hdb_dbinfo_get_binding ( 130 krb5_context /*context*/, 131 struct hdb_dbinfo */*dbp*/); 132 133 const char * 134 hdb_dbinfo_get_dbname ( 135 krb5_context /*context*/, 136 struct hdb_dbinfo */*dbp*/); 137 138 const char * 139 hdb_dbinfo_get_label ( 140 krb5_context /*context*/, 141 struct hdb_dbinfo */*dbp*/); 142 143 const char * 144 hdb_dbinfo_get_log_file ( 145 krb5_context /*context*/, 146 struct hdb_dbinfo */*dbp*/); 147 148 const char * 149 hdb_dbinfo_get_mkey_file ( 150 krb5_context /*context*/, 151 struct hdb_dbinfo */*dbp*/); 152 153 struct hdb_dbinfo * 154 hdb_dbinfo_get_next ( 155 struct hdb_dbinfo */*dbp*/, 156 struct hdb_dbinfo */*dbprevp*/); 157 158 const char * 159 hdb_dbinfo_get_realm ( 160 krb5_context /*context*/, 161 struct hdb_dbinfo */*dbp*/); 162 163 /** 164 * Return the default hdb database resides. 165 * 166 * @param context Kerberos 5 context. 167 * 168 * @return string pointing to directory. 169 */ 170 171 const char * 172 hdb_default_db (krb5_context /*context*/); 173 174 krb5_error_code 175 hdb_enctype2key ( 176 krb5_context /*context*/, 177 hdb_entry */*e*/, 178 const Keys */*keyset*/, 179 krb5_enctype /*enctype*/, 180 Key **/*key*/); 181 182 krb5_error_code 183 hdb_entry2string ( 184 krb5_context /*context*/, 185 hdb_entry */*ent*/, 186 char **/*str*/); 187 188 int 189 hdb_entry2value ( 190 krb5_context /*context*/, 191 const hdb_entry */*ent*/, 192 krb5_data */*value*/); 193 194 int 195 hdb_entry_alias2value ( 196 krb5_context /*context*/, 197 const hdb_entry_alias */*alias*/, 198 krb5_data */*value*/); 199 200 krb5_error_code 201 hdb_entry_check_mandatory ( 202 krb5_context /*context*/, 203 const hdb_entry */*ent*/); 204 205 krb5_error_code 206 hdb_entry_clear_kvno_diff_clnt ( 207 krb5_context /*context*/, 208 hdb_entry */*entry*/); 209 210 krb5_error_code 211 hdb_entry_clear_kvno_diff_svc ( 212 krb5_context /*context*/, 213 hdb_entry */*entry*/); 214 215 int 216 hdb_entry_clear_password ( 217 krb5_context /*context*/, 218 hdb_entry */*entry*/); 219 220 krb5_error_code 221 hdb_entry_get_ConstrainedDelegACL ( 222 const hdb_entry */*entry*/, 223 const HDB_Ext_Constrained_delegation_acl **/*a*/); 224 225 krb5_error_code 226 hdb_entry_get_aliases ( 227 const hdb_entry */*entry*/, 228 const HDB_Ext_Aliases **/*a*/); 229 230 unsigned int 231 hdb_entry_get_kvno_diff_clnt (const hdb_entry */*entry*/); 232 233 unsigned int 234 hdb_entry_get_kvno_diff_svc (const hdb_entry */*entry*/); 235 236 int 237 hdb_entry_get_password ( 238 krb5_context /*context*/, 239 HDB */*db*/, 240 const hdb_entry */*entry*/, 241 char **/*p*/); 242 243 krb5_error_code 244 hdb_entry_get_pkinit_acl ( 245 const hdb_entry */*entry*/, 246 const HDB_Ext_PKINIT_acl **/*a*/); 247 248 krb5_error_code 249 hdb_entry_get_pkinit_cert ( 250 const hdb_entry */*entry*/, 251 const HDB_Ext_PKINIT_cert **/*a*/); 252 253 krb5_error_code 254 hdb_entry_get_pkinit_hash ( 255 const hdb_entry */*entry*/, 256 const HDB_Ext_PKINIT_hash **/*a*/); 257 258 krb5_error_code 259 hdb_entry_get_pw_change_time ( 260 const hdb_entry */*entry*/, 261 time_t */*t*/); 262 263 krb5_error_code 264 hdb_entry_set_kvno_diff_clnt ( 265 krb5_context /*context*/, 266 hdb_entry */*entry*/, 267 unsigned int /*diff*/); 268 269 krb5_error_code 270 hdb_entry_set_kvno_diff_svc ( 271 krb5_context /*context*/, 272 hdb_entry */*entry*/, 273 unsigned int /*diff*/); 274 275 int 276 hdb_entry_set_password ( 277 krb5_context /*context*/, 278 HDB */*db*/, 279 hdb_entry */*entry*/, 280 const char */*p*/); 281 282 krb5_error_code 283 hdb_entry_set_pw_change_time ( 284 krb5_context /*context*/, 285 hdb_entry */*entry*/, 286 time_t /*t*/); 287 288 HDB_extension * 289 hdb_find_extension ( 290 const hdb_entry */*entry*/, 291 int /*type*/); 292 293 krb5_error_code 294 hdb_foreach ( 295 krb5_context /*context*/, 296 HDB */*db*/, 297 unsigned /*flags*/, 298 hdb_foreach_func_t /*func*/, 299 void */*data*/); 300 301 void 302 hdb_free_dbinfo ( 303 krb5_context /*context*/, 304 struct hdb_dbinfo **/*dbp*/); 305 306 void 307 hdb_free_entry ( 308 krb5_context /*context*/, 309 hdb_entry_ex */*ent*/); 310 311 void 312 hdb_free_key (Key */*key*/); 313 314 void 315 hdb_free_keys ( 316 krb5_context /*context*/, 317 int /*len*/, 318 Key */*keys*/); 319 320 void 321 hdb_free_master_key ( 322 krb5_context /*context*/, 323 hdb_master_key /*mkey*/); 324 325 krb5_error_code 326 hdb_generate_key_set ( 327 krb5_context /*context*/, 328 krb5_principal /*principal*/, 329 krb5_key_salt_tuple */*ks_tuple*/, 330 int /*n_ks_tuple*/, 331 Key **/*ret_key_set*/, 332 size_t */*nkeyset*/, 333 int /*no_salt*/); 334 335 krb5_error_code 336 hdb_generate_key_set_password ( 337 krb5_context /*context*/, 338 krb5_principal /*principal*/, 339 const char */*password*/, 340 Key **/*keys*/, 341 size_t */*num_keys*/); 342 343 krb5_error_code 344 hdb_generate_key_set_password_with_ks_tuple ( 345 krb5_context /*context*/, 346 krb5_principal /*principal*/, 347 const char */*password*/, 348 krb5_key_salt_tuple */*ks_tuple*/, 349 int /*n_ks_tuple*/, 350 Key **/*keys*/, 351 size_t */*num_keys*/); 352 353 int 354 hdb_get_dbinfo ( 355 krb5_context /*context*/, 356 struct hdb_dbinfo **/*dbp*/); 357 358 krb5_error_code 359 hdb_init_db ( 360 krb5_context /*context*/, 361 HDB */*db*/); 362 363 int 364 hdb_key2principal ( 365 krb5_context /*context*/, 366 krb5_data */*key*/, 367 krb5_principal /*p*/); 368 369 krb5_error_code 370 hdb_keytab_create ( 371 krb5_context /*context*/, 372 HDB ** /*db*/, 373 const char */*arg*/); 374 375 const Keys * 376 hdb_kvno2keys ( 377 krb5_context /*context*/, 378 const hdb_entry */*e*/, 379 krb5_kvno /*kvno*/); 380 381 krb5_error_code 382 hdb_ldap_create ( 383 krb5_context /*context*/, 384 HDB ** /*db*/, 385 const char */*arg*/); 386 387 krb5_error_code 388 hdb_ldapi_create ( 389 krb5_context /*context*/, 390 HDB ** /*db*/, 391 const char */*arg*/); 392 393 krb5_error_code 394 hdb_list_builtin ( 395 krb5_context /*context*/, 396 char **/*list*/); 397 398 krb5_error_code 399 hdb_lock ( 400 int /*fd*/, 401 int /*operation*/); 402 403 krb5_error_code 404 hdb_mdb_create ( 405 krb5_context /*context*/, 406 HDB **/*db*/, 407 const char */*filename*/); 408 409 krb5_error_code 410 hdb_mitdb_create ( 411 krb5_context /*context*/, 412 HDB **/*db*/, 413 const char */*filename*/); 414 415 krb5_error_code 416 hdb_ndbm_create ( 417 krb5_context /*context*/, 418 HDB **/*db*/, 419 const char */*filename*/); 420 421 krb5_error_code 422 hdb_next_enctype2key ( 423 krb5_context /*context*/, 424 const hdb_entry */*e*/, 425 const Keys */*keyset*/, 426 krb5_enctype /*enctype*/, 427 Key **/*key*/); 428 429 int 430 hdb_principal2key ( 431 krb5_context /*context*/, 432 krb5_const_principal /*p*/, 433 krb5_data */*key*/); 434 435 krb5_error_code 436 hdb_print_entry ( 437 krb5_context /*context*/, 438 HDB */*db*/, 439 hdb_entry_ex */*entry*/, 440 void */*data*/); 441 442 krb5_error_code 443 hdb_process_master_key ( 444 krb5_context /*context*/, 445 int /*kvno*/, 446 krb5_keyblock */*key*/, 447 krb5_enctype /*etype*/, 448 hdb_master_key */*mkey*/); 449 450 /** 451 * This function prunes an HDB entry's keys that are too old to have been used 452 * to mint still valid tickets (based on the entry's maximum ticket lifetime). 453 * 454 * @param context Context 455 * @param entry HDB entry 456 */ 457 458 krb5_error_code 459 hdb_prune_keys ( 460 krb5_context /*context*/, 461 hdb_entry */*entry*/); 462 463 krb5_error_code 464 hdb_read_master_key ( 465 krb5_context /*context*/, 466 const char */*filename*/, 467 hdb_master_key */*mkey*/); 468 469 krb5_error_code 470 hdb_replace_extension ( 471 krb5_context /*context*/, 472 hdb_entry */*entry*/, 473 const HDB_extension */*ext*/); 474 475 krb5_error_code 476 hdb_seal_key ( 477 krb5_context /*context*/, 478 HDB */*db*/, 479 Key */*k*/); 480 481 krb5_error_code 482 hdb_seal_key_mkey ( 483 krb5_context /*context*/, 484 Key */*k*/, 485 hdb_master_key /*mkey*/); 486 487 krb5_error_code 488 hdb_seal_keys ( 489 krb5_context /*context*/, 490 HDB */*db*/, 491 hdb_entry */*ent*/); 492 493 krb5_error_code 494 hdb_seal_keys_mkey ( 495 krb5_context /*context*/, 496 hdb_entry */*ent*/, 497 hdb_master_key /*mkey*/); 498 499 krb5_error_code 500 hdb_set_last_modified_by ( 501 krb5_context /*context*/, 502 hdb_entry */*entry*/, 503 krb5_principal /*modby*/, 504 time_t /*modtime*/); 505 506 krb5_error_code 507 hdb_set_master_key ( 508 krb5_context /*context*/, 509 HDB */*db*/, 510 krb5_keyblock */*key*/); 511 512 krb5_error_code 513 hdb_set_master_keyfile ( 514 krb5_context /*context*/, 515 HDB */*db*/, 516 const char */*keyfile*/); 517 518 /** 519 * Create SQLITE object, and creates the on disk database if its doesn't exists. 520 * 521 * @param context A Kerberos 5 context. 522 * @param db a returned database handle. 523 * @param filename filename 524 * 525 * @return 0 on success, an error code if not 526 */ 527 528 krb5_error_code 529 hdb_sqlite_create ( 530 krb5_context /*context*/, 531 HDB **/*db*/, 532 const char */*filename*/); 533 534 krb5_error_code 535 hdb_unlock (int /*fd*/); 536 537 krb5_error_code 538 hdb_unseal_key ( 539 krb5_context /*context*/, 540 HDB */*db*/, 541 Key */*k*/); 542 543 krb5_error_code 544 hdb_unseal_key_mkey ( 545 krb5_context /*context*/, 546 Key */*k*/, 547 hdb_master_key /*mkey*/); 548 549 krb5_error_code 550 hdb_unseal_keys ( 551 krb5_context /*context*/, 552 HDB */*db*/, 553 hdb_entry */*ent*/); 554 555 krb5_error_code 556 hdb_unseal_keys_kvno ( 557 krb5_context /*context*/, 558 HDB */*db*/, 559 krb5_kvno /*kvno*/, 560 unsigned /*flags*/, 561 hdb_entry */*ent*/); 562 563 krb5_error_code 564 hdb_unseal_keys_mkey ( 565 krb5_context /*context*/, 566 hdb_entry */*ent*/, 567 hdb_master_key /*mkey*/); 568 569 int 570 hdb_value2entry ( 571 krb5_context /*context*/, 572 krb5_data */*value*/, 573 hdb_entry */*ent*/); 574 575 int 576 hdb_value2entry_alias ( 577 krb5_context /*context*/, 578 krb5_data */*value*/, 579 hdb_entry_alias */*ent*/); 580 581 krb5_error_code 582 hdb_write_master_key ( 583 krb5_context /*context*/, 584 const char */*filename*/, 585 hdb_master_key /*mkey*/); 586 587 #ifdef __cplusplus 588 } 589 #endif 590 591 #endif /* DOXY */ 592 #endif /* __hdb_protos_h__ */ 593