xref: /netbsd-src/crypto/external/bsd/heimdal/dist/lib/kadm5/kadm5-protos.h (revision 241bea01a19bbb306af27777a870b86d41cb3fda)
1 /*	$NetBSD: kadm5-protos.h,v 1.2 2019/12/15 22:50:50 christos Exp $	*/
2 
3 /* This is a generated file */
4 #ifndef __kadm5_protos_h__
5 #define __kadm5_protos_h__
6 #ifndef DOXY
7 
8 #include <stdarg.h>
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 kadm5_ret_t
15 kadm5_ad_init_with_password (
16 	const char */*client_name*/,
17 	const char */*password*/,
18 	const char */*service_name*/,
19 	kadm5_config_params */*realm_params*/,
20 	unsigned long /*struct_version*/,
21 	unsigned long /*api_version*/,
22 	void **/*server_handle*/);
23 
24 kadm5_ret_t
25 kadm5_ad_init_with_password_ctx (
26 	krb5_context /*context*/,
27 	const char */*client_name*/,
28 	const char */*password*/,
29 	const char */*service_name*/,
30 	kadm5_config_params */*realm_params*/,
31 	unsigned long /*struct_version*/,
32 	unsigned long /*api_version*/,
33 	void **/*server_handle*/);
34 
35 krb5_error_code
36 kadm5_add_passwd_quality_verifier (
37 	krb5_context /*context*/,
38 	const char */*check_library*/);
39 
40 int
41 kadm5_all_keys_are_bogus (
42 	size_t /*n_keys*/,
43 	krb5_key_data */*keys*/);
44 
45 const char *
46 kadm5_check_password_quality (
47 	krb5_context /*context*/,
48 	krb5_principal /*principal*/,
49 	krb5_data */*pwd_data*/);
50 
51 kadm5_ret_t
52 kadm5_chpass_principal (
53 	void */*server_handle*/,
54 	krb5_principal /*princ*/,
55 	const char */*password*/);
56 
57 kadm5_ret_t
58 kadm5_chpass_principal_3 (
59 	void */*server_handle*/,
60 	krb5_principal /*princ*/,
61 	krb5_boolean /*keepold*/,
62 	int /*n_ks_tuple*/,
63 	krb5_key_salt_tuple */*ks_tuple*/,
64 	const char */*password*/);
65 
66 kadm5_ret_t
67 kadm5_chpass_principal_with_key (
68 	void */*server_handle*/,
69 	krb5_principal /*princ*/,
70 	int /*n_key_data*/,
71 	krb5_key_data */*key_data*/);
72 
73 kadm5_ret_t
74 kadm5_chpass_principal_with_key_3 (
75 	void */*server_handle*/,
76 	krb5_principal /*princ*/,
77 	int /*keepold*/,
78 	int /*n_key_data*/,
79 	krb5_key_data */*key_data*/);
80 
81 kadm5_ret_t
82 kadm5_create_policy (
83 	void */*server_handle*/,
84 	kadm5_policy_ent_t /*policy*/,
85 	long /*mask*/);
86 
87 kadm5_ret_t
88 kadm5_create_principal (
89 	void */*server_handle*/,
90 	kadm5_principal_ent_t /*princ*/,
91 	uint32_t /*mask*/,
92 	const char */*password*/);
93 
94 kadm5_ret_t
95 kadm5_create_principal_3 (
96 	void */*server_handle*/,
97 	kadm5_principal_ent_t /*princ*/,
98 	uint32_t /*mask*/,
99 	int /*n_ks_tuple*/,
100 	krb5_key_salt_tuple */*ks_tuple*/,
101 	char */*password*/);
102 
103 /**
104  * Extract decrypted keys from kadm5_principal_ent_t object.  Mostly a
105  * no-op for Heimdal because we fetch the entry with decrypted keys.
106  * Sadly this is not fully a no-op, as we have to allocate a copy.
107  *
108  * @server_handle is the kadm5 handle
109  * @entry is the HDB entry for the principal in question
110  * @ktype is the enctype to get a key for, or -1 to get the first one
111  * @stype is the salttype to get a key for, or -1 to get the first match
112  * @kvno is the kvno to search for, or -1 to get the first match (highest kvno)
113  * @keyblock is where the key will be placed
114  * @keysalt, if not NULL, is where the salt will be placed
115  * @kvnop, if not NULL, is where the selected kvno will be placed
116  */
117 
118 kadm5_ret_t
119 kadm5_decrypt_key (
120 	void */*server_handle*/,
121 	kadm5_principal_ent_t /*entry*/,
122 	int32_t /*ktype*/,
123 	int32_t /*stype*/,
124 	int32_t /*kvno*/,
125 	krb5_keyblock */*keyblock*/,
126 	krb5_keysalt */*keysalt*/,
127 	int */*kvnop*/);
128 
129 kadm5_ret_t
130 kadm5_delete_policy (
131 	void */*server_handle*/,
132 	char */*name*/);
133 
134 kadm5_ret_t
135 kadm5_delete_principal (
136 	void */*server_handle*/,
137 	krb5_principal /*princ*/);
138 
139 kadm5_ret_t
140 kadm5_destroy (void */*server_handle*/);
141 
142 kadm5_ret_t
143 kadm5_flush (void */*server_handle*/);
144 
145 void
146 kadm5_free_key_data (
147 	void */*server_handle*/,
148 	int16_t */*n_key_data*/,
149 	krb5_key_data */*key_data*/);
150 
151 void
152 kadm5_free_name_list (
153 	void */*server_handle*/,
154 	char **/*names*/,
155 	int */*count*/);
156 
157 kadm5_ret_t
158 kadm5_free_policy_ent (kadm5_policy_ent_t /*ent*/);
159 
160 void
161 kadm5_free_principal_ent (
162 	void */*server_handle*/,
163 	kadm5_principal_ent_t /*princ*/);
164 
165 kadm5_ret_t
166 kadm5_get_policies (
167 	void */*server_handle*/,
168 	char */*exp*/,
169 	char ***/*pols*/,
170 	int */*count*/);
171 
172 kadm5_ret_t
173 kadm5_get_policy (
174 	void */*server_handle*/,
175 	char */*policy*/,
176 	kadm5_policy_ent_t /*ent*/);
177 
178 kadm5_ret_t
179 kadm5_get_principal (
180 	void */*server_handle*/,
181 	krb5_principal /*princ*/,
182 	kadm5_principal_ent_t /*out*/,
183 	uint32_t /*mask*/);
184 
185 kadm5_ret_t
186 kadm5_get_principals (
187 	void */*server_handle*/,
188 	const char */*expression*/,
189 	char ***/*princs*/,
190 	int */*count*/);
191 
192 kadm5_ret_t
193 kadm5_get_privs (
194 	void */*server_handle*/,
195 	uint32_t */*privs*/);
196 
197 kadm5_ret_t
198 kadm5_init_with_creds (
199 	const char */*client_name*/,
200 	krb5_ccache /*ccache*/,
201 	const char */*service_name*/,
202 	kadm5_config_params */*realm_params*/,
203 	unsigned long /*struct_version*/,
204 	unsigned long /*api_version*/,
205 	void **/*server_handle*/);
206 
207 kadm5_ret_t
208 kadm5_init_with_creds_ctx (
209 	krb5_context /*context*/,
210 	const char */*client_name*/,
211 	krb5_ccache /*ccache*/,
212 	const char */*service_name*/,
213 	kadm5_config_params */*realm_params*/,
214 	unsigned long /*struct_version*/,
215 	unsigned long /*api_version*/,
216 	void **/*server_handle*/);
217 
218 kadm5_ret_t
219 kadm5_init_with_password (
220 	const char */*client_name*/,
221 	const char */*password*/,
222 	const char */*service_name*/,
223 	kadm5_config_params */*realm_params*/,
224 	unsigned long /*struct_version*/,
225 	unsigned long /*api_version*/,
226 	void **/*server_handle*/);
227 
228 kadm5_ret_t
229 kadm5_init_with_password_ctx (
230 	krb5_context /*context*/,
231 	const char */*client_name*/,
232 	const char */*password*/,
233 	const char */*service_name*/,
234 	kadm5_config_params */*realm_params*/,
235 	unsigned long /*struct_version*/,
236 	unsigned long /*api_version*/,
237 	void **/*server_handle*/);
238 
239 kadm5_ret_t
240 kadm5_init_with_skey (
241 	const char */*client_name*/,
242 	const char */*keytab*/,
243 	const char */*service_name*/,
244 	kadm5_config_params */*realm_params*/,
245 	unsigned long /*struct_version*/,
246 	unsigned long /*api_version*/,
247 	void **/*server_handle*/);
248 
249 kadm5_ret_t
250 kadm5_init_with_skey_ctx (
251 	krb5_context /*context*/,
252 	const char */*client_name*/,
253 	const char */*keytab*/,
254 	const char */*service_name*/,
255 	kadm5_config_params */*realm_params*/,
256 	unsigned long /*struct_version*/,
257 	unsigned long /*api_version*/,
258 	void **/*server_handle*/);
259 
260 kadm5_ret_t
261 kadm5_lock (void */*server_handle*/);
262 
263 kadm5_ret_t
264 kadm5_modify_policy (
265 	void */*server_handle*/,
266 	kadm5_policy_ent_t /*policy*/,
267 	uint32_t /*mask*/);
268 
269 kadm5_ret_t
270 kadm5_modify_principal (
271 	void */*server_handle*/,
272 	kadm5_principal_ent_t /*princ*/,
273 	uint32_t /*mask*/);
274 
275 kadm5_ret_t
276 kadm5_randkey_principal (
277 	void */*server_handle*/,
278 	krb5_principal /*princ*/,
279 	krb5_keyblock **/*new_keys*/,
280 	int */*n_keys*/);
281 
282 kadm5_ret_t
283 kadm5_randkey_principal_3 (
284 	void */*server_handle*/,
285 	krb5_principal /*princ*/,
286 	krb5_boolean /*keepold*/,
287 	int /*n_ks_tuple*/,
288 	krb5_key_salt_tuple */*ks_tuple*/,
289 	krb5_keyblock **/*new_keys*/,
290 	int */*n_keys*/);
291 
292 kadm5_ret_t
293 kadm5_rename_principal (
294 	void */*server_handle*/,
295 	krb5_principal /*source*/,
296 	krb5_principal /*target*/);
297 
298 kadm5_ret_t
299 kadm5_ret_key_data (
300 	krb5_storage */*sp*/,
301 	krb5_key_data */*key*/);
302 
303 kadm5_ret_t
304 kadm5_ret_principal_ent (
305 	krb5_storage */*sp*/,
306 	kadm5_principal_ent_t /*princ*/);
307 
308 kadm5_ret_t
309 kadm5_ret_principal_ent_mask (
310 	krb5_storage */*sp*/,
311 	kadm5_principal_ent_t /*princ*/,
312 	uint32_t */*mask*/);
313 
314 kadm5_ret_t
315 kadm5_ret_tl_data (
316 	krb5_storage */*sp*/,
317 	krb5_tl_data */*tl*/);
318 
319 /**
320  * This function is allows the caller to set new keys for a principal.
321  * This is a trivial wrapper around kadm5_setkey_principal_3().
322  */
323 
324 kadm5_ret_t
325 kadm5_setkey_principal (
326 	void */*server_handle*/,
327 	krb5_principal /*princ*/,
328 	krb5_keyblock */*new_keys*/,
329 	int /*n_keys*/);
330 
331 /**
332  * This function is allows the caller to set new keys for a principal.
333  * This is a simple wrapper around kadm5_get_principal() and
334  * kadm5_modify_principal().
335  */
336 
337 kadm5_ret_t
338 kadm5_setkey_principal_3 (
339 	void */*server_handle*/,
340 	krb5_principal /*princ*/,
341 	krb5_boolean /*keepold*/,
342 	int /*n_ks_tuple*/,
343 	krb5_key_salt_tuple */*ks_tuple*/,
344 	krb5_keyblock */*keyblocks*/,
345 	int /*n_keys*/);
346 
347 void
348 kadm5_setup_passwd_quality_check (
349 	krb5_context /*context*/,
350 	const char */*check_library*/,
351 	const char */*check_function*/);
352 
353 int
354 kadm5_some_keys_are_bogus (
355 	size_t /*n_keys*/,
356 	krb5_key_data */*keys*/);
357 
358 kadm5_ret_t
359 kadm5_store_fake_key_data (
360 	krb5_storage */*sp*/,
361 	krb5_key_data */*key*/);
362 
363 kadm5_ret_t
364 kadm5_store_key_data (
365 	krb5_storage */*sp*/,
366 	krb5_key_data */*key*/);
367 
368 kadm5_ret_t
369 kadm5_store_principal_ent (
370 	krb5_storage */*sp*/,
371 	kadm5_principal_ent_t /*princ*/);
372 
373 kadm5_ret_t
374 kadm5_store_principal_ent_mask (
375 	krb5_storage */*sp*/,
376 	kadm5_principal_ent_t /*princ*/,
377 	uint32_t /*mask*/);
378 
379 kadm5_ret_t
380 kadm5_store_principal_ent_nokeys (
381 	krb5_storage */*sp*/,
382 	kadm5_principal_ent_t /*princ*/);
383 
384 kadm5_ret_t
385 kadm5_store_tl_data (
386 	krb5_storage */*sp*/,
387 	krb5_tl_data */*tl*/);
388 
389 kadm5_ret_t
390 kadm5_unlock (void */*server_handle*/);
391 
392 #ifdef __cplusplus
393 }
394 #endif
395 
396 #endif /* DOXY */
397 #endif /* __kadm5_protos_h__ */
398