1226031Sstas/* 2226031Sstas * Copyright (c) 1997 - 2009 Kungliga Tekniska H�gskolan 3226031Sstas * (Royal Institute of Technology, Stockholm, Sweden). 4226031Sstas * All rights reserved. 5226031Sstas * 6226031Sstas * Redistribution and use in source and binary forms, with or without 7226031Sstas * modification, are permitted provided that the following conditions 8226031Sstas * are met: 9226031Sstas * 10226031Sstas * 1. Redistributions of source code must retain the above copyright 11226031Sstas * notice, this list of conditions and the following disclaimer. 12226031Sstas * 13226031Sstas * 2. Redistributions in binary form must reproduce the above copyright 14226031Sstas * notice, this list of conditions and the following disclaimer in the 15226031Sstas * documentation and/or other materials provided with the distribution. 16226031Sstas * 17226031Sstas * 3. Neither the name of the Institute nor the names of its contributors 18226031Sstas * may be used to endorse or promote products derived from this software 19226031Sstas * without specific prior written permission. 20226031Sstas * 21226031Sstas * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 22226031Sstas * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23226031Sstas * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 24226031Sstas * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 25226031Sstas * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26226031Sstas * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27226031Sstas * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28226031Sstas * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29226031Sstas * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30226031Sstas * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31226031Sstas * SUCH DAMAGE. 32226031Sstas */ 33226031Sstas 34226031Sstas#include "krb5_locl.h" 35226031Sstas 36226031Sstas#undef __attribute__ 37226031Sstas#define __attribute__(x) 38226031Sstas 39226031Sstas#ifndef HEIMDAL_SMALLER 40226031Sstas 41226031Sstas/** 42226031Sstas * Same as krb5_data_free(). MIT compat. 43226031Sstas * 44226031Sstas * Deprecated: use krb5_data_free(). 45226031Sstas * 46226031Sstas * @param context Kerberos 5 context. 47226031Sstas * @param data krb5_data to free. 48226031Sstas * 49226031Sstas * @ingroup krb5_deprecated 50226031Sstas */ 51226031Sstas 52226031SstasKRB5_LIB_FUNCTION void KRB5_LIB_CALL 53226031Sstaskrb5_free_data_contents(krb5_context context, krb5_data *data) 54226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 55226031Sstas{ 56226031Sstas krb5_data_free(data); 57226031Sstas} 58226031Sstas 59226031Sstas/** 60226031Sstas * Deprecated: keytypes doesn't exists, they are really enctypes. 61226031Sstas * 62226031Sstas * @ingroup krb5_deprecated 63226031Sstas */ 64226031Sstas 65226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 66226031Sstaskrb5_keytype_to_enctypes_default (krb5_context context, 67226031Sstas krb5_keytype keytype, 68226031Sstas unsigned *len, 69226031Sstas krb5_enctype **val) 70226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 71226031Sstas{ 72226031Sstas unsigned int i, n; 73226031Sstas krb5_enctype *ret; 74226031Sstas 75226031Sstas if (keytype != KEYTYPE_DES || context->etypes_des == NULL) 76226031Sstas return krb5_keytype_to_enctypes (context, keytype, len, val); 77226031Sstas 78226031Sstas for (n = 0; context->etypes_des[n]; ++n) 79226031Sstas ; 80226031Sstas ret = malloc (n * sizeof(*ret)); 81226031Sstas if (ret == NULL && n != 0) { 82226031Sstas krb5_set_error_message(context, ENOMEM, N_("malloc: out of memory", "")); 83226031Sstas return ENOMEM; 84226031Sstas } 85226031Sstas for (i = 0; i < n; ++i) 86226031Sstas ret[i] = context->etypes_des[i]; 87226031Sstas *len = n; 88226031Sstas *val = ret; 89226031Sstas return 0; 90226031Sstas} 91226031Sstas 92226031Sstas 93226031Sstasstatic struct { 94226031Sstas const char *name; 95226031Sstas krb5_keytype type; 96226031Sstas} keys[] = { 97226031Sstas { "null", ENCTYPE_NULL }, 98226031Sstas { "des", ETYPE_DES_CBC_CRC }, 99226031Sstas { "des3", ETYPE_OLD_DES3_CBC_SHA1 }, 100226031Sstas { "aes-128", ETYPE_AES128_CTS_HMAC_SHA1_96 }, 101226031Sstas { "aes-256", ETYPE_AES256_CTS_HMAC_SHA1_96 }, 102226031Sstas { "arcfour", ETYPE_ARCFOUR_HMAC_MD5 }, 103226031Sstas { "arcfour-56", ETYPE_ARCFOUR_HMAC_MD5_56 } 104226031Sstas}; 105226031Sstas 106226031Sstasstatic int num_keys = sizeof(keys) / sizeof(keys[0]); 107226031Sstas 108226031Sstas/** 109226031Sstas * Deprecated: keytypes doesn't exists, they are really enctypes in 110226031Sstas * most cases, use krb5_enctype_to_string(). 111226031Sstas * 112226031Sstas * @ingroup krb5_deprecated 113226031Sstas */ 114226031Sstas 115226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 116226031Sstaskrb5_keytype_to_string(krb5_context context, 117226031Sstas krb5_keytype keytype, 118226031Sstas char **string) 119226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 120226031Sstas{ 121226031Sstas const char *name = NULL; 122226031Sstas int i; 123226031Sstas 124226031Sstas for(i = 0; i < num_keys; i++) { 125226031Sstas if(keys[i].type == keytype) { 126226031Sstas name = keys[i].name; 127226031Sstas break; 128226031Sstas } 129226031Sstas } 130226031Sstas 131226031Sstas if(i >= num_keys) { 132226031Sstas krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP, 133226031Sstas "key type %d not supported", keytype); 134226031Sstas return KRB5_PROG_KEYTYPE_NOSUPP; 135226031Sstas } 136226031Sstas *string = strdup(name); 137226031Sstas if(*string == NULL) { 138226031Sstas krb5_set_error_message(context, ENOMEM, 139226031Sstas N_("malloc: out of memory", "")); 140226031Sstas return ENOMEM; 141226031Sstas } 142226031Sstas return 0; 143226031Sstas} 144226031Sstas 145226031Sstas/** 146226031Sstas * Deprecated: keytypes doesn't exists, they are really enctypes in 147226031Sstas * most cases, use krb5_string_to_enctype(). 148226031Sstas * 149226031Sstas * @ingroup krb5_deprecated 150226031Sstas */ 151226031Sstas 152226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 153226031Sstaskrb5_string_to_keytype(krb5_context context, 154226031Sstas const char *string, 155226031Sstas krb5_keytype *keytype) 156226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 157226031Sstas{ 158226031Sstas char *end; 159226031Sstas int i; 160226031Sstas 161226031Sstas for(i = 0; i < num_keys; i++) 162226031Sstas if(strcasecmp(keys[i].name, string) == 0){ 163226031Sstas *keytype = keys[i].type; 164226031Sstas return 0; 165226031Sstas } 166226031Sstas 167226031Sstas /* check if the enctype is a number */ 168226031Sstas *keytype = strtol(string, &end, 0); 169226031Sstas if(*end == '\0' && *keytype != 0) { 170226031Sstas if (krb5_enctype_valid(context, *keytype) == 0) 171226031Sstas return 0; 172226031Sstas } 173226031Sstas 174226031Sstas krb5_set_error_message(context, KRB5_PROG_KEYTYPE_NOSUPP, 175226031Sstas "key type %s not supported", string); 176226031Sstas return KRB5_PROG_KEYTYPE_NOSUPP; 177226031Sstas} 178226031Sstas 179226031Sstas/** 180226031Sstas * Deprecated: use krb5_get_init_creds() and friends. 181226031Sstas * 182226031Sstas * @ingroup krb5_deprecated 183226031Sstas */ 184226031Sstas 185226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV 186226031Sstaskrb5_password_key_proc (krb5_context context, 187226031Sstas krb5_enctype type, 188226031Sstas krb5_salt salt, 189226031Sstas krb5_const_pointer keyseed, 190226031Sstas krb5_keyblock **key) 191226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 192226031Sstas{ 193226031Sstas krb5_error_code ret; 194226031Sstas const char *password = (const char *)keyseed; 195226031Sstas char buf[BUFSIZ]; 196226031Sstas 197226031Sstas *key = malloc (sizeof (**key)); 198226031Sstas if (*key == NULL) { 199226031Sstas krb5_set_error_message(context, ENOMEM, "malloc: out of memory"); 200226031Sstas return ENOMEM; 201226031Sstas } 202226031Sstas if (password == NULL) { 203226031Sstas if(UI_UTIL_read_pw_string (buf, sizeof(buf), "Password: ", 0)) { 204226031Sstas free (*key); 205226031Sstas krb5_clear_error_message(context); 206226031Sstas return KRB5_LIBOS_PWDINTR; 207226031Sstas } 208226031Sstas password = buf; 209226031Sstas } 210226031Sstas ret = krb5_string_to_key_salt (context, type, password, salt, *key); 211226031Sstas memset (buf, 0, sizeof(buf)); 212226031Sstas return ret; 213226031Sstas} 214226031Sstas 215226031Sstas/** 216226031Sstas * Deprecated: use krb5_get_init_creds() and friends. 217226031Sstas * 218226031Sstas * @ingroup krb5_deprecated 219226031Sstas */ 220226031Sstas 221226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 222226031Sstaskrb5_get_in_tkt_with_password (krb5_context context, 223226031Sstas krb5_flags options, 224226031Sstas krb5_addresses *addrs, 225226031Sstas const krb5_enctype *etypes, 226226031Sstas const krb5_preauthtype *pre_auth_types, 227226031Sstas const char *password, 228226031Sstas krb5_ccache ccache, 229226031Sstas krb5_creds *creds, 230226031Sstas krb5_kdc_rep *ret_as_reply) 231226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 232226031Sstas{ 233226031Sstas return krb5_get_in_tkt (context, 234226031Sstas options, 235226031Sstas addrs, 236226031Sstas etypes, 237226031Sstas pre_auth_types, 238226031Sstas krb5_password_key_proc, 239226031Sstas password, 240226031Sstas NULL, 241226031Sstas NULL, 242226031Sstas creds, 243226031Sstas ccache, 244226031Sstas ret_as_reply); 245226031Sstas} 246226031Sstas 247226031Sstasstatic krb5_error_code KRB5_CALLCONV 248226031Sstaskrb5_skey_key_proc (krb5_context context, 249226031Sstas krb5_enctype type, 250226031Sstas krb5_salt salt, 251226031Sstas krb5_const_pointer keyseed, 252226031Sstas krb5_keyblock **key) 253226031Sstas{ 254226031Sstas return krb5_copy_keyblock (context, keyseed, key); 255226031Sstas} 256226031Sstas 257226031Sstas/** 258226031Sstas * Deprecated: use krb5_get_init_creds() and friends. 259226031Sstas * 260226031Sstas * @ingroup krb5_deprecated 261226031Sstas */ 262226031Sstas 263226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 264226031Sstaskrb5_get_in_tkt_with_skey (krb5_context context, 265226031Sstas krb5_flags options, 266226031Sstas krb5_addresses *addrs, 267226031Sstas const krb5_enctype *etypes, 268226031Sstas const krb5_preauthtype *pre_auth_types, 269226031Sstas const krb5_keyblock *key, 270226031Sstas krb5_ccache ccache, 271226031Sstas krb5_creds *creds, 272226031Sstas krb5_kdc_rep *ret_as_reply) 273226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 274226031Sstas{ 275226031Sstas if(key == NULL) 276226031Sstas return krb5_get_in_tkt_with_keytab (context, 277226031Sstas options, 278226031Sstas addrs, 279226031Sstas etypes, 280226031Sstas pre_auth_types, 281226031Sstas NULL, 282226031Sstas ccache, 283226031Sstas creds, 284226031Sstas ret_as_reply); 285226031Sstas else 286226031Sstas return krb5_get_in_tkt (context, 287226031Sstas options, 288226031Sstas addrs, 289226031Sstas etypes, 290226031Sstas pre_auth_types, 291226031Sstas krb5_skey_key_proc, 292226031Sstas key, 293226031Sstas NULL, 294226031Sstas NULL, 295226031Sstas creds, 296226031Sstas ccache, 297226031Sstas ret_as_reply); 298226031Sstas} 299226031Sstas 300226031Sstas/** 301226031Sstas * Deprecated: use krb5_get_init_creds() and friends. 302226031Sstas * 303226031Sstas * @ingroup krb5_deprecated 304226031Sstas */ 305226031Sstas 306226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_CALLCONV 307226031Sstaskrb5_keytab_key_proc (krb5_context context, 308226031Sstas krb5_enctype enctype, 309226031Sstas krb5_salt salt, 310226031Sstas krb5_const_pointer keyseed, 311226031Sstas krb5_keyblock **key) 312226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 313226031Sstas{ 314226031Sstas krb5_keytab_key_proc_args *args = rk_UNCONST(keyseed); 315226031Sstas krb5_keytab keytab = args->keytab; 316226031Sstas krb5_principal principal = args->principal; 317226031Sstas krb5_error_code ret; 318226031Sstas krb5_keytab real_keytab; 319226031Sstas krb5_keytab_entry entry; 320226031Sstas 321226031Sstas if(keytab == NULL) 322226031Sstas krb5_kt_default(context, &real_keytab); 323226031Sstas else 324226031Sstas real_keytab = keytab; 325226031Sstas 326226031Sstas ret = krb5_kt_get_entry (context, real_keytab, principal, 327226031Sstas 0, enctype, &entry); 328226031Sstas 329226031Sstas if (keytab == NULL) 330226031Sstas krb5_kt_close (context, real_keytab); 331226031Sstas 332226031Sstas if (ret) 333226031Sstas return ret; 334226031Sstas 335226031Sstas ret = krb5_copy_keyblock (context, &entry.keyblock, key); 336226031Sstas krb5_kt_free_entry(context, &entry); 337226031Sstas return ret; 338226031Sstas} 339226031Sstas 340226031Sstas/** 341226031Sstas * Deprecated: use krb5_get_init_creds() and friends. 342226031Sstas * 343226031Sstas * @ingroup krb5_deprecated 344226031Sstas */ 345226031Sstas 346226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 347226031Sstaskrb5_get_in_tkt_with_keytab (krb5_context context, 348226031Sstas krb5_flags options, 349226031Sstas krb5_addresses *addrs, 350226031Sstas const krb5_enctype *etypes, 351226031Sstas const krb5_preauthtype *pre_auth_types, 352226031Sstas krb5_keytab keytab, 353226031Sstas krb5_ccache ccache, 354226031Sstas krb5_creds *creds, 355226031Sstas krb5_kdc_rep *ret_as_reply) 356226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 357226031Sstas{ 358226031Sstas krb5_keytab_key_proc_args a; 359226031Sstas 360226031Sstas a.principal = creds->client; 361226031Sstas a.keytab = keytab; 362226031Sstas 363226031Sstas return krb5_get_in_tkt (context, 364226031Sstas options, 365226031Sstas addrs, 366226031Sstas etypes, 367226031Sstas pre_auth_types, 368226031Sstas krb5_keytab_key_proc, 369226031Sstas &a, 370226031Sstas NULL, 371226031Sstas NULL, 372226031Sstas creds, 373226031Sstas ccache, 374226031Sstas ret_as_reply); 375226031Sstas} 376226031Sstas 377226031Sstas/** 378226031Sstas * Generate a new ccache of type `ops' in `id'. 379226031Sstas * 380226031Sstas * Deprecated: use krb5_cc_new_unique() instead. 381226031Sstas * 382226031Sstas * @return Return an error code or 0, see krb5_get_error_message(). 383226031Sstas * 384226031Sstas * @ingroup krb5_ccache 385226031Sstas */ 386226031Sstas 387226031Sstas 388226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 389226031Sstaskrb5_cc_gen_new(krb5_context context, 390226031Sstas const krb5_cc_ops *ops, 391226031Sstas krb5_ccache *id) 392226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 393226031Sstas{ 394226031Sstas return krb5_cc_new_unique(context, ops->prefix, NULL, id); 395226031Sstas} 396226031Sstas 397226031Sstas/** 398226031Sstas * Deprecated: use krb5_principal_get_realm() 399226031Sstas * 400226031Sstas * @ingroup krb5_deprecated 401226031Sstas */ 402226031Sstas 403226031SstasKRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL 404226031Sstaskrb5_princ_realm(krb5_context context, 405226031Sstas krb5_principal principal) 406226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 407226031Sstas{ 408226031Sstas return &principal->realm; 409226031Sstas} 410226031Sstas 411226031Sstas 412226031Sstas/** 413226031Sstas * Deprecated: use krb5_principal_set_realm() 414226031Sstas * 415226031Sstas * @ingroup krb5_deprecated 416226031Sstas */ 417226031Sstas 418226031SstasKRB5_LIB_FUNCTION void KRB5_LIB_CALL 419226031Sstaskrb5_princ_set_realm(krb5_context context, 420226031Sstas krb5_principal principal, 421226031Sstas krb5_realm *realm) 422226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 423226031Sstas{ 424226031Sstas principal->realm = *realm; 425226031Sstas} 426226031Sstas 427226031Sstas/** 428226031Sstas * Deprecated: use krb5_free_cred_contents() 429226031Sstas * 430226031Sstas * @ingroup krb5_deprecated 431226031Sstas */ 432226031Sstas 433226031Sstas/* keep this for compatibility with older code */ 434226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 435226031Sstaskrb5_free_creds_contents (krb5_context context, krb5_creds *c) 436226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 437226031Sstas{ 438226031Sstas return krb5_free_cred_contents (context, c); 439226031Sstas} 440226031Sstas 441226031Sstas/** 442226031Sstas * Free the error message returned by krb5_get_error_string(). 443226031Sstas * 444226031Sstas * Deprecated: use krb5_free_error_message() 445226031Sstas * 446226031Sstas * @param context Kerberos context 447226031Sstas * @param str error message to free 448226031Sstas * 449226031Sstas * @ingroup krb5_deprecated 450226031Sstas */ 451226031Sstas 452226031SstasKRB5_LIB_FUNCTION void KRB5_LIB_CALL 453226031Sstaskrb5_free_error_string(krb5_context context, char *str) 454226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 455226031Sstas{ 456226031Sstas krb5_free_error_message(context, str); 457226031Sstas} 458226031Sstas 459226031Sstas/** 460226031Sstas * Set the error message returned by krb5_get_error_string(). 461226031Sstas * 462226031Sstas * Deprecated: use krb5_get_error_message() 463226031Sstas * 464226031Sstas * @param context Kerberos context 465226031Sstas * @param fmt error message to free 466226031Sstas * 467226031Sstas * @return Return an error code or 0. 468226031Sstas * 469226031Sstas * @ingroup krb5_deprecated 470226031Sstas */ 471226031Sstas 472226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 473226031Sstaskrb5_set_error_string(krb5_context context, const char *fmt, ...) 474226031Sstas __attribute__((format (printf, 2, 3))) 475226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 476226031Sstas{ 477226031Sstas va_list ap; 478226031Sstas 479226031Sstas va_start(ap, fmt); 480226031Sstas krb5_vset_error_message (context, 0, fmt, ap); 481226031Sstas va_end(ap); 482226031Sstas return 0; 483226031Sstas} 484226031Sstas 485226031Sstas/** 486226031Sstas * Set the error message returned by krb5_get_error_string(), 487226031Sstas * deprecated, use krb5_set_error_message(). 488226031Sstas * 489226031Sstas * Deprecated: use krb5_vset_error_message() 490226031Sstas * 491226031Sstas * @param context Kerberos context 492226031Sstas * @param msg error message to free 493226031Sstas * 494226031Sstas * @return Return an error code or 0. 495226031Sstas * 496226031Sstas * @ingroup krb5_deprecated 497226031Sstas */ 498226031Sstas 499226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 500226031Sstaskrb5_vset_error_string(krb5_context context, const char *fmt, va_list args) 501226031Sstas __attribute__ ((format (printf, 2, 0))) 502226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 503226031Sstas{ 504226031Sstas krb5_vset_error_message(context, 0, fmt, args); 505226031Sstas return 0; 506226031Sstas} 507226031Sstas 508226031Sstas/** 509226031Sstas * Clear the error message returned by krb5_get_error_string(). 510226031Sstas * 511226031Sstas * Deprecated: use krb5_clear_error_message() 512226031Sstas * 513226031Sstas * @param context Kerberos context 514226031Sstas * 515226031Sstas * @ingroup krb5_deprecated 516226031Sstas */ 517226031Sstas 518226031SstasKRB5_LIB_FUNCTION void KRB5_LIB_CALL 519226031Sstaskrb5_clear_error_string(krb5_context context) 520226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 521226031Sstas{ 522226031Sstas krb5_clear_error_message(context); 523226031Sstas} 524226031Sstas 525226031Sstas/** 526226031Sstas * Deprecated: use krb5_get_credentials_with_flags(). 527226031Sstas * 528226031Sstas * @ingroup krb5_deprecated 529226031Sstas */ 530226031Sstas 531226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 532226031Sstaskrb5_get_cred_from_kdc_opt(krb5_context context, 533226031Sstas krb5_ccache ccache, 534226031Sstas krb5_creds *in_creds, 535226031Sstas krb5_creds **out_creds, 536226031Sstas krb5_creds ***ret_tgts, 537226031Sstas krb5_flags flags) 538226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 539226031Sstas{ 540226031Sstas krb5_kdc_flags f; 541226031Sstas f.i = flags; 542226031Sstas return _krb5_get_cred_kdc_any(context, f, ccache, 543226031Sstas in_creds, NULL, NULL, 544226031Sstas out_creds, ret_tgts); 545226031Sstas} 546226031Sstas 547226031Sstas/** 548226031Sstas * Deprecated: use krb5_get_credentials_with_flags(). 549226031Sstas * 550226031Sstas * @ingroup krb5_deprecated 551226031Sstas */ 552226031Sstas 553226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 554226031Sstaskrb5_get_cred_from_kdc(krb5_context context, 555226031Sstas krb5_ccache ccache, 556226031Sstas krb5_creds *in_creds, 557226031Sstas krb5_creds **out_creds, 558226031Sstas krb5_creds ***ret_tgts) 559226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 560226031Sstas{ 561226031Sstas return krb5_get_cred_from_kdc_opt(context, ccache, 562226031Sstas in_creds, out_creds, ret_tgts, 0); 563226031Sstas} 564226031Sstas 565226031Sstas/** 566226031Sstas * Deprecated: use krb5_xfree(). 567226031Sstas * 568226031Sstas * @ingroup krb5_deprecated 569226031Sstas */ 570226031Sstas 571226031SstasKRB5_LIB_FUNCTION void KRB5_LIB_CALL 572226031Sstaskrb5_free_unparsed_name(krb5_context context, char *str) 573226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 574226031Sstas{ 575226031Sstas krb5_xfree(str); 576226031Sstas} 577226031Sstas 578226031Sstas/** 579226031Sstas * Deprecated: use krb5_generate_subkey_extended() 580226031Sstas * 581226031Sstas * @ingroup krb5_deprecated 582226031Sstas */ 583226031Sstas 584226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 585226031Sstaskrb5_generate_subkey(krb5_context context, 586226031Sstas const krb5_keyblock *key, 587226031Sstas krb5_keyblock **subkey) 588226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 589226031Sstas{ 590226031Sstas return krb5_generate_subkey_extended(context, key, ETYPE_NULL, subkey); 591226031Sstas} 592226031Sstas 593226031Sstas/** 594226031Sstas * Deprecated: use krb5_auth_con_getremoteseqnumber() 595226031Sstas * 596226031Sstas * @ingroup krb5_deprecated 597226031Sstas */ 598226031Sstas 599226031SstasKRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL 600226031Sstaskrb5_auth_getremoteseqnumber(krb5_context context, 601226031Sstas krb5_auth_context auth_context, 602226031Sstas int32_t *seqnumber) 603226031Sstas KRB5_DEPRECATED_FUNCTION("Use X instead") 604226031Sstas{ 605226031Sstas *seqnumber = auth_context->remote_seqnumber; 606226031Sstas return 0; 607226031Sstas} 608226031Sstas 609226031Sstas#endif /* HEIMDAL_SMALLER */ 610