xref: /freebsd/crypto/heimdal/lib/krb5/krb5-private.h (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
1 /* This is a generated file */
2 #ifndef __krb5_private_h__
3 #define __krb5_private_h__
4 
5 #include <stdarg.h>
6 
7 #if !defined(__GNUC__) && !defined(__attribute__)
8 #define __attribute__(x)
9 #endif
10 
11 #ifndef KRB5_DEPRECATED_FUNCTION
12 #if defined(__GNUC__) && ((__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1 )))
13 #define KRB5_DEPRECATED_FUNCTION(X) __attribute__((__deprecated__))
14 #else
15 #define KRB5_DEPRECATED_FUNCTION(X)
16 #endif
17 #endif
18 
19 
20 void
21 _heim_krb5_ipc_client_clear_target (void);
22 
23 void
24 _heim_krb5_ipc_client_set_target_uid (uid_t /*uid*/);
25 
26 void
27 _krb5_DES3_random_to_key (
28 	krb5_context /*context*/,
29 	krb5_keyblock */*key*/,
30 	const void */*data*/,
31 	size_t /*size*/);
32 
33 krb5_error_code
34 _krb5_HMAC_MD5_checksum (
35 	krb5_context /*context*/,
36 	struct _krb5_key_data */*key*/,
37 	const void */*data*/,
38 	size_t /*len*/,
39 	unsigned /*usage*/,
40 	Checksum */*result*/);
41 
42 krb5_error_code
43 _krb5_SP_HMAC_SHA1_checksum (
44 	krb5_context /*context*/,
45 	struct _krb5_key_data */*key*/,
46 	const void */*data*/,
47 	size_t /*len*/,
48 	unsigned /*usage*/,
49 	Checksum */*result*/);
50 
51 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
52 _krb5_build_authenticator (
53 	krb5_context /*context*/,
54 	krb5_auth_context /*auth_context*/,
55 	krb5_enctype /*enctype*/,
56 	krb5_creds */*cred*/,
57 	Checksum */*cksum*/,
58 	krb5_data */*result*/,
59 	krb5_key_usage /*usage*/);
60 
61 krb5_error_code
62 _krb5_cc_allocate (
63 	krb5_context /*context*/,
64 	const krb5_cc_ops */*ops*/,
65 	krb5_ccache */*id*/);
66 
67 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
68 _krb5_config_copy (
69 	krb5_context /*context*/,
70 	krb5_config_section */*c*/,
71 	krb5_config_section **/*head*/);
72 
73 KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL
74 _krb5_config_get (
75 	krb5_context /*context*/,
76 	const krb5_config_section */*c*/,
77 	int /*type*/,
78 	...);
79 
80 krb5_config_section *
81 _krb5_config_get_entry (
82 	krb5_config_section **/*parent*/,
83 	const char */*name*/,
84 	int /*type*/);
85 
86 KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL
87 _krb5_config_get_next (
88 	krb5_context /*context*/,
89 	const krb5_config_section */*c*/,
90 	const krb5_config_binding **/*pointer*/,
91 	int /*type*/,
92 	...);
93 
94 const void *
95 _krb5_config_vget (
96 	krb5_context /*context*/,
97 	const krb5_config_section */*c*/,
98 	int /*type*/,
99 	va_list /*args*/);
100 
101 KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL
102 _krb5_config_vget_next (
103 	krb5_context /*context*/,
104 	const krb5_config_section */*c*/,
105 	const krb5_config_binding **/*pointer*/,
106 	int /*type*/,
107 	va_list /*args*/);
108 
109 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
110 _krb5_copy_send_to_kdc_func (
111 	krb5_context /*context*/,
112 	krb5_context /*to*/);
113 
114 void
115 _krb5_crc_init_table (void);
116 
117 uint32_t
118 _krb5_crc_update (
119 	const char */*p*/,
120 	size_t /*len*/,
121 	uint32_t /*res*/);
122 
123 void KRB5_LIB_FUNCTION
124 _krb5_debug (
125 	krb5_context /*context*/,
126 	int /*level*/,
127 	const char */*fmt*/,
128 	...)
129      __attribute__((format (printf, 3, 4)));
130 
131 void
132 _krb5_debug_backtrace (krb5_context /*context*/);
133 
134 krb5_error_code
135 _krb5_derive_key (
136 	krb5_context /*context*/,
137 	struct _krb5_encryption_type */*et*/,
138 	struct _krb5_key_data */*key*/,
139 	const void */*constant*/,
140 	size_t /*len*/);
141 
142 krb5_error_code
143 _krb5_des_checksum (
144 	krb5_context /*context*/,
145 	const EVP_MD */*evp_md*/,
146 	struct _krb5_key_data */*key*/,
147 	const void */*data*/,
148 	size_t /*len*/,
149 	Checksum */*cksum*/);
150 
151 krb5_error_code
152 _krb5_des_verify (
153 	krb5_context /*context*/,
154 	const EVP_MD */*evp_md*/,
155 	struct _krb5_key_data */*key*/,
156 	const void */*data*/,
157 	size_t /*len*/,
158 	Checksum */*C*/);
159 
160 krb5_error_code
161 _krb5_dh_group_ok (
162 	krb5_context /*context*/,
163 	unsigned long /*bits*/,
164 	heim_integer */*p*/,
165 	heim_integer */*g*/,
166 	heim_integer */*q*/,
167 	struct krb5_dh_moduli **/*moduli*/,
168 	char **/*name*/);
169 
170 krb5_error_code
171 _krb5_einval (
172 	krb5_context /*context*/,
173 	const char */*func*/,
174 	unsigned long /*argn*/);
175 
176 krb5_error_code
177 _krb5_erase_file (
178 	krb5_context /*context*/,
179 	const char */*filename*/);
180 
181 void
182 _krb5_evp_cleanup (
183 	krb5_context /*context*/,
184 	struct _krb5_key_data */*kd*/);
185 
186 krb5_error_code
187 _krb5_evp_encrypt (
188 	krb5_context /*context*/,
189 	struct _krb5_key_data */*key*/,
190 	void */*data*/,
191 	size_t /*len*/,
192 	krb5_boolean /*encryptp*/,
193 	int /*usage*/,
194 	void */*ivec*/);
195 
196 krb5_error_code
197 _krb5_evp_encrypt_cts (
198 	krb5_context /*context*/,
199 	struct _krb5_key_data */*key*/,
200 	void */*data*/,
201 	size_t /*len*/,
202 	krb5_boolean /*encryptp*/,
203 	int /*usage*/,
204 	void */*ivec*/);
205 
206 void
207 _krb5_evp_schedule (
208 	krb5_context /*context*/,
209 	struct _krb5_key_type */*kt*/,
210 	struct _krb5_key_data */*kd*/);
211 
212 krb5_error_code
213 _krb5_expand_default_cc_name (
214 	krb5_context /*context*/,
215 	const char */*str*/,
216 	char **/*res*/);
217 
218 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
219 _krb5_expand_path_tokens (
220 	krb5_context /*context*/,
221 	const char */*path_in*/,
222 	char **/*ppath_out*/);
223 
224 int
225 _krb5_extract_ticket (
226 	krb5_context /*context*/,
227 	krb5_kdc_rep */*rep*/,
228 	krb5_creds */*creds*/,
229 	krb5_keyblock */*key*/,
230 	krb5_const_pointer /*keyseed*/,
231 	krb5_key_usage /*key_usage*/,
232 	krb5_addresses */*addrs*/,
233 	unsigned /*nonce*/,
234 	unsigned /*flags*/,
235 	krb5_decrypt_proc /*decrypt_proc*/,
236 	krb5_const_pointer /*decryptarg*/);
237 
238 struct _krb5_checksum_type *
239 _krb5_find_checksum (krb5_cksumtype /*type*/);
240 
241 struct _krb5_encryption_type *
242 _krb5_find_enctype (krb5_enctype /*type*/);
243 
244 void
245 _krb5_free_key_data (
246 	krb5_context /*context*/,
247 	struct _krb5_key_data */*key*/,
248 	struct _krb5_encryption_type */*et*/);
249 
250 void
251 _krb5_free_krbhst_info (krb5_krbhst_info */*hi*/);
252 
253 void
254 _krb5_free_moduli (struct krb5_dh_moduli **/*moduli*/);
255 
256 krb5_error_code
257 _krb5_get_cred_kdc_any (
258 	krb5_context /*context*/,
259 	krb5_kdc_flags /*flags*/,
260 	krb5_ccache /*ccache*/,
261 	krb5_creds */*in_creds*/,
262 	krb5_principal /*impersonate_principal*/,
263 	Ticket */*second_ticket*/,
264 	krb5_creds **/*out_creds*/,
265 	krb5_creds ***/*ret_tgts*/);
266 
267 char *
268 _krb5_get_default_cc_name_from_registry (krb5_context /*context*/);
269 
270 char *
271 _krb5_get_default_config_config_files_from_registry (void);
272 
273 krb5_error_code
274 _krb5_get_default_principal_local (
275 	krb5_context /*context*/,
276 	krb5_principal */*princ*/);
277 
278 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
279 _krb5_get_host_realm_int (
280 	krb5_context /*context*/,
281 	const char */*host*/,
282 	krb5_boolean /*use_dns*/,
283 	krb5_realm **/*realms*/);
284 
285 KRB5_LIB_FUNCTION void KRB5_LIB_CALL
286 _krb5_get_init_creds_opt_free_pkinit (krb5_get_init_creds_opt */*opt*/);
287 
288 KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
289 _krb5_get_int (
290 	void */*buffer*/,
291 	unsigned long */*value*/,
292 	size_t /*size*/);
293 
294 krb5_error_code
295 _krb5_get_krbtgt (
296 	krb5_context /*context*/,
297 	krb5_ccache /*id*/,
298 	krb5_realm /*realm*/,
299 	krb5_creds **/*cred*/);
300 
301 krb5_boolean KRB5_LIB_FUNCTION
302 _krb5_have_debug (
303 	krb5_context /*context*/,
304 	int /*level*/);
305 
306 krb5_boolean
307 _krb5_homedir_access (krb5_context /*context*/);
308 
309 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
310 _krb5_init_etype (
311 	krb5_context /*context*/,
312 	krb5_pdu /*pdu_type*/,
313 	unsigned */*len*/,
314 	krb5_enctype **/*val*/,
315 	const krb5_enctype */*etypes*/);
316 
317 krb5_error_code
318 _krb5_internal_hmac (
319 	krb5_context /*context*/,
320 	struct _krb5_checksum_type */*cm*/,
321 	const void */*data*/,
322 	size_t /*len*/,
323 	unsigned /*usage*/,
324 	struct _krb5_key_data */*keyblock*/,
325 	Checksum */*result*/);
326 
327 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
328 _krb5_kcm_get_initial_ticket (
329 	krb5_context /*context*/,
330 	krb5_ccache /*id*/,
331 	krb5_principal /*server*/,
332 	krb5_keyblock */*key*/);
333 
334 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
335 _krb5_kcm_get_ticket (
336 	krb5_context /*context*/,
337 	krb5_ccache /*id*/,
338 	krb5_kdc_flags /*flags*/,
339 	krb5_enctype /*enctype*/,
340 	krb5_principal /*server*/);
341 
342 KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
343 _krb5_kcm_is_running (krb5_context /*context*/);
344 
345 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
346 _krb5_kcm_noop (
347 	krb5_context /*context*/,
348 	krb5_ccache /*id*/);
349 
350 krb5_error_code KRB5_CALLCONV
351 _krb5_kdc_retry (
352 	krb5_context /*context*/,
353 	krb5_sendto_ctx /*ctx*/,
354 	void */*data*/,
355 	const krb5_data */*reply*/,
356 	int */*action*/);
357 
358 krb5_error_code
359 _krb5_krbhost_info_move (
360 	krb5_context /*context*/,
361 	krb5_krbhst_info */*from*/,
362 	krb5_krbhst_info **/*to*/);
363 
364 const char *
365 _krb5_krbhst_get_realm (krb5_krbhst_handle /*handle*/);
366 
367 krb5_error_code
368 _krb5_kt_principal_not_found (
369 	krb5_context /*context*/,
370 	krb5_error_code /*ret*/,
371 	krb5_keytab /*id*/,
372 	krb5_const_principal /*principal*/,
373 	krb5_enctype /*enctype*/,
374 	int /*kvno*/);
375 
376 krb5_error_code
377 _krb5_load_ccache_plugins (krb5_context /*context*/);
378 
379 void
380 _krb5_load_plugins (
381 	krb5_context /*context*/,
382 	const char */*name*/,
383 	const char **/*paths*/);
384 
385 krb5_error_code
386 _krb5_mk_req_internal (
387 	krb5_context /*context*/,
388 	krb5_auth_context */*auth_context*/,
389 	const krb5_flags /*ap_req_options*/,
390 	krb5_data */*in_data*/,
391 	krb5_creds */*in_creds*/,
392 	krb5_data */*outbuf*/,
393 	krb5_key_usage /*checksum_usage*/,
394 	krb5_key_usage /*encrypt_usage*/);
395 
396 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
397 _krb5_n_fold (
398 	const void */*str*/,
399 	size_t /*len*/,
400 	void */*key*/,
401 	size_t /*size*/);
402 
403 krb5_error_code
404 _krb5_pac_sign (
405 	krb5_context /*context*/,
406 	krb5_pac /*p*/,
407 	time_t /*authtime*/,
408 	krb5_principal /*principal*/,
409 	const krb5_keyblock */*server_key*/,
410 	const krb5_keyblock */*priv_key*/,
411 	krb5_data */*data*/);
412 
413 krb5_error_code
414 _krb5_parse_moduli (
415 	krb5_context /*context*/,
416 	const char */*file*/,
417 	struct krb5_dh_moduli ***/*moduli*/);
418 
419 krb5_error_code
420 _krb5_parse_moduli_line (
421 	krb5_context /*context*/,
422 	const char */*file*/,
423 	int /*lineno*/,
424 	char */*p*/,
425 	struct krb5_dh_moduli **/*m*/);
426 
427 KRB5_LIB_FUNCTION void KRB5_LIB_CALL
428 _krb5_pk_cert_free (struct krb5_pk_cert */*cert*/);
429 
430 krb5_error_code
431 _krb5_pk_kdf (
432 	krb5_context /*context*/,
433 	const struct AlgorithmIdentifier */*ai*/,
434 	const void */*dhdata*/,
435 	size_t /*dhsize*/,
436 	krb5_const_principal /*client*/,
437 	krb5_const_principal /*server*/,
438 	krb5_enctype /*enctype*/,
439 	const krb5_data */*as_req*/,
440 	const krb5_data */*pk_as_rep*/,
441 	const Ticket */*ticket*/,
442 	krb5_keyblock */*key*/);
443 
444 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
445 _krb5_pk_load_id (
446 	krb5_context /*context*/,
447 	struct krb5_pk_identity **/*ret_id*/,
448 	const char */*user_id*/,
449 	const char */*anchor_id*/,
450 	char * const */*chain_list*/,
451 	char * const */*revoke_list*/,
452 	krb5_prompter_fct /*prompter*/,
453 	void */*prompter_data*/,
454 	char */*password*/);
455 
456 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
457 _krb5_pk_mk_ContentInfo (
458 	krb5_context /*context*/,
459 	const krb5_data */*buf*/,
460 	const heim_oid */*oid*/,
461 	struct ContentInfo */*content_info*/);
462 
463 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
464 _krb5_pk_mk_padata (
465 	krb5_context /*context*/,
466 	void */*c*/,
467 	int /*ic_flags*/,
468 	int /*win2k*/,
469 	const KDC_REQ_BODY */*req_body*/,
470 	unsigned /*nonce*/,
471 	METHOD_DATA */*md*/);
472 
473 krb5_error_code
474 _krb5_pk_octetstring2key (
475 	krb5_context /*context*/,
476 	krb5_enctype /*type*/,
477 	const void */*dhdata*/,
478 	size_t /*dhsize*/,
479 	const heim_octet_string */*c_n*/,
480 	const heim_octet_string */*k_n*/,
481 	krb5_keyblock */*key*/);
482 
483 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
484 _krb5_pk_rd_pa_reply (
485 	krb5_context /*context*/,
486 	const char */*realm*/,
487 	void */*c*/,
488 	krb5_enctype /*etype*/,
489 	const krb5_krbhst_info */*hi*/,
490 	unsigned /*nonce*/,
491 	const krb5_data */*req_buffer*/,
492 	PA_DATA */*pa*/,
493 	krb5_keyblock **/*key*/);
494 
495 krb5_error_code
496 _krb5_plugin_find (
497 	krb5_context /*context*/,
498 	enum krb5_plugin_type /*type*/,
499 	const char */*name*/,
500 	struct krb5_plugin **/*list*/);
501 
502 void
503 _krb5_plugin_free (struct krb5_plugin */*list*/);
504 
505 struct krb5_plugin *
506 _krb5_plugin_get_next (struct krb5_plugin */*p*/);
507 
508 void *
509 _krb5_plugin_get_symbol (struct krb5_plugin */*p*/);
510 
511 krb5_error_code
512 _krb5_plugin_run_f (
513 	krb5_context /*context*/,
514 	const char */*module*/,
515 	const char */*name*/,
516 	int /*min_version*/,
517 	int /*flags*/,
518 	void */*userctx*/,
519 	krb5_error_code (*/*func*/)(krb5_context, const void *, void *, void *));
520 
521 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
522 _krb5_principal2principalname (
523 	PrincipalName */*p*/,
524 	const krb5_principal /*from*/);
525 
526 KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
527 _krb5_principal_compare_PrincipalName (
528 	krb5_context /*context*/,
529 	krb5_const_principal /*princ1*/,
530 	PrincipalName */*princ2*/);
531 
532 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
533 _krb5_principalname2krb5_principal (
534 	krb5_context /*context*/,
535 	krb5_principal */*principal*/,
536 	const PrincipalName /*from*/,
537 	const Realm /*realm*/);
538 
539 KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
540 _krb5_put_int (
541 	void */*buffer*/,
542 	unsigned long /*value*/,
543 	size_t /*size*/);
544 
545 KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
546 _krb5_s4u2self_to_checksumdata (
547 	krb5_context /*context*/,
548 	const PA_S4U2Self */*self*/,
549 	krb5_data */*data*/);
550 
551 int
552 _krb5_send_and_recv_tcp (
553 	krb5_socket_t /*fd*/,
554 	time_t /*tmout*/,
555 	const krb5_data */*req*/,
556 	krb5_data */*rep*/);
557 
558 int
559 _krb5_set_default_cc_name_to_registry (
560 	krb5_context /*context*/,
561 	krb5_ccache /*id*/);
562 
563 void
564 _krb5_unload_plugins (
565 	krb5_context /*context*/,
566 	const char */*name*/);
567 
568 krb5_error_code
569 _krb5_usage2arcfour (
570 	krb5_context /*context*/,
571 	unsigned */*usage*/);
572 
573 int
574 _krb5_xlock (
575 	krb5_context /*context*/,
576 	int /*fd*/,
577 	krb5_boolean /*exclusive*/,
578 	const char */*filename*/);
579 
580 void
581 _krb5_xor (
582 	DES_cblock */*key*/,
583 	const unsigned char */*b*/);
584 
585 int
586 _krb5_xunlock (
587 	krb5_context /*context*/,
588 	int /*fd*/);
589 
590 #undef KRB5_DEPRECATED_FUNCTION
591 #define KRB5_DEPRECATED_FUNCTION(X)
592 
593 #endif /* __krb5_private_h__ */
594