deprecated.c revision 1.1 1 1.1 elric /* $NetBSD: deprecated.c,v 1.1 2011/04/13 18:15:33 elric Exp $ */
2 1.1 elric
3 1.1 elric /*
4 1.1 elric * Copyright (c) 1997 - 2009 Kungliga Tekniska Hgskolan
5 1.1 elric * (Royal Institute of Technology, Stockholm, Sweden).
6 1.1 elric * All rights reserved.
7 1.1 elric *
8 1.1 elric * Redistribution and use in source and binary forms, with or without
9 1.1 elric * modification, are permitted provided that the following conditions
10 1.1 elric * are met:
11 1.1 elric *
12 1.1 elric * 1. Redistributions of source code must retain the above copyright
13 1.1 elric * notice, this list of conditions and the following disclaimer.
14 1.1 elric *
15 1.1 elric * 2. Redistributions in binary form must reproduce the above copyright
16 1.1 elric * notice, this list of conditions and the following disclaimer in the
17 1.1 elric * documentation and/or other materials provided with the distribution.
18 1.1 elric *
19 1.1 elric * 3. Neither the name of the Institute nor the names of its contributors
20 1.1 elric * may be used to endorse or promote products derived from this software
21 1.1 elric * without specific prior written permission.
22 1.1 elric *
23 1.1 elric * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
24 1.1 elric * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25 1.1 elric * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26 1.1 elric * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
27 1.1 elric * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28 1.1 elric * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29 1.1 elric * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 1.1 elric * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 1.1 elric * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 1.1 elric * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 1.1 elric * SUCH DAMAGE.
34 1.1 elric */
35 1.1 elric
36 1.1 elric #define KRB5_DEPRECATED
37 1.1 elric
38 1.1 elric #include "krb5_locl.h"
39 1.1 elric
40 1.1 elric #undef __attribute__
41 1.1 elric #define __attribute__(x)
42 1.1 elric
43 1.1 elric #ifndef HEIMDAL_SMALLER
44 1.1 elric
45 1.1 elric /**
46 1.1 elric * Same as krb5_data_free(). MIT compat.
47 1.1 elric *
48 1.1 elric * Deprecated: use krb5_data_free().
49 1.1 elric *
50 1.1 elric * @param context Kerberos 5 context.
51 1.1 elric * @param data krb5_data to free.
52 1.1 elric *
53 1.1 elric * @ingroup krb5_deprecated
54 1.1 elric */
55 1.1 elric
56 1.1 elric KRB5_DEPRECATED
57 1.1 elric KRB5_LIB_FUNCTION void KRB5_LIB_CALL
58 1.1 elric krb5_free_data_contents(krb5_context context, krb5_data *data)
59 1.1 elric {
60 1.1 elric krb5_data_free(data);
61 1.1 elric }
62 1.1 elric
63 1.1 elric /**
64 1.1 elric * Deprecated: keytypes doesn't exists, they are really enctypes.
65 1.1 elric *
66 1.1 elric * @ingroup krb5_deprecated
67 1.1 elric */
68 1.1 elric
69 1.1 elric KRB5_DEPRECATED
70 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
71 1.1 elric krb5_keytype_to_enctypes_default (krb5_context context,
72 1.1 elric krb5_keytype keytype,
73 1.1 elric unsigned *len,
74 1.1 elric krb5_enctype **val)
75 1.1 elric {
76 1.1 elric unsigned int i, n;
77 1.1 elric krb5_enctype *ret;
78 1.1 elric
79 1.1 elric if (keytype != KEYTYPE_DES || context->etypes_des == NULL)
80 1.1 elric return krb5_keytype_to_enctypes (context, keytype, len, val);
81 1.1 elric
82 1.1 elric for (n = 0; context->etypes_des[n]; ++n)
83 1.1 elric ;
84 1.1 elric ret = malloc (n * sizeof(*ret));
85 1.1 elric if (ret == NULL && n != 0) {
86 1.1 elric krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", ""));
87 1.1 elric return ENOMEM;
88 1.1 elric }
89 1.1 elric for (i = 0; i < n; ++i)
90 1.1 elric ret[i] = context->etypes_des[i];
91 1.1 elric *len = n;
92 1.1 elric *val = ret;
93 1.1 elric return 0;
94 1.1 elric }
95 1.1 elric
96 1.1 elric
97 1.1 elric static struct {
98 1.1 elric const char *name;
99 1.1 elric krb5_keytype type;
100 1.1 elric } keys[] = {
101 1.1 elric { "null", ENCTYPE_NULL },
102 1.1 elric { "des", ETYPE_DES_CBC_CRC },
103 1.1 elric { "des3", ETYPE_OLD_DES3_CBC_SHA1 },
104 1.1 elric { "aes-128", ETYPE_AES128_CTS_HMAC_SHA1_96 },
105 1.1 elric { "aes-256", ETYPE_AES256_CTS_HMAC_SHA1_96 },
106 1.1 elric { "arcfour", ETYPE_ARCFOUR_HMAC_MD5 },
107 1.1 elric { "arcfour-56", ETYPE_ARCFOUR_HMAC_MD5_56 }
108 1.1 elric };
109 1.1 elric
110 1.1 elric static int num_keys = sizeof(keys) / sizeof(keys[0]);
111 1.1 elric
112 1.1 elric /**
113 1.1 elric * Deprecated: keytypes doesn't exists, they are really enctypes in
114 1.1 elric * most cases, use krb5_enctype_to_string().
115 1.1 elric *
116 1.1 elric * @ingroup krb5_deprecated
117 1.1 elric */
118 1.1 elric
119 1.1 elric KRB5_DEPRECATED
120 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
121 1.1 elric krb5_keytype_to_string(krb5_context context,
122 1.1 elric krb5_keytype keytype,
123 1.1 elric char **string)
124 1.1 elric {
125 1.1 elric const char *name;
126 1.1 elric int i;
127 1.1 elric
128 1.1 elric for(i = 0; i < num_keys; i++) {
129 1.1 elric if(keys[i].type == keytype) {
130 1.1 elric name = keys[i].name;
131 1.1 elric break;
132 1.1 elric }
133 1.1 elric }
134 1.1 elric
135 1.1 elric if(i >= num_keys) {
136 1.1 elric krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP,
137 1.1 elric "key type %d not supported", keytype);
138 1.1 elric return KRB5_PROG_KEYTYPE_NOSUPP;
139 1.1 elric }
140 1.1 elric *string = strdup(name);
141 1.1 elric if(*string == NULL) {
142 1.1 elric krb5_set_error_message(context, ENOMEM,
143 1.1 elric N_("malloc: out of memory", ""));
144 1.1 elric return ENOMEM;
145 1.1 elric }
146 1.1 elric return 0;
147 1.1 elric }
148 1.1 elric
149 1.1 elric /**
150 1.1 elric * Deprecated: keytypes doesn't exists, they are really enctypes in
151 1.1 elric * most cases, use krb5_string_to_enctype().
152 1.1 elric *
153 1.1 elric * @ingroup krb5_deprecated
154 1.1 elric */
155 1.1 elric
156 1.1 elric KRB5_DEPRECATED
157 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
158 1.1 elric krb5_string_to_keytype(krb5_context context,
159 1.1 elric const char *string,
160 1.1 elric krb5_keytype *keytype)
161 1.1 elric {
162 1.1 elric char *end;
163 1.1 elric int i;
164 1.1 elric
165 1.1 elric for(i = 0; i < num_keys; i++)
166 1.1 elric if(strcasecmp(keys[i].name, string) == 0){
167 1.1 elric *keytype = keys[i].type;
168 1.1 elric return 0;
169 1.1 elric }
170 1.1 elric
171 1.1 elric /* check if the enctype is a number */
172 1.1 elric *keytype = strtol(string, &end, 0);
173 1.1 elric if(*end == '\0' && *keytype != 0) {
174 1.1 elric if (krb5_enctype_valid(context, *keytype) == 0)
175 1.1 elric return 0;
176 1.1 elric }
177 1.1 elric
178 1.1 elric krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP,
179 1.1 elric "key type %s not supported", string);
180 1.1 elric return KRB5_PROG_KEYTYPE_NOSUPP;
181 1.1 elric }
182 1.1 elric
183 1.1 elric /**
184 1.1 elric * Deprecated: use krb5_get_init_creds() and friends.
185 1.1 elric *
186 1.1 elric * @ingroup krb5_deprecated
187 1.1 elric */
188 1.1 elric
189 1.1 elric KRB5_DEPRECATED
190 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV
191 1.1 elric krb5_password_key_proc (krb5_context context,
192 1.1 elric krb5_enctype type,
193 1.1 elric krb5_salt salt,
194 1.1 elric krb5_const_pointer keyseed,
195 1.1 elric krb5_keyblock **key)
196 1.1 elric {
197 1.1 elric krb5_error_code ret;
198 1.1 elric const char *password = (const char *)keyseed;
199 1.1 elric char buf[BUFSIZ];
200 1.1 elric
201 1.1 elric *key = malloc (sizeof (**key));
202 1.1 elric if (*key == NULL) {
203 1.1 elric krb5_set_error_message(context, ENOMEM, "malloc: out of memory");
204 1.1 elric return ENOMEM;
205 1.1 elric }
206 1.1 elric if (password == NULL) {
207 1.1 elric if(UI_UTIL_read_pw_string (buf, sizeof(buf), "Password: ", 0)) {
208 1.1 elric free (*key);
209 1.1 elric krb5_clear_error_message(context);
210 1.1 elric return KRB5_LIBOS_PWDINTR;
211 1.1 elric }
212 1.1 elric password = buf;
213 1.1 elric }
214 1.1 elric ret = krb5_string_to_key_salt (context, type, password, salt, *key);
215 1.1 elric memset (buf, 0, sizeof(buf));
216 1.1 elric return ret;
217 1.1 elric }
218 1.1 elric
219 1.1 elric /**
220 1.1 elric * Deprecated: use krb5_get_init_creds() and friends.
221 1.1 elric *
222 1.1 elric * @ingroup krb5_deprecated
223 1.1 elric */
224 1.1 elric
225 1.1 elric KRB5_DEPRECATED
226 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
227 1.1 elric krb5_get_in_tkt_with_password (krb5_context context,
228 1.1 elric krb5_flags options,
229 1.1 elric krb5_addresses *addrs,
230 1.1 elric const krb5_enctype *etypes,
231 1.1 elric const krb5_preauthtype *pre_auth_types,
232 1.1 elric const char *password,
233 1.1 elric krb5_ccache ccache,
234 1.1 elric krb5_creds *creds,
235 1.1 elric krb5_kdc_rep *ret_as_reply)
236 1.1 elric {
237 1.1 elric return krb5_get_in_tkt (context,
238 1.1 elric options,
239 1.1 elric addrs,
240 1.1 elric etypes,
241 1.1 elric pre_auth_types,
242 1.1 elric krb5_password_key_proc,
243 1.1 elric password,
244 1.1 elric NULL,
245 1.1 elric NULL,
246 1.1 elric creds,
247 1.1 elric ccache,
248 1.1 elric ret_as_reply);
249 1.1 elric }
250 1.1 elric
251 1.1 elric static krb5_error_code KRB5_CALLCONV
252 1.1 elric krb5_skey_key_proc (krb5_context context,
253 1.1 elric krb5_enctype type,
254 1.1 elric krb5_salt salt,
255 1.1 elric krb5_const_pointer keyseed,
256 1.1 elric krb5_keyblock **key)
257 1.1 elric {
258 1.1 elric return krb5_copy_keyblock (context, keyseed, key);
259 1.1 elric }
260 1.1 elric
261 1.1 elric /**
262 1.1 elric * Deprecated: use krb5_get_init_creds() and friends.
263 1.1 elric *
264 1.1 elric * @ingroup krb5_deprecated
265 1.1 elric */
266 1.1 elric
267 1.1 elric KRB5_DEPRECATED
268 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
269 1.1 elric krb5_get_in_tkt_with_skey (krb5_context context,
270 1.1 elric krb5_flags options,
271 1.1 elric krb5_addresses *addrs,
272 1.1 elric const krb5_enctype *etypes,
273 1.1 elric const krb5_preauthtype *pre_auth_types,
274 1.1 elric const krb5_keyblock *key,
275 1.1 elric krb5_ccache ccache,
276 1.1 elric krb5_creds *creds,
277 1.1 elric krb5_kdc_rep *ret_as_reply)
278 1.1 elric {
279 1.1 elric if(key == NULL)
280 1.1 elric return krb5_get_in_tkt_with_keytab (context,
281 1.1 elric options,
282 1.1 elric addrs,
283 1.1 elric etypes,
284 1.1 elric pre_auth_types,
285 1.1 elric NULL,
286 1.1 elric ccache,
287 1.1 elric creds,
288 1.1 elric ret_as_reply);
289 1.1 elric else
290 1.1 elric return krb5_get_in_tkt (context,
291 1.1 elric options,
292 1.1 elric addrs,
293 1.1 elric etypes,
294 1.1 elric pre_auth_types,
295 1.1 elric krb5_skey_key_proc,
296 1.1 elric key,
297 1.1 elric NULL,
298 1.1 elric NULL,
299 1.1 elric creds,
300 1.1 elric ccache,
301 1.1 elric ret_as_reply);
302 1.1 elric }
303 1.1 elric
304 1.1 elric /**
305 1.1 elric * Deprecated: use krb5_get_init_creds() and friends.
306 1.1 elric *
307 1.1 elric * @ingroup krb5_deprecated
308 1.1 elric */
309 1.1 elric
310 1.1 elric KRB5_DEPRECATED
311 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV
312 1.1 elric krb5_keytab_key_proc (krb5_context context,
313 1.1 elric krb5_enctype enctype,
314 1.1 elric krb5_salt salt,
315 1.1 elric krb5_const_pointer keyseed,
316 1.1 elric krb5_keyblock **key)
317 1.1 elric {
318 1.1 elric krb5_keytab_key_proc_args *args = rk_UNCONST(keyseed);
319 1.1 elric krb5_keytab keytab = args->keytab;
320 1.1 elric krb5_principal principal = args->principal;
321 1.1 elric krb5_error_code ret;
322 1.1 elric krb5_keytab real_keytab;
323 1.1 elric krb5_keytab_entry entry;
324 1.1 elric
325 1.1 elric if(keytab == NULL)
326 1.1 elric krb5_kt_default(context, &real_keytab);
327 1.1 elric else
328 1.1 elric real_keytab = keytab;
329 1.1 elric
330 1.1 elric ret = krb5_kt_get_entry (context, real_keytab, principal,
331 1.1 elric 0, enctype, &entry);
332 1.1 elric
333 1.1 elric if (keytab == NULL)
334 1.1 elric krb5_kt_close (context, real_keytab);
335 1.1 elric
336 1.1 elric if (ret)
337 1.1 elric return ret;
338 1.1 elric
339 1.1 elric ret = krb5_copy_keyblock (context, &entry.keyblock, key);
340 1.1 elric krb5_kt_free_entry(context, &entry);
341 1.1 elric return ret;
342 1.1 elric }
343 1.1 elric
344 1.1 elric /**
345 1.1 elric * Deprecated: use krb5_get_init_creds() and friends.
346 1.1 elric *
347 1.1 elric * @ingroup krb5_deprecated
348 1.1 elric */
349 1.1 elric
350 1.1 elric KRB5_DEPRECATED
351 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
352 1.1 elric krb5_get_in_tkt_with_keytab (krb5_context context,
353 1.1 elric krb5_flags options,
354 1.1 elric krb5_addresses *addrs,
355 1.1 elric const krb5_enctype *etypes,
356 1.1 elric const krb5_preauthtype *pre_auth_types,
357 1.1 elric krb5_keytab keytab,
358 1.1 elric krb5_ccache ccache,
359 1.1 elric krb5_creds *creds,
360 1.1 elric krb5_kdc_rep *ret_as_reply)
361 1.1 elric {
362 1.1 elric krb5_keytab_key_proc_args a;
363 1.1 elric
364 1.1 elric a.principal = creds->client;
365 1.1 elric a.keytab = keytab;
366 1.1 elric
367 1.1 elric return krb5_get_in_tkt (context,
368 1.1 elric options,
369 1.1 elric addrs,
370 1.1 elric etypes,
371 1.1 elric pre_auth_types,
372 1.1 elric krb5_keytab_key_proc,
373 1.1 elric &a,
374 1.1 elric NULL,
375 1.1 elric NULL,
376 1.1 elric creds,
377 1.1 elric ccache,
378 1.1 elric ret_as_reply);
379 1.1 elric }
380 1.1 elric
381 1.1 elric /**
382 1.1 elric * Generate a new ccache of type `ops' in `id'.
383 1.1 elric *
384 1.1 elric * Deprecated: use krb5_cc_new_unique() instead.
385 1.1 elric *
386 1.1 elric * @return Return an error code or 0, see krb5_get_error_message().
387 1.1 elric *
388 1.1 elric * @ingroup krb5_ccache
389 1.1 elric */
390 1.1 elric
391 1.1 elric
392 1.1 elric KRB5_DEPRECATED
393 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
394 1.1 elric krb5_cc_gen_new(krb5_context context,
395 1.1 elric const krb5_cc_ops *ops,
396 1.1 elric krb5_ccache *id)
397 1.1 elric {
398 1.1 elric return krb5_cc_new_unique(context, ops->prefix, NULL, id);
399 1.1 elric }
400 1.1 elric
401 1.1 elric /**
402 1.1 elric * Deprecated: use krb5_principal_get_realm()
403 1.1 elric *
404 1.1 elric * @ingroup krb5_deprecated
405 1.1 elric */
406 1.1 elric
407 1.1 elric KRB5_DEPRECATED
408 1.1 elric KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL
409 1.1 elric krb5_princ_realm(krb5_context context,
410 1.1 elric krb5_principal principal)
411 1.1 elric {
412 1.1 elric return &principal->realm;
413 1.1 elric }
414 1.1 elric
415 1.1 elric
416 1.1 elric /**
417 1.1 elric * Deprecated: use krb5_principal_set_realm()
418 1.1 elric *
419 1.1 elric * @ingroup krb5_deprecated
420 1.1 elric */
421 1.1 elric
422 1.1 elric KRB5_DEPRECATED
423 1.1 elric KRB5_LIB_FUNCTION void KRB5_LIB_CALL
424 1.1 elric krb5_princ_set_realm(krb5_context context,
425 1.1 elric krb5_principal principal,
426 1.1 elric krb5_realm *realm)
427 1.1 elric {
428 1.1 elric principal->realm = *realm;
429 1.1 elric }
430 1.1 elric
431 1.1 elric /**
432 1.1 elric * Deprecated: use krb5_free_cred_contents()
433 1.1 elric *
434 1.1 elric * @ingroup krb5_deprecated
435 1.1 elric */
436 1.1 elric
437 1.1 elric /* keep this for compatibility with older code */
438 1.1 elric KRB5_DEPRECATED
439 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
440 1.1 elric krb5_free_creds_contents (krb5_context context, krb5_creds *c)
441 1.1 elric {
442 1.1 elric return krb5_free_cred_contents (context, c);
443 1.1 elric }
444 1.1 elric
445 1.1 elric /**
446 1.1 elric * Free the error message returned by krb5_get_error_string().
447 1.1 elric *
448 1.1 elric * Deprecated: use krb5_free_error_message()
449 1.1 elric *
450 1.1 elric * @param context Kerberos context
451 1.1 elric * @param str error message to free
452 1.1 elric *
453 1.1 elric * @ingroup krb5_deprecated
454 1.1 elric */
455 1.1 elric
456 1.1 elric KRB5_DEPRECATED
457 1.1 elric KRB5_LIB_FUNCTION void KRB5_LIB_CALL
458 1.1 elric krb5_free_error_string(krb5_context context, char *str)
459 1.1 elric {
460 1.1 elric krb5_free_error_message(context, str);
461 1.1 elric }
462 1.1 elric
463 1.1 elric /**
464 1.1 elric * Set the error message returned by krb5_get_error_string().
465 1.1 elric *
466 1.1 elric * Deprecated: use krb5_get_error_message()
467 1.1 elric *
468 1.1 elric * @param context Kerberos context
469 1.1 elric * @param fmt error message to free
470 1.1 elric *
471 1.1 elric * @return Return an error code or 0.
472 1.1 elric *
473 1.1 elric * @ingroup krb5_deprecated
474 1.1 elric */
475 1.1 elric
476 1.1 elric KRB5_DEPRECATED
477 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
478 1.1 elric krb5_set_error_string(krb5_context context, const char *fmt, ...)
479 1.1 elric __attribute__((format (printf, 2, 3)))
480 1.1 elric {
481 1.1 elric va_list ap;
482 1.1 elric
483 1.1 elric va_start(ap, fmt);
484 1.1 elric krb5_vset_error_message (context, 0, fmt, ap);
485 1.1 elric va_end(ap);
486 1.1 elric return 0;
487 1.1 elric }
488 1.1 elric
489 1.1 elric /**
490 1.1 elric * Set the error message returned by krb5_get_error_string(),
491 1.1 elric * deprecated, use krb5_set_error_message().
492 1.1 elric *
493 1.1 elric * Deprecated: use krb5_vset_error_message()
494 1.1 elric *
495 1.1 elric * @param context Kerberos context
496 1.1 elric * @param msg error message to free
497 1.1 elric *
498 1.1 elric * @return Return an error code or 0.
499 1.1 elric *
500 1.1 elric * @ingroup krb5_deprecated
501 1.1 elric */
502 1.1 elric
503 1.1 elric KRB5_DEPRECATED
504 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
505 1.1 elric krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
506 1.1 elric __attribute__ ((format (printf, 2, 0)))
507 1.1 elric {
508 1.1 elric krb5_vset_error_message(context, 0, fmt, args);
509 1.1 elric return 0;
510 1.1 elric }
511 1.1 elric
512 1.1 elric /**
513 1.1 elric * Clear the error message returned by krb5_get_error_string().
514 1.1 elric *
515 1.1 elric * Deprecated: use krb5_clear_error_message()
516 1.1 elric *
517 1.1 elric * @param context Kerberos context
518 1.1 elric *
519 1.1 elric * @ingroup krb5_deprecated
520 1.1 elric */
521 1.1 elric
522 1.1 elric KRB5_DEPRECATED
523 1.1 elric KRB5_LIB_FUNCTION void KRB5_LIB_CALL
524 1.1 elric krb5_clear_error_string(krb5_context context)
525 1.1 elric {
526 1.1 elric krb5_clear_error_message(context);
527 1.1 elric }
528 1.1 elric
529 1.1 elric /**
530 1.1 elric * Deprecated: use krb5_get_credentials_with_flags().
531 1.1 elric *
532 1.1 elric * @ingroup krb5_deprecated
533 1.1 elric */
534 1.1 elric
535 1.1 elric KRB5_DEPRECATED
536 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
537 1.1 elric krb5_get_cred_from_kdc_opt(krb5_context context,
538 1.1 elric krb5_ccache ccache,
539 1.1 elric krb5_creds *in_creds,
540 1.1 elric krb5_creds **out_creds,
541 1.1 elric krb5_creds ***ret_tgts,
542 1.1 elric krb5_flags flags)
543 1.1 elric {
544 1.1 elric krb5_kdc_flags f;
545 1.1 elric f.i = flags;
546 1.1 elric return _krb5_get_cred_kdc_any(context, f, ccache,
547 1.1 elric in_creds, NULL, NULL,
548 1.1 elric out_creds, ret_tgts);
549 1.1 elric }
550 1.1 elric
551 1.1 elric /**
552 1.1 elric * Deprecated: use krb5_get_credentials_with_flags().
553 1.1 elric *
554 1.1 elric * @ingroup krb5_deprecated
555 1.1 elric */
556 1.1 elric
557 1.1 elric KRB5_DEPRECATED
558 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
559 1.1 elric krb5_get_cred_from_kdc(krb5_context context,
560 1.1 elric krb5_ccache ccache,
561 1.1 elric krb5_creds *in_creds,
562 1.1 elric krb5_creds **out_creds,
563 1.1 elric krb5_creds ***ret_tgts)
564 1.1 elric {
565 1.1 elric return krb5_get_cred_from_kdc_opt(context, ccache,
566 1.1 elric in_creds, out_creds, ret_tgts, 0);
567 1.1 elric }
568 1.1 elric
569 1.1 elric /**
570 1.1 elric * Deprecated: use krb5_xfree().
571 1.1 elric *
572 1.1 elric * @ingroup krb5_deprecated
573 1.1 elric */
574 1.1 elric
575 1.1 elric KRB5_DEPRECATED
576 1.1 elric KRB5_LIB_FUNCTION void KRB5_LIB_CALL
577 1.1 elric krb5_free_unparsed_name(krb5_context context, char *str)
578 1.1 elric {
579 1.1 elric krb5_xfree(str);
580 1.1 elric }
581 1.1 elric
582 1.1 elric /**
583 1.1 elric * Deprecated: use krb5_generate_subkey_extended()
584 1.1 elric *
585 1.1 elric * @ingroup krb5_deprecated
586 1.1 elric */
587 1.1 elric
588 1.1 elric KRB5_DEPRECATED
589 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
590 1.1 elric krb5_generate_subkey(krb5_context context,
591 1.1 elric const krb5_keyblock *key,
592 1.1 elric krb5_keyblock **subkey)
593 1.1 elric {
594 1.1 elric return krb5_generate_subkey_extended(context, key, ETYPE_NULL, subkey);
595 1.1 elric }
596 1.1 elric
597 1.1 elric /**
598 1.1 elric * Deprecated: use krb5_auth_con_getremoteseqnumber()
599 1.1 elric *
600 1.1 elric * @ingroup krb5_deprecated
601 1.1 elric */
602 1.1 elric
603 1.1 elric KRB5_DEPRECATED
604 1.1 elric KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
605 1.1 elric krb5_auth_getremoteseqnumber(krb5_context context,
606 1.1 elric krb5_auth_context auth_context,
607 1.1 elric int32_t *seqnumber)
608 1.1 elric {
609 1.1 elric *seqnumber = auth_context->remote_seqnumber;
610 1.1 elric return 0;
611 1.1 elric }
612 1.1 elric
613 1.1 elric #endif /* HEIMDAL_SMALLER */
614