1b528cefcSMark Murray /* 2ae771770SStanislav Sedov * Copyright (c) 1997 - 2007 Kungliga Tekniska Högskolan 3b528cefcSMark Murray * (Royal Institute of Technology, Stockholm, Sweden). 4b528cefcSMark Murray * All rights reserved. 5b528cefcSMark Murray * 6ae771770SStanislav Sedov * Portions Copyright (c) 2009 Apple Inc. All rights reserved. 7ae771770SStanislav Sedov * 8b528cefcSMark Murray * Redistribution and use in source and binary forms, with or without 9b528cefcSMark Murray * modification, are permitted provided that the following conditions 10b528cefcSMark Murray * are met: 11b528cefcSMark Murray * 12b528cefcSMark Murray * 1. Redistributions of source code must retain the above copyright 13b528cefcSMark Murray * notice, this list of conditions and the following disclaimer. 14b528cefcSMark Murray * 15b528cefcSMark Murray * 2. Redistributions in binary form must reproduce the above copyright 16b528cefcSMark Murray * notice, this list of conditions and the following disclaimer in the 17b528cefcSMark Murray * documentation and/or other materials provided with the distribution. 18b528cefcSMark Murray * 19b528cefcSMark Murray * 3. Neither the name of the Institute nor the names of its contributors 20b528cefcSMark Murray * may be used to endorse or promote products derived from this software 21b528cefcSMark Murray * without specific prior written permission. 22b528cefcSMark Murray * 23b528cefcSMark Murray * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND 24b528cefcSMark Murray * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 25b528cefcSMark Murray * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 26b528cefcSMark Murray * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE 27b528cefcSMark Murray * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28b528cefcSMark Murray * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29b528cefcSMark Murray * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30b528cefcSMark Murray * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31b528cefcSMark Murray * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32b528cefcSMark Murray * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33b528cefcSMark Murray * SUCH DAMAGE. 34b528cefcSMark Murray */ 35b528cefcSMark Murray 36ae771770SStanislav Sedov /* $Id$ */ 37b528cefcSMark Murray 38b528cefcSMark Murray #ifndef __KRB5_H__ 39b528cefcSMark Murray #define __KRB5_H__ 40b528cefcSMark Murray 41b528cefcSMark Murray #include <time.h> 42b528cefcSMark Murray #include <krb5-types.h> 43b528cefcSMark Murray 44b528cefcSMark Murray #include <asn1_err.h> 45b528cefcSMark Murray #include <krb5_err.h> 46b528cefcSMark Murray #include <heim_err.h> 474137ff4cSJacques Vidrine #include <k524_err.h> 48b528cefcSMark Murray 49adb0ddaeSAssar Westerlund #include <krb5_asn1.h> 50b528cefcSMark Murray 518373020dSJacques Vidrine /* name confusion with MIT */ 528373020dSJacques Vidrine #ifndef KRB5KDC_ERR_KEY_EXP 538373020dSJacques Vidrine #define KRB5KDC_ERR_KEY_EXP KRB5KDC_ERR_KEY_EXPIRED 548373020dSJacques Vidrine #endif 558373020dSJacques Vidrine 56ae771770SStanislav Sedov #ifdef _WIN32 57ae771770SStanislav Sedov #define KRB5_CALLCONV __stdcall 58ae771770SStanislav Sedov #else 59ae771770SStanislav Sedov #define KRB5_CALLCONV 60ae771770SStanislav Sedov #endif 61ae771770SStanislav Sedov 62b528cefcSMark Murray /* simple constants */ 63b528cefcSMark Murray 64b528cefcSMark Murray #ifndef TRUE 65b528cefcSMark Murray #define TRUE 1 66b528cefcSMark Murray #define FALSE 0 67b528cefcSMark Murray #endif 68b528cefcSMark Murray 69b528cefcSMark Murray typedef int krb5_boolean; 70b528cefcSMark Murray 71b528cefcSMark Murray typedef int32_t krb5_error_code; 72b528cefcSMark Murray 73ae771770SStanislav Sedov typedef int32_t krb5_kvno; 74b528cefcSMark Murray 75c19800e8SDoug Rabson typedef uint32_t krb5_flags; 76b528cefcSMark Murray 77b528cefcSMark Murray typedef void *krb5_pointer; 78b528cefcSMark Murray typedef const void *krb5_const_pointer; 79b528cefcSMark Murray 80b528cefcSMark Murray struct krb5_crypto_data; 81b528cefcSMark Murray typedef struct krb5_crypto_data *krb5_crypto; 82b528cefcSMark Murray 83c19800e8SDoug Rabson struct krb5_get_creds_opt_data; 84c19800e8SDoug Rabson typedef struct krb5_get_creds_opt_data *krb5_get_creds_opt; 85c19800e8SDoug Rabson 86c19800e8SDoug Rabson struct krb5_digest_data; 87c19800e8SDoug Rabson typedef struct krb5_digest_data *krb5_digest; 88c19800e8SDoug Rabson struct krb5_ntlm_data; 89c19800e8SDoug Rabson typedef struct krb5_ntlm_data *krb5_ntlm; 90c19800e8SDoug Rabson 91c19800e8SDoug Rabson struct krb5_pac_data; 92c19800e8SDoug Rabson typedef struct krb5_pac_data *krb5_pac; 93c19800e8SDoug Rabson 94c19800e8SDoug Rabson typedef struct krb5_rd_req_in_ctx_data *krb5_rd_req_in_ctx; 95c19800e8SDoug Rabson typedef struct krb5_rd_req_out_ctx_data *krb5_rd_req_out_ctx; 96c19800e8SDoug Rabson 975e9cd1aeSAssar Westerlund typedef CKSUMTYPE krb5_cksumtype; 98b528cefcSMark Murray 99adb0ddaeSAssar Westerlund typedef Checksum krb5_checksum; 100adb0ddaeSAssar Westerlund 101adb0ddaeSAssar Westerlund typedef ENCTYPE krb5_enctype; 102adb0ddaeSAssar Westerlund 103ae771770SStanislav Sedov typedef struct krb5_get_init_creds_ctx *krb5_init_creds_context; 104ae771770SStanislav Sedov 105c19800e8SDoug Rabson typedef heim_octet_string krb5_data; 106c19800e8SDoug Rabson 107c19800e8SDoug Rabson /* PKINIT related forward declarations */ 108c19800e8SDoug Rabson struct ContentInfo; 109c19800e8SDoug Rabson struct krb5_pk_identity; 110c19800e8SDoug Rabson struct krb5_pk_cert; 111c19800e8SDoug Rabson 112c19800e8SDoug Rabson /* krb5_enc_data is a mit compat structure */ 113c19800e8SDoug Rabson typedef struct krb5_enc_data { 114c19800e8SDoug Rabson krb5_enctype enctype; 115c19800e8SDoug Rabson krb5_kvno kvno; 116c19800e8SDoug Rabson krb5_data ciphertext; 117c19800e8SDoug Rabson } krb5_enc_data; 118c19800e8SDoug Rabson 119adb0ddaeSAssar Westerlund /* alternative names */ 120adb0ddaeSAssar Westerlund enum { 121ae771770SStanislav Sedov ENCTYPE_NULL = KRB5_ENCTYPE_NULL, 122ae771770SStanislav Sedov ENCTYPE_DES_CBC_CRC = KRB5_ENCTYPE_DES_CBC_CRC, 123ae771770SStanislav Sedov ENCTYPE_DES_CBC_MD4 = KRB5_ENCTYPE_DES_CBC_MD4, 124ae771770SStanislav Sedov ENCTYPE_DES_CBC_MD5 = KRB5_ENCTYPE_DES_CBC_MD5, 125ae771770SStanislav Sedov ENCTYPE_DES3_CBC_MD5 = KRB5_ENCTYPE_DES3_CBC_MD5, 126ae771770SStanislav Sedov ENCTYPE_OLD_DES3_CBC_SHA1 = KRB5_ENCTYPE_OLD_DES3_CBC_SHA1, 127ae771770SStanislav Sedov ENCTYPE_SIGN_DSA_GENERATE = KRB5_ENCTYPE_SIGN_DSA_GENERATE, 128ae771770SStanislav Sedov ENCTYPE_ENCRYPT_RSA_PRIV = KRB5_ENCTYPE_ENCRYPT_RSA_PRIV, 129ae771770SStanislav Sedov ENCTYPE_ENCRYPT_RSA_PUB = KRB5_ENCTYPE_ENCRYPT_RSA_PUB, 130ae771770SStanislav Sedov ENCTYPE_DES3_CBC_SHA1 = KRB5_ENCTYPE_DES3_CBC_SHA1, 131ae771770SStanislav Sedov ENCTYPE_AES128_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96, 132ae771770SStanislav Sedov ENCTYPE_AES256_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96, 133ae771770SStanislav Sedov ENCTYPE_ARCFOUR_HMAC = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5, 134ae771770SStanislav Sedov ENCTYPE_ARCFOUR_HMAC_MD5 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5, 135ae771770SStanislav Sedov ENCTYPE_ARCFOUR_HMAC_MD5_56 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56, 136ae771770SStanislav Sedov ENCTYPE_ENCTYPE_PK_CROSS = KRB5_ENCTYPE_ENCTYPE_PK_CROSS, 137ae771770SStanislav Sedov ENCTYPE_DES_CBC_NONE = KRB5_ENCTYPE_DES_CBC_NONE, 138ae771770SStanislav Sedov ENCTYPE_DES3_CBC_NONE = KRB5_ENCTYPE_DES3_CBC_NONE, 139ae771770SStanislav Sedov ENCTYPE_DES_CFB64_NONE = KRB5_ENCTYPE_DES_CFB64_NONE, 140ae771770SStanislav Sedov ENCTYPE_DES_PCBC_NONE = KRB5_ENCTYPE_DES_PCBC_NONE, 141ae771770SStanislav Sedov ETYPE_NULL = KRB5_ENCTYPE_NULL, 142ae771770SStanislav Sedov ETYPE_DES_CBC_CRC = KRB5_ENCTYPE_DES_CBC_CRC, 143ae771770SStanislav Sedov ETYPE_DES_CBC_MD4 = KRB5_ENCTYPE_DES_CBC_MD4, 144ae771770SStanislav Sedov ETYPE_DES_CBC_MD5 = KRB5_ENCTYPE_DES_CBC_MD5, 145ae771770SStanislav Sedov ETYPE_DES3_CBC_MD5 = KRB5_ENCTYPE_DES3_CBC_MD5, 146ae771770SStanislav Sedov ETYPE_OLD_DES3_CBC_SHA1 = KRB5_ENCTYPE_OLD_DES3_CBC_SHA1, 147ae771770SStanislav Sedov ETYPE_SIGN_DSA_GENERATE = KRB5_ENCTYPE_SIGN_DSA_GENERATE, 148ae771770SStanislav Sedov ETYPE_ENCRYPT_RSA_PRIV = KRB5_ENCTYPE_ENCRYPT_RSA_PRIV, 149ae771770SStanislav Sedov ETYPE_ENCRYPT_RSA_PUB = KRB5_ENCTYPE_ENCRYPT_RSA_PUB, 150ae771770SStanislav Sedov ETYPE_DES3_CBC_SHA1 = KRB5_ENCTYPE_DES3_CBC_SHA1, 151ae771770SStanislav Sedov ETYPE_AES128_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96, 152ae771770SStanislav Sedov ETYPE_AES256_CTS_HMAC_SHA1_96 = KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96, 153ae771770SStanislav Sedov ETYPE_ARCFOUR_HMAC_MD5 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5, 154ae771770SStanislav Sedov ETYPE_ARCFOUR_HMAC_MD5_56 = KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56, 155ae771770SStanislav Sedov ETYPE_ENCTYPE_PK_CROSS = KRB5_ENCTYPE_ENCTYPE_PK_CROSS, 156ae771770SStanislav Sedov ETYPE_ARCFOUR_MD4 = KRB5_ENCTYPE_ARCFOUR_MD4, 157ae771770SStanislav Sedov ETYPE_ARCFOUR_HMAC_OLD = KRB5_ENCTYPE_ARCFOUR_HMAC_OLD, 158ae771770SStanislav Sedov ETYPE_ARCFOUR_HMAC_OLD_EXP = KRB5_ENCTYPE_ARCFOUR_HMAC_OLD_EXP, 159ae771770SStanislav Sedov ETYPE_DES_CBC_NONE = KRB5_ENCTYPE_DES_CBC_NONE, 160ae771770SStanislav Sedov ETYPE_DES3_CBC_NONE = KRB5_ENCTYPE_DES3_CBC_NONE, 161ae771770SStanislav Sedov ETYPE_DES_CFB64_NONE = KRB5_ENCTYPE_DES_CFB64_NONE, 162ae771770SStanislav Sedov ETYPE_DES_PCBC_NONE = KRB5_ENCTYPE_DES_PCBC_NONE, 163ae771770SStanislav Sedov ETYPE_DIGEST_MD5_NONE = KRB5_ENCTYPE_DIGEST_MD5_NONE, 164ae771770SStanislav Sedov ETYPE_CRAM_MD5_NONE = KRB5_ENCTYPE_CRAM_MD5_NONE 165ae771770SStanislav Sedov 166adb0ddaeSAssar Westerlund }; 167b528cefcSMark Murray 168ae771770SStanislav Sedov /* PDU types */ 169ae771770SStanislav Sedov typedef enum krb5_pdu { 170ae771770SStanislav Sedov KRB5_PDU_ERROR = 0, 171ae771770SStanislav Sedov KRB5_PDU_TICKET = 1, 172ae771770SStanislav Sedov KRB5_PDU_AS_REQUEST = 2, 173ae771770SStanislav Sedov KRB5_PDU_AS_REPLY = 3, 174ae771770SStanislav Sedov KRB5_PDU_TGS_REQUEST = 4, 175ae771770SStanislav Sedov KRB5_PDU_TGS_REPLY = 5, 176ae771770SStanislav Sedov KRB5_PDU_AP_REQUEST = 6, 177ae771770SStanislav Sedov KRB5_PDU_AP_REPLY = 7, 178ae771770SStanislav Sedov KRB5_PDU_KRB_SAFE = 8, 179ae771770SStanislav Sedov KRB5_PDU_KRB_PRIV = 9, 180ae771770SStanislav Sedov KRB5_PDU_KRB_CRED = 10, 181ae771770SStanislav Sedov KRB5_PDU_NONE = 11 /* See krb5_get_permitted_enctypes() */ 182ae771770SStanislav Sedov } krb5_pdu; 183ae771770SStanislav Sedov 1845e9cd1aeSAssar Westerlund typedef PADATA_TYPE krb5_preauthtype; 185b528cefcSMark Murray 186b528cefcSMark Murray typedef enum krb5_key_usage { 187b528cefcSMark Murray KRB5_KU_PA_ENC_TIMESTAMP = 1, 188b528cefcSMark Murray /* AS-REQ PA-ENC-TIMESTAMP padata timestamp, encrypted with the 189b528cefcSMark Murray client key (section 5.4.1) */ 190b528cefcSMark Murray KRB5_KU_TICKET = 2, 191b528cefcSMark Murray /* AS-REP Ticket and TGS-REP Ticket (includes tgs session key or 192b528cefcSMark Murray application session key), encrypted with the service key 193b528cefcSMark Murray (section 5.4.2) */ 194b528cefcSMark Murray KRB5_KU_AS_REP_ENC_PART = 3, 195b528cefcSMark Murray /* AS-REP encrypted part (includes tgs session key or application 196b528cefcSMark Murray session key), encrypted with the client key (section 5.4.2) */ 197b528cefcSMark Murray KRB5_KU_TGS_REQ_AUTH_DAT_SESSION = 4, 198b528cefcSMark Murray /* TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the tgs 199b528cefcSMark Murray session key (section 5.4.1) */ 200b528cefcSMark Murray KRB5_KU_TGS_REQ_AUTH_DAT_SUBKEY = 5, 201b528cefcSMark Murray /* TGS-REQ KDC-REQ-BODY AuthorizationData, encrypted with the tgs 202b528cefcSMark Murray authenticator subkey (section 5.4.1) */ 203b528cefcSMark Murray KRB5_KU_TGS_REQ_AUTH_CKSUM = 6, 204b528cefcSMark Murray /* TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator cksum, keyed 205b528cefcSMark Murray with the tgs session key (sections 5.3.2, 5.4.1) */ 206b528cefcSMark Murray KRB5_KU_TGS_REQ_AUTH = 7, 207b528cefcSMark Murray /* TGS-REQ PA-TGS-REQ padata AP-REQ Authenticator (includes tgs 208b528cefcSMark Murray authenticator subkey), encrypted with the tgs session key 209b528cefcSMark Murray (section 5.3.2) */ 210b528cefcSMark Murray KRB5_KU_TGS_REP_ENC_PART_SESSION = 8, 211b528cefcSMark Murray /* TGS-REP encrypted part (includes application session key), 212b528cefcSMark Murray encrypted with the tgs session key (section 5.4.2) */ 213b528cefcSMark Murray KRB5_KU_TGS_REP_ENC_PART_SUB_KEY = 9, 214b528cefcSMark Murray /* TGS-REP encrypted part (includes application session key), 215b528cefcSMark Murray encrypted with the tgs authenticator subkey (section 5.4.2) */ 216b528cefcSMark Murray KRB5_KU_AP_REQ_AUTH_CKSUM = 10, 217b528cefcSMark Murray /* AP-REQ Authenticator cksum, keyed with the application session 218b528cefcSMark Murray key (section 5.3.2) */ 219b528cefcSMark Murray KRB5_KU_AP_REQ_AUTH = 11, 220b528cefcSMark Murray /* AP-REQ Authenticator (includes application authenticator 221b528cefcSMark Murray subkey), encrypted with the application session key (section 222b528cefcSMark Murray 5.3.2) */ 223b528cefcSMark Murray KRB5_KU_AP_REQ_ENC_PART = 12, 224b528cefcSMark Murray /* AP-REP encrypted part (includes application session subkey), 225b528cefcSMark Murray encrypted with the application session key (section 5.5.2) */ 226b528cefcSMark Murray KRB5_KU_KRB_PRIV = 13, 227b528cefcSMark Murray /* KRB-PRIV encrypted part, encrypted with a key chosen by the 228b528cefcSMark Murray application (section 5.7.1) */ 229b528cefcSMark Murray KRB5_KU_KRB_CRED = 14, 230b528cefcSMark Murray /* KRB-CRED encrypted part, encrypted with a key chosen by the 231b528cefcSMark Murray application (section 5.8.1) */ 232b528cefcSMark Murray KRB5_KU_KRB_SAFE_CKSUM = 15, 233b528cefcSMark Murray /* KRB-SAFE cksum, keyed with a key chosen by the application 234b528cefcSMark Murray (section 5.6.1) */ 235b528cefcSMark Murray KRB5_KU_OTHER_ENCRYPTED = 16, 236b528cefcSMark Murray /* Data which is defined in some specification outside of 237b528cefcSMark Murray Kerberos to be encrypted using an RFC1510 encryption type. */ 2385e9cd1aeSAssar Westerlund KRB5_KU_OTHER_CKSUM = 17, 239b528cefcSMark Murray /* Data which is defined in some specification outside of 240b528cefcSMark Murray Kerberos to be checksummed using an RFC1510 checksum type. */ 2415e9cd1aeSAssar Westerlund KRB5_KU_KRB_ERROR = 18, 2425e9cd1aeSAssar Westerlund /* Krb-error checksum */ 2435e9cd1aeSAssar Westerlund KRB5_KU_AD_KDC_ISSUED = 19, 2445e9cd1aeSAssar Westerlund /* AD-KDCIssued checksum */ 2455e9cd1aeSAssar Westerlund KRB5_KU_MANDATORY_TICKET_EXTENSION = 20, 2465e9cd1aeSAssar Westerlund /* Checksum for Mandatory Ticket Extensions */ 2475e9cd1aeSAssar Westerlund KRB5_KU_AUTH_DATA_TICKET_EXTENSION = 21, 2485e9cd1aeSAssar Westerlund /* Checksum in Authorization Data in Ticket Extensions */ 2495e9cd1aeSAssar Westerlund KRB5_KU_USAGE_SEAL = 22, 2505e9cd1aeSAssar Westerlund /* seal in GSSAPI krb5 mechanism */ 2515e9cd1aeSAssar Westerlund KRB5_KU_USAGE_SIGN = 23, 2525e9cd1aeSAssar Westerlund /* sign in GSSAPI krb5 mechanism */ 253c19800e8SDoug Rabson KRB5_KU_USAGE_SEQ = 24, 2545e9cd1aeSAssar Westerlund /* SEQ in GSSAPI krb5 mechanism */ 255c19800e8SDoug Rabson KRB5_KU_USAGE_ACCEPTOR_SEAL = 22, 256c19800e8SDoug Rabson /* acceptor sign in GSSAPI CFX krb5 mechanism */ 257c19800e8SDoug Rabson KRB5_KU_USAGE_ACCEPTOR_SIGN = 23, 258c19800e8SDoug Rabson /* acceptor seal in GSSAPI CFX krb5 mechanism */ 259c19800e8SDoug Rabson KRB5_KU_USAGE_INITIATOR_SEAL = 24, 260c19800e8SDoug Rabson /* initiator sign in GSSAPI CFX krb5 mechanism */ 261c19800e8SDoug Rabson KRB5_KU_USAGE_INITIATOR_SIGN = 25, 262c19800e8SDoug Rabson /* initiator seal in GSSAPI CFX krb5 mechanism */ 263c19800e8SDoug Rabson KRB5_KU_PA_SERVER_REFERRAL_DATA = 22, 264c19800e8SDoug Rabson /* encrypted server referral data */ 265c19800e8SDoug Rabson KRB5_KU_SAM_CHECKSUM = 25, 266c19800e8SDoug Rabson /* Checksum for the SAM-CHECKSUM field */ 267c19800e8SDoug Rabson KRB5_KU_SAM_ENC_TRACK_ID = 26, 268c19800e8SDoug Rabson /* Encryption of the SAM-TRACK-ID field */ 269c19800e8SDoug Rabson KRB5_KU_PA_SERVER_REFERRAL = 26, 270c19800e8SDoug Rabson /* Keyusage for the server referral in a TGS req */ 271c19800e8SDoug Rabson KRB5_KU_SAM_ENC_NONCE_SAD = 27, 272c19800e8SDoug Rabson /* Encryption of the SAM-NONCE-OR-SAD field */ 273ae771770SStanislav Sedov KRB5_KU_PA_PKINIT_KX = 44, 274ae771770SStanislav Sedov /* Encryption type of the kdc session contribution in pk-init */ 275ae771770SStanislav Sedov KRB5_KU_AS_REQ = 56, 276ae771770SStanislav Sedov /* Checksum of over the AS-REQ send by the KDC in PA-REQ-ENC-PA-REP */ 277c19800e8SDoug Rabson KRB5_KU_DIGEST_ENCRYPT = -18, 278c19800e8SDoug Rabson /* Encryption key usage used in the digest encryption field */ 279c19800e8SDoug Rabson KRB5_KU_DIGEST_OPAQUE = -19, 280c19800e8SDoug Rabson /* Checksum key usage used in the digest opaque field */ 281c19800e8SDoug Rabson KRB5_KU_KRB5SIGNEDPATH = -21, 282c19800e8SDoug Rabson /* Checksum key usage on KRB5SignedPath */ 283c19800e8SDoug Rabson KRB5_KU_CANONICALIZED_NAMES = -23 284c19800e8SDoug Rabson /* Checksum key usage on PA-CANONICALIZED */ 285b528cefcSMark Murray } krb5_key_usage; 286b528cefcSMark Murray 287adb0ddaeSAssar Westerlund typedef krb5_key_usage krb5_keyusage; 288adb0ddaeSAssar Westerlund 289b528cefcSMark Murray typedef enum krb5_salttype { 2905e9cd1aeSAssar Westerlund KRB5_PW_SALT = KRB5_PADATA_PW_SALT, 2915e9cd1aeSAssar Westerlund KRB5_AFS3_SALT = KRB5_PADATA_AFS3_SALT 292b528cefcSMark Murray }krb5_salttype; 293b528cefcSMark Murray 294b528cefcSMark Murray typedef struct krb5_salt { 295b528cefcSMark Murray krb5_salttype salttype; 296b528cefcSMark Murray krb5_data saltvalue; 297b528cefcSMark Murray } krb5_salt; 298b528cefcSMark Murray 299b528cefcSMark Murray typedef ETYPE_INFO krb5_preauthinfo; 300b528cefcSMark Murray 301b528cefcSMark Murray typedef struct { 302b528cefcSMark Murray krb5_preauthtype type; 303b528cefcSMark Murray krb5_preauthinfo info; /* list of preauthinfo for this type */ 304b528cefcSMark Murray } krb5_preauthdata_entry; 305b528cefcSMark Murray 306b528cefcSMark Murray typedef struct krb5_preauthdata { 307b528cefcSMark Murray unsigned len; 308b528cefcSMark Murray krb5_preauthdata_entry *val; 309b528cefcSMark Murray }krb5_preauthdata; 310b528cefcSMark Murray 311b528cefcSMark Murray typedef enum krb5_address_type { 312b528cefcSMark Murray KRB5_ADDRESS_INET = 2, 313c19800e8SDoug Rabson KRB5_ADDRESS_NETBIOS = 20, 314b528cefcSMark Murray KRB5_ADDRESS_INET6 = 24, 315b528cefcSMark Murray KRB5_ADDRESS_ADDRPORT = 256, 316b528cefcSMark Murray KRB5_ADDRESS_IPPORT = 257 317b528cefcSMark Murray } krb5_address_type; 318b528cefcSMark Murray 319b528cefcSMark Murray enum { 320b528cefcSMark Murray AP_OPTS_USE_SESSION_KEY = 1, 3210cadf2f4SJacques Vidrine AP_OPTS_MUTUAL_REQUIRED = 2, 3220cadf2f4SJacques Vidrine AP_OPTS_USE_SUBKEY = 4 /* library internal */ 323b528cefcSMark Murray }; 324b528cefcSMark Murray 325b528cefcSMark Murray typedef HostAddress krb5_address; 326b528cefcSMark Murray 327b528cefcSMark Murray typedef HostAddresses krb5_addresses; 328b528cefcSMark Murray 329ae771770SStanislav Sedov typedef krb5_enctype krb5_keytype; 330ae771770SStanislav Sedov 331ae771770SStanislav Sedov enum krb5_keytype_old { 332ae771770SStanislav Sedov KEYTYPE_NULL = ETYPE_NULL, 333ae771770SStanislav Sedov KEYTYPE_DES = ETYPE_DES_CBC_CRC, 334ae771770SStanislav Sedov KEYTYPE_DES3 = ETYPE_OLD_DES3_CBC_SHA1, 335ae771770SStanislav Sedov KEYTYPE_AES128 = ETYPE_AES128_CTS_HMAC_SHA1_96, 336ae771770SStanislav Sedov KEYTYPE_AES256 = ETYPE_AES256_CTS_HMAC_SHA1_96, 337ae771770SStanislav Sedov KEYTYPE_ARCFOUR = ETYPE_ARCFOUR_HMAC_MD5, 338ae771770SStanislav Sedov KEYTYPE_ARCFOUR_56 = ETYPE_ARCFOUR_HMAC_MD5_56 339ae771770SStanislav Sedov }; 340b528cefcSMark Murray 341b528cefcSMark Murray typedef EncryptionKey krb5_keyblock; 342b528cefcSMark Murray 343b528cefcSMark Murray typedef AP_REQ krb5_ap_req; 344b528cefcSMark Murray 345b528cefcSMark Murray struct krb5_cc_ops; 346b528cefcSMark Murray 347ae771770SStanislav Sedov #ifdef _WIN32 348ae771770SStanislav Sedov #define KRB5_USE_PATH_TOKENS 1 349ae771770SStanislav Sedov #endif 350ae771770SStanislav Sedov 351ae771770SStanislav Sedov #ifdef KRB5_USE_PATH_TOKENS 352ae771770SStanislav Sedov #define KRB5_DEFAULT_CCFILE_ROOT "%{TEMP}/krb5cc_" 353ae771770SStanislav Sedov #else 3545e9cd1aeSAssar Westerlund #define KRB5_DEFAULT_CCFILE_ROOT "/tmp/krb5cc_" 355ae771770SStanislav Sedov #endif 3565e9cd1aeSAssar Westerlund 3575e9cd1aeSAssar Westerlund #define KRB5_DEFAULT_CCROOT "FILE:" KRB5_DEFAULT_CCFILE_ROOT 3585e9cd1aeSAssar Westerlund 3595e9cd1aeSAssar Westerlund #define KRB5_ACCEPT_NULL_ADDRESSES(C) \ 3605e9cd1aeSAssar Westerlund krb5_config_get_bool_default((C), NULL, TRUE, \ 3615e9cd1aeSAssar Westerlund "libdefaults", "accept_null_addresses", \ 3625e9cd1aeSAssar Westerlund NULL) 363b528cefcSMark Murray 364b528cefcSMark Murray typedef void *krb5_cc_cursor; 365ae771770SStanislav Sedov typedef struct krb5_cccol_cursor_data *krb5_cccol_cursor; 366b528cefcSMark Murray 367b528cefcSMark Murray typedef struct krb5_ccache_data { 368b528cefcSMark Murray const struct krb5_cc_ops *ops; 369b528cefcSMark Murray krb5_data data; 370b528cefcSMark Murray }krb5_ccache_data; 371b528cefcSMark Murray 372b528cefcSMark Murray typedef struct krb5_ccache_data *krb5_ccache; 373b528cefcSMark Murray 374b528cefcSMark Murray typedef struct krb5_context_data *krb5_context; 375b528cefcSMark Murray 376b528cefcSMark Murray typedef Realm krb5_realm; 377b528cefcSMark Murray typedef const char *krb5_const_realm; /* stupid language */ 37813e3f4d6SMark Murray 37913e3f4d6SMark Murray #define krb5_realm_length(r) strlen(r) 38013e3f4d6SMark Murray #define krb5_realm_data(r) (r) 38113e3f4d6SMark Murray 382b528cefcSMark Murray typedef Principal krb5_principal_data; 383b528cefcSMark Murray typedef struct Principal *krb5_principal; 384b528cefcSMark Murray typedef const struct Principal *krb5_const_principal; 385ae771770SStanislav Sedov typedef struct Principals *krb5_principals; 386b528cefcSMark Murray 387b528cefcSMark Murray typedef time_t krb5_deltat; 388b528cefcSMark Murray typedef time_t krb5_timestamp; 389b528cefcSMark Murray 390b528cefcSMark Murray typedef struct krb5_times { 391b528cefcSMark Murray krb5_timestamp authtime; 392b528cefcSMark Murray krb5_timestamp starttime; 393b528cefcSMark Murray krb5_timestamp endtime; 394b528cefcSMark Murray krb5_timestamp renew_till; 395b528cefcSMark Murray } krb5_times; 396b528cefcSMark Murray 397b528cefcSMark Murray typedef union { 398b528cefcSMark Murray TicketFlags b; 399b528cefcSMark Murray krb5_flags i; 400b528cefcSMark Murray } krb5_ticket_flags; 401b528cefcSMark Murray 402b528cefcSMark Murray /* options for krb5_get_in_tkt() */ 403b528cefcSMark Murray #define KDC_OPT_FORWARDABLE (1 << 1) 404b528cefcSMark Murray #define KDC_OPT_FORWARDED (1 << 2) 405b528cefcSMark Murray #define KDC_OPT_PROXIABLE (1 << 3) 406b528cefcSMark Murray #define KDC_OPT_PROXY (1 << 4) 407b528cefcSMark Murray #define KDC_OPT_ALLOW_POSTDATE (1 << 5) 408b528cefcSMark Murray #define KDC_OPT_POSTDATED (1 << 6) 409b528cefcSMark Murray #define KDC_OPT_RENEWABLE (1 << 8) 410b528cefcSMark Murray #define KDC_OPT_REQUEST_ANONYMOUS (1 << 14) 411b528cefcSMark Murray #define KDC_OPT_DISABLE_TRANSITED_CHECK (1 << 26) 412b528cefcSMark Murray #define KDC_OPT_RENEWABLE_OK (1 << 27) 413b528cefcSMark Murray #define KDC_OPT_ENC_TKT_IN_SKEY (1 << 28) 414b528cefcSMark Murray #define KDC_OPT_RENEW (1 << 30) 415b528cefcSMark Murray #define KDC_OPT_VALIDATE (1 << 31) 416b528cefcSMark Murray 417b528cefcSMark Murray typedef union { 418b528cefcSMark Murray KDCOptions b; 419b528cefcSMark Murray krb5_flags i; 420b528cefcSMark Murray } krb5_kdc_flags; 421b528cefcSMark Murray 422b528cefcSMark Murray /* flags for krb5_verify_ap_req */ 423b528cefcSMark Murray 424b528cefcSMark Murray #define KRB5_VERIFY_AP_REQ_IGNORE_INVALID (1 << 0) 425b528cefcSMark Murray 4264137ff4cSJacques Vidrine #define KRB5_GC_CACHED (1U << 0) 4274137ff4cSJacques Vidrine #define KRB5_GC_USER_USER (1U << 1) 428c19800e8SDoug Rabson #define KRB5_GC_EXPIRED_OK (1U << 2) 429c19800e8SDoug Rabson #define KRB5_GC_NO_STORE (1U << 3) 430c19800e8SDoug Rabson #define KRB5_GC_FORWARDABLE (1U << 4) 431c19800e8SDoug Rabson #define KRB5_GC_NO_TRANSIT_CHECK (1U << 5) 432c19800e8SDoug Rabson #define KRB5_GC_CONSTRAINED_DELEGATION (1U << 6) 433ae771770SStanislav Sedov #define KRB5_GC_CANONICALIZE (1U << 7) 434b528cefcSMark Murray 435b528cefcSMark Murray /* constants for compare_creds (and cc_retrieve_cred) */ 436b528cefcSMark Murray #define KRB5_TC_DONT_MATCH_REALM (1U << 31) 437b528cefcSMark Murray #define KRB5_TC_MATCH_KEYTYPE (1U << 30) 438c19800e8SDoug Rabson #define KRB5_TC_MATCH_KTYPE KRB5_TC_MATCH_KEYTYPE /* MIT name */ 439c19800e8SDoug Rabson #define KRB5_TC_MATCH_SRV_NAMEONLY (1 << 29) 440c19800e8SDoug Rabson #define KRB5_TC_MATCH_FLAGS_EXACT (1 << 28) 441c19800e8SDoug Rabson #define KRB5_TC_MATCH_FLAGS (1 << 27) 442c19800e8SDoug Rabson #define KRB5_TC_MATCH_TIMES_EXACT (1 << 26) 443c19800e8SDoug Rabson #define KRB5_TC_MATCH_TIMES (1 << 25) 444c19800e8SDoug Rabson #define KRB5_TC_MATCH_AUTHDATA (1 << 24) 445c19800e8SDoug Rabson #define KRB5_TC_MATCH_2ND_TKT (1 << 23) 446c19800e8SDoug Rabson #define KRB5_TC_MATCH_IS_SKEY (1 << 22) 447b528cefcSMark Murray 448ae771770SStanislav Sedov /* constants for get_flags and set_flags */ 449ae771770SStanislav Sedov #define KRB5_TC_OPENCLOSE 0x00000001 450ae771770SStanislav Sedov #define KRB5_TC_NOTICKET 0x00000002 451ae771770SStanislav Sedov 452b528cefcSMark Murray typedef AuthorizationData krb5_authdata; 453b528cefcSMark Murray 454b528cefcSMark Murray typedef KRB_ERROR krb5_error; 455b528cefcSMark Murray 456b528cefcSMark Murray typedef struct krb5_creds { 457b528cefcSMark Murray krb5_principal client; 458b528cefcSMark Murray krb5_principal server; 459b528cefcSMark Murray krb5_keyblock session; 460b528cefcSMark Murray krb5_times times; 461b528cefcSMark Murray krb5_data ticket; 462b528cefcSMark Murray krb5_data second_ticket; 463b528cefcSMark Murray krb5_authdata authdata; 464b528cefcSMark Murray krb5_addresses addresses; 465b528cefcSMark Murray krb5_ticket_flags flags; 466b528cefcSMark Murray } krb5_creds; 467b528cefcSMark Murray 468c19800e8SDoug Rabson typedef struct krb5_cc_cache_cursor_data *krb5_cc_cache_cursor; 469c19800e8SDoug Rabson 470ae771770SStanislav Sedov #define KRB5_CC_OPS_VERSION 3 471ae771770SStanislav Sedov 472b528cefcSMark Murray typedef struct krb5_cc_ops { 473ae771770SStanislav Sedov int version; 4748373020dSJacques Vidrine const char *prefix; 475ae771770SStanislav Sedov const char* (KRB5_CALLCONV * get_name)(krb5_context, krb5_ccache); 476ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * resolve)(krb5_context, krb5_ccache *, const char *); 477ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * gen_new)(krb5_context, krb5_ccache *); 478ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * init)(krb5_context, krb5_ccache, krb5_principal); 479ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * destroy)(krb5_context, krb5_ccache); 480ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * close)(krb5_context, krb5_ccache); 481ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * store)(krb5_context, krb5_ccache, krb5_creds*); 482ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * retrieve)(krb5_context, krb5_ccache, 483c19800e8SDoug Rabson krb5_flags, const krb5_creds*, krb5_creds *); 484ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_princ)(krb5_context, krb5_ccache, krb5_principal*); 485ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_first)(krb5_context, krb5_ccache, krb5_cc_cursor *); 486ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_next)(krb5_context, krb5_ccache, 487b528cefcSMark Murray krb5_cc_cursor*, krb5_creds*); 488ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * end_get)(krb5_context, krb5_ccache, krb5_cc_cursor*); 489ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * remove_cred)(krb5_context, krb5_ccache, 490b528cefcSMark Murray krb5_flags, krb5_creds*); 491ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * set_flags)(krb5_context, krb5_ccache, krb5_flags); 492ae771770SStanislav Sedov int (KRB5_CALLCONV * get_version)(krb5_context, krb5_ccache); 493ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_cache_first)(krb5_context, krb5_cc_cursor *); 494ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_cache_next)(krb5_context, krb5_cc_cursor, 495ae771770SStanislav Sedov krb5_ccache *); 496ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * end_cache_get)(krb5_context, krb5_cc_cursor); 497ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * move)(krb5_context, krb5_ccache, krb5_ccache); 498ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_default_name)(krb5_context, char **); 499ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * set_default)(krb5_context, krb5_ccache); 500ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * lastchange)(krb5_context, krb5_ccache, krb5_timestamp *); 501ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * set_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat); 502ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_kdc_offset)(krb5_context, krb5_ccache, krb5_deltat *); 503b528cefcSMark Murray } krb5_cc_ops; 504b528cefcSMark Murray 505b528cefcSMark Murray struct krb5_log_facility; 506b528cefcSMark Murray 507b528cefcSMark Murray struct krb5_config_binding { 508b528cefcSMark Murray enum { krb5_config_string, krb5_config_list } type; 509b528cefcSMark Murray char *name; 510b528cefcSMark Murray struct krb5_config_binding *next; 511b528cefcSMark Murray union { 512b528cefcSMark Murray char *string; 513b528cefcSMark Murray struct krb5_config_binding *list; 514b528cefcSMark Murray void *generic; 515b528cefcSMark Murray } u; 516b528cefcSMark Murray }; 517b528cefcSMark Murray 518b528cefcSMark Murray typedef struct krb5_config_binding krb5_config_binding; 519b528cefcSMark Murray 520b528cefcSMark Murray typedef krb5_config_binding krb5_config_section; 521b528cefcSMark Murray 522b528cefcSMark Murray typedef struct krb5_ticket { 523b528cefcSMark Murray EncTicketPart ticket; 524b528cefcSMark Murray krb5_principal client; 525b528cefcSMark Murray krb5_principal server; 526b528cefcSMark Murray } krb5_ticket; 527b528cefcSMark Murray 528b528cefcSMark Murray typedef Authenticator krb5_authenticator_data; 529b528cefcSMark Murray 530b528cefcSMark Murray typedef krb5_authenticator_data *krb5_authenticator; 531b528cefcSMark Murray 532b528cefcSMark Murray struct krb5_rcache_data; 533b528cefcSMark Murray typedef struct krb5_rcache_data *krb5_rcache; 5345e9cd1aeSAssar Westerlund typedef Authenticator krb5_donot_replay; 535b528cefcSMark Murray 536adb0ddaeSAssar Westerlund #define KRB5_STORAGE_HOST_BYTEORDER 0x01 /* old */ 537b528cefcSMark Murray #define KRB5_STORAGE_PRINCIPAL_WRONG_NUM_COMPONENTS 0x02 538b528cefcSMark Murray #define KRB5_STORAGE_PRINCIPAL_NO_NAME_TYPE 0x04 539b528cefcSMark Murray #define KRB5_STORAGE_KEYBLOCK_KEYTYPE_TWICE 0x08 540adb0ddaeSAssar Westerlund #define KRB5_STORAGE_BYTEORDER_MASK 0x60 541adb0ddaeSAssar Westerlund #define KRB5_STORAGE_BYTEORDER_BE 0x00 /* default */ 542adb0ddaeSAssar Westerlund #define KRB5_STORAGE_BYTEORDER_LE 0x20 543adb0ddaeSAssar Westerlund #define KRB5_STORAGE_BYTEORDER_HOST 0x40 544c19800e8SDoug Rabson #define KRB5_STORAGE_CREDS_FLAGS_WRONG_BITORDER 0x80 545b528cefcSMark Murray 5468373020dSJacques Vidrine struct krb5_storage_data; 5478373020dSJacques Vidrine typedef struct krb5_storage_data krb5_storage; 548b528cefcSMark Murray 549b528cefcSMark Murray typedef struct krb5_keytab_entry { 550b528cefcSMark Murray krb5_principal principal; 551b528cefcSMark Murray krb5_kvno vno; 552b528cefcSMark Murray krb5_keyblock keyblock; 553c19800e8SDoug Rabson uint32_t timestamp; 554ae771770SStanislav Sedov uint32_t flags; 555ae771770SStanislav Sedov krb5_principals aliases; 556b528cefcSMark Murray } krb5_keytab_entry; 557b528cefcSMark Murray 558b528cefcSMark Murray typedef struct krb5_kt_cursor { 559b528cefcSMark Murray int fd; 560b528cefcSMark Murray krb5_storage *sp; 561b528cefcSMark Murray void *data; 562b528cefcSMark Murray } krb5_kt_cursor; 563b528cefcSMark Murray 564b528cefcSMark Murray struct krb5_keytab_data; 565b528cefcSMark Murray 566b528cefcSMark Murray typedef struct krb5_keytab_data *krb5_keytab; 567b528cefcSMark Murray 568bbd80c28SJacques Vidrine #define KRB5_KT_PREFIX_MAX_LEN 30 569bbd80c28SJacques Vidrine 570b528cefcSMark Murray struct krb5_keytab_data { 5718373020dSJacques Vidrine const char *prefix; 572ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * resolve)(krb5_context, const char*, krb5_keytab); 573ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get_name)(krb5_context, krb5_keytab, char*, size_t); 574ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * close)(krb5_context, krb5_keytab); 575ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * destroy)(krb5_context, krb5_keytab); 576ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * get)(krb5_context, krb5_keytab, krb5_const_principal, 577b528cefcSMark Murray krb5_kvno, krb5_enctype, krb5_keytab_entry*); 578ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * start_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); 579ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * next_entry)(krb5_context, krb5_keytab, 580b528cefcSMark Murray krb5_keytab_entry*, krb5_kt_cursor*); 581ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * end_seq_get)(krb5_context, krb5_keytab, krb5_kt_cursor*); 582ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * add)(krb5_context, krb5_keytab, krb5_keytab_entry*); 583ae771770SStanislav Sedov krb5_error_code (KRB5_CALLCONV * remove)(krb5_context, krb5_keytab, krb5_keytab_entry*); 584b528cefcSMark Murray void *data; 585b528cefcSMark Murray int32_t version; 586b528cefcSMark Murray }; 587b528cefcSMark Murray 588b528cefcSMark Murray typedef struct krb5_keytab_data krb5_kt_ops; 589b528cefcSMark Murray 590b528cefcSMark Murray struct krb5_keytab_key_proc_args { 591b528cefcSMark Murray krb5_keytab keytab; 592b528cefcSMark Murray krb5_principal principal; 593b528cefcSMark Murray }; 594b528cefcSMark Murray 595b528cefcSMark Murray typedef struct krb5_keytab_key_proc_args krb5_keytab_key_proc_args; 596b528cefcSMark Murray 5975e9cd1aeSAssar Westerlund typedef struct krb5_replay_data { 5985e9cd1aeSAssar Westerlund krb5_timestamp timestamp; 599c19800e8SDoug Rabson int32_t usec; 600c19800e8SDoug Rabson uint32_t seq; 6015e9cd1aeSAssar Westerlund } krb5_replay_data; 6025e9cd1aeSAssar Westerlund 6035e9cd1aeSAssar Westerlund /* flags for krb5_auth_con_setflags */ 604b528cefcSMark Murray enum { 605b528cefcSMark Murray KRB5_AUTH_CONTEXT_DO_TIME = 1, 606b528cefcSMark Murray KRB5_AUTH_CONTEXT_RET_TIME = 2, 607b528cefcSMark Murray KRB5_AUTH_CONTEXT_DO_SEQUENCE = 4, 6085e9cd1aeSAssar Westerlund KRB5_AUTH_CONTEXT_RET_SEQUENCE = 8, 609c19800e8SDoug Rabson KRB5_AUTH_CONTEXT_PERMIT_ALL = 16, 610c19800e8SDoug Rabson KRB5_AUTH_CONTEXT_USE_SUBKEY = 32, 611c19800e8SDoug Rabson KRB5_AUTH_CONTEXT_CLEAR_FORWARDED_CRED = 64 6125e9cd1aeSAssar Westerlund }; 6135e9cd1aeSAssar Westerlund 6145e9cd1aeSAssar Westerlund /* flags for krb5_auth_con_genaddrs */ 6155e9cd1aeSAssar Westerlund enum { 6165e9cd1aeSAssar Westerlund KRB5_AUTH_CONTEXT_GENERATE_LOCAL_ADDR = 1, 6175e9cd1aeSAssar Westerlund KRB5_AUTH_CONTEXT_GENERATE_LOCAL_FULL_ADDR = 3, 6185e9cd1aeSAssar Westerlund KRB5_AUTH_CONTEXT_GENERATE_REMOTE_ADDR = 4, 6195e9cd1aeSAssar Westerlund KRB5_AUTH_CONTEXT_GENERATE_REMOTE_FULL_ADDR = 12 620b528cefcSMark Murray }; 621b528cefcSMark Murray 622b528cefcSMark Murray typedef struct krb5_auth_context_data { 623b528cefcSMark Murray unsigned int flags; 624b528cefcSMark Murray 625b528cefcSMark Murray krb5_address *local_address; 626b528cefcSMark Murray krb5_address *remote_address; 627b528cefcSMark Murray int16_t local_port; 628b528cefcSMark Murray int16_t remote_port; 629b528cefcSMark Murray krb5_keyblock *keyblock; 630b528cefcSMark Murray krb5_keyblock *local_subkey; 631b528cefcSMark Murray krb5_keyblock *remote_subkey; 632b528cefcSMark Murray 633c19800e8SDoug Rabson uint32_t local_seqnumber; 634c19800e8SDoug Rabson uint32_t remote_seqnumber; 635b528cefcSMark Murray 636b528cefcSMark Murray krb5_authenticator authenticator; 637b528cefcSMark Murray 638b528cefcSMark Murray krb5_pointer i_vector; 639b528cefcSMark Murray 640b528cefcSMark Murray krb5_rcache rcache; 641b528cefcSMark Murray 642ae771770SStanislav Sedov krb5_keytype keytype; /* ¿requested key type ? */ 643ae771770SStanislav Sedov krb5_cksumtype cksumtype; /* ¡requested checksum type! */ 644b528cefcSMark Murray 645b528cefcSMark Murray }krb5_auth_context_data, *krb5_auth_context; 646b528cefcSMark Murray 647b528cefcSMark Murray typedef struct { 648b528cefcSMark Murray KDC_REP kdc_rep; 649b528cefcSMark Murray EncKDCRepPart enc_part; 650b528cefcSMark Murray KRB_ERROR error; 651b528cefcSMark Murray } krb5_kdc_rep; 652b528cefcSMark Murray 6535e9cd1aeSAssar Westerlund extern const char *heimdal_version, *heimdal_long_version; 654b528cefcSMark Murray 655ae771770SStanislav Sedov typedef void (KRB5_CALLCONV * krb5_log_log_func_t)(const char*, const char*, void*); 656ae771770SStanislav Sedov typedef void (KRB5_CALLCONV * krb5_log_close_func_t)(void*); 657b528cefcSMark Murray 658b528cefcSMark Murray typedef struct krb5_log_facility { 659c19800e8SDoug Rabson char *program; 660b528cefcSMark Murray int len; 661b528cefcSMark Murray struct facility *val; 662b528cefcSMark Murray } krb5_log_facility; 663b528cefcSMark Murray 664b528cefcSMark Murray typedef EncAPRepPart krb5_ap_rep_enc_part; 665b528cefcSMark Murray 666b528cefcSMark Murray #define KRB5_RECVAUTH_IGNORE_VERSION 1 667b528cefcSMark Murray 668b528cefcSMark Murray #define KRB5_SENDAUTH_VERSION "KRB5_SENDAUTH_V1.0" 669b528cefcSMark Murray 670b528cefcSMark Murray #define KRB5_TGS_NAME_SIZE (6) 671b528cefcSMark Murray #define KRB5_TGS_NAME ("krbtgt") 672ae771770SStanislav Sedov #define KRB5_WELLKNOWN_NAME ("WELLKNOWN") 673ae771770SStanislav Sedov #define KRB5_ANON_NAME ("ANONYMOUS") 674c19800e8SDoug Rabson #define KRB5_DIGEST_NAME ("digest") 675c19800e8SDoug Rabson 676adb0ddaeSAssar Westerlund typedef enum { 677adb0ddaeSAssar Westerlund KRB5_PROMPT_TYPE_PASSWORD = 0x1, 678adb0ddaeSAssar Westerlund KRB5_PROMPT_TYPE_NEW_PASSWORD = 0x2, 679adb0ddaeSAssar Westerlund KRB5_PROMPT_TYPE_NEW_PASSWORD_AGAIN = 0x3, 680c19800e8SDoug Rabson KRB5_PROMPT_TYPE_PREAUTH = 0x4, 681c19800e8SDoug Rabson KRB5_PROMPT_TYPE_INFO = 0x5 682adb0ddaeSAssar Westerlund } krb5_prompt_type; 683adb0ddaeSAssar Westerlund 684b528cefcSMark Murray typedef struct _krb5_prompt { 6858373020dSJacques Vidrine const char *prompt; 686b528cefcSMark Murray int hidden; 687b528cefcSMark Murray krb5_data *reply; 688adb0ddaeSAssar Westerlund krb5_prompt_type type; 689b528cefcSMark Murray } krb5_prompt; 690b528cefcSMark Murray 691ae771770SStanislav Sedov typedef int (KRB5_CALLCONV * krb5_prompter_fct)(krb5_context /*context*/, 692c19800e8SDoug Rabson void * /*data*/, 693c19800e8SDoug Rabson const char * /*name*/, 694c19800e8SDoug Rabson const char * /*banner*/, 695c19800e8SDoug Rabson int /*num_prompts*/, 696c19800e8SDoug Rabson krb5_prompt /*prompts*/[]); 697ae771770SStanislav Sedov typedef krb5_error_code (KRB5_CALLCONV * krb5_key_proc)(krb5_context /*context*/, 698c19800e8SDoug Rabson krb5_enctype /*type*/, 699c19800e8SDoug Rabson krb5_salt /*salt*/, 700c19800e8SDoug Rabson krb5_const_pointer /*keyseed*/, 701c19800e8SDoug Rabson krb5_keyblock ** /*key*/); 702ae771770SStanislav Sedov typedef krb5_error_code (KRB5_CALLCONV * krb5_decrypt_proc)(krb5_context /*context*/, 703c19800e8SDoug Rabson krb5_keyblock * /*key*/, 704c19800e8SDoug Rabson krb5_key_usage /*usage*/, 705c19800e8SDoug Rabson krb5_const_pointer /*decrypt_arg*/, 706c19800e8SDoug Rabson krb5_kdc_rep * /*dec_rep*/); 707ae771770SStanislav Sedov typedef krb5_error_code (KRB5_CALLCONV * krb5_s2k_proc)(krb5_context /*context*/, 708c19800e8SDoug Rabson krb5_enctype /*type*/, 709c19800e8SDoug Rabson krb5_const_pointer /*keyseed*/, 710c19800e8SDoug Rabson krb5_salt /*salt*/, 711c19800e8SDoug Rabson krb5_data * /*s2kparms*/, 712c19800e8SDoug Rabson krb5_keyblock ** /*key*/); 713b528cefcSMark Murray 714c19800e8SDoug Rabson struct _krb5_get_init_creds_opt_private; 715b528cefcSMark Murray 716ae771770SStanislav Sedov struct _krb5_get_init_creds_opt { 717b528cefcSMark Murray krb5_flags flags; 718b528cefcSMark Murray krb5_deltat tkt_life; 719b528cefcSMark Murray krb5_deltat renew_life; 720b528cefcSMark Murray int forwardable; 721b528cefcSMark Murray int proxiable; 7225e9cd1aeSAssar Westerlund int anonymous; 723b528cefcSMark Murray krb5_enctype *etype_list; 724b528cefcSMark Murray int etype_list_length; 725b528cefcSMark Murray krb5_addresses *address_list; 726b528cefcSMark Murray /* XXX the next three should not be used, as they may be 727b528cefcSMark Murray removed later */ 728b528cefcSMark Murray krb5_preauthtype *preauth_list; 729b528cefcSMark Murray int preauth_list_length; 730b528cefcSMark Murray krb5_data *salt; 731c19800e8SDoug Rabson struct _krb5_get_init_creds_opt_private *opt_private; 732ae771770SStanislav Sedov }; 733ae771770SStanislav Sedov 734ae771770SStanislav Sedov typedef struct _krb5_get_init_creds_opt krb5_get_init_creds_opt; 735b528cefcSMark Murray 736b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_TKT_LIFE 0x0001 737b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE 0x0002 738b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_FORWARDABLE 0x0004 739b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_PROXIABLE 0x0008 740b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_ETYPE_LIST 0x0010 741b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_ADDRESS_LIST 0x0020 742b528cefcSMark Murray #define KRB5_GET_INIT_CREDS_OPT_PREAUTH_LIST 0x0040 743ae771770SStanislav Sedov #define KRB5_GET_INIT_CREDS_OPT_SALT 0x0080 /* no supported */ 7445e9cd1aeSAssar Westerlund #define KRB5_GET_INIT_CREDS_OPT_ANONYMOUS 0x0100 745c19800e8SDoug Rabson #define KRB5_GET_INIT_CREDS_OPT_DISABLE_TRANSITED_CHECK 0x0200 746b528cefcSMark Murray 747ae771770SStanislav Sedov /* krb5_init_creds_step flags argument */ 748ae771770SStanislav Sedov #define KRB5_INIT_CREDS_STEP_FLAG_CONTINUE 0x0001 749ae771770SStanislav Sedov 750b528cefcSMark Murray typedef struct _krb5_verify_init_creds_opt { 751b528cefcSMark Murray krb5_flags flags; 752b528cefcSMark Murray int ap_req_nofail; 753b528cefcSMark Murray } krb5_verify_init_creds_opt; 754b528cefcSMark Murray 755b528cefcSMark Murray #define KRB5_VERIFY_INIT_CREDS_OPT_AP_REQ_NOFAIL 0x0001 756b528cefcSMark Murray 757adb0ddaeSAssar Westerlund typedef struct krb5_verify_opt { 758adb0ddaeSAssar Westerlund unsigned int flags; 759adb0ddaeSAssar Westerlund krb5_ccache ccache; 760adb0ddaeSAssar Westerlund krb5_keytab keytab; 761adb0ddaeSAssar Westerlund krb5_boolean secure; 762adb0ddaeSAssar Westerlund const char *service; 763adb0ddaeSAssar Westerlund } krb5_verify_opt; 764adb0ddaeSAssar Westerlund 765adb0ddaeSAssar Westerlund #define KRB5_VERIFY_LREALMS 1 7664137ff4cSJacques Vidrine #define KRB5_VERIFY_NO_ADDRESSES 2 767adb0ddaeSAssar Westerlund 7688d4ba808SJacques Vidrine #define KRB5_KPASSWD_VERS_CHANGEPW 1 7698d4ba808SJacques Vidrine #define KRB5_KPASSWD_VERS_SETPW 0xff80 7708d4ba808SJacques Vidrine 771b528cefcSMark Murray #define KRB5_KPASSWD_SUCCESS 0 7724137ff4cSJacques Vidrine #define KRB5_KPASSWD_MALFORMED 1 7734137ff4cSJacques Vidrine #define KRB5_KPASSWD_HARDERROR 2 7744137ff4cSJacques Vidrine #define KRB5_KPASSWD_AUTHERROR 3 7754137ff4cSJacques Vidrine #define KRB5_KPASSWD_SOFTERROR 4 7768d4ba808SJacques Vidrine #define KRB5_KPASSWD_ACCESSDENIED 5 7778d4ba808SJacques Vidrine #define KRB5_KPASSWD_BAD_VERSION 6 7788d4ba808SJacques Vidrine #define KRB5_KPASSWD_INITIAL_FLAG_NEEDED 7 779b528cefcSMark Murray 780b528cefcSMark Murray #define KPASSWD_PORT 464 781b528cefcSMark Murray 7824137ff4cSJacques Vidrine /* types for the new krbhst interface */ 7834137ff4cSJacques Vidrine struct krb5_krbhst_data; 7844137ff4cSJacques Vidrine typedef struct krb5_krbhst_data *krb5_krbhst_handle; 7854137ff4cSJacques Vidrine 7864137ff4cSJacques Vidrine #define KRB5_KRBHST_KDC 1 7874137ff4cSJacques Vidrine #define KRB5_KRBHST_ADMIN 2 7884137ff4cSJacques Vidrine #define KRB5_KRBHST_CHANGEPW 3 7894137ff4cSJacques Vidrine #define KRB5_KRBHST_KRB524 4 790c19800e8SDoug Rabson #define KRB5_KRBHST_KCA 5 7914137ff4cSJacques Vidrine 7924137ff4cSJacques Vidrine typedef struct krb5_krbhst_info { 7934137ff4cSJacques Vidrine enum { KRB5_KRBHST_UDP, 7944137ff4cSJacques Vidrine KRB5_KRBHST_TCP, 7954137ff4cSJacques Vidrine KRB5_KRBHST_HTTP } proto; 7964137ff4cSJacques Vidrine unsigned short port; 7974137ff4cSJacques Vidrine unsigned short def_port; 7984137ff4cSJacques Vidrine struct addrinfo *ai; 7994137ff4cSJacques Vidrine struct krb5_krbhst_info *next; 8004137ff4cSJacques Vidrine char hostname[1]; /* has to come last */ 8014137ff4cSJacques Vidrine } krb5_krbhst_info; 8024137ff4cSJacques Vidrine 803c19800e8SDoug Rabson /* flags for krb5_krbhst_init_flags (and krb5_send_to_kdc_flags) */ 804c19800e8SDoug Rabson enum { 805c19800e8SDoug Rabson KRB5_KRBHST_FLAGS_MASTER = 1, 806c19800e8SDoug Rabson KRB5_KRBHST_FLAGS_LARGE_MSG = 2 807c19800e8SDoug Rabson }; 808c19800e8SDoug Rabson 809ae771770SStanislav Sedov typedef krb5_error_code 810ae771770SStanislav Sedov (KRB5_CALLCONV * krb5_send_to_kdc_func)(krb5_context, void *, krb5_krbhst_info *, time_t, 811ae771770SStanislav Sedov const krb5_data *, krb5_data *); 812c19800e8SDoug Rabson 813ae771770SStanislav Sedov /** flags for krb5_parse_name_flags */ 814c19800e8SDoug Rabson enum { 815ae771770SStanislav Sedov KRB5_PRINCIPAL_PARSE_NO_REALM = 1, /**< Require that there are no realm */ 816ae771770SStanislav Sedov KRB5_PRINCIPAL_PARSE_REQUIRE_REALM = 2, /**< Require a realm present */ 817ae771770SStanislav Sedov KRB5_PRINCIPAL_PARSE_ENTERPRISE = 4 /**< Parse as a NT-ENTERPRISE name */ 818c19800e8SDoug Rabson }; 819c19800e8SDoug Rabson 820ae771770SStanislav Sedov /** flags for krb5_unparse_name_flags */ 821c19800e8SDoug Rabson enum { 822ae771770SStanislav Sedov KRB5_PRINCIPAL_UNPARSE_SHORT = 1, /**< No realm if it is the default realm */ 823ae771770SStanislav Sedov KRB5_PRINCIPAL_UNPARSE_NO_REALM = 2, /**< No realm */ 824ae771770SStanislav Sedov KRB5_PRINCIPAL_UNPARSE_DISPLAY = 4 /**< No quoting */ 825c19800e8SDoug Rabson }; 826c19800e8SDoug Rabson 827c19800e8SDoug Rabson typedef struct krb5_sendto_ctx_data *krb5_sendto_ctx; 828c19800e8SDoug Rabson 829c19800e8SDoug Rabson #define KRB5_SENDTO_DONE 0 830c19800e8SDoug Rabson #define KRB5_SENDTO_RESTART 1 831c19800e8SDoug Rabson #define KRB5_SENDTO_CONTINUE 2 832c19800e8SDoug Rabson 833ae771770SStanislav Sedov typedef krb5_error_code 834ae771770SStanislav Sedov (KRB5_CALLCONV * krb5_sendto_ctx_func)(krb5_context, krb5_sendto_ctx, void *, 835ae771770SStanislav Sedov const krb5_data *, int *); 836c19800e8SDoug Rabson 837c19800e8SDoug Rabson struct krb5_plugin; 838c19800e8SDoug Rabson enum krb5_plugin_type { 839c19800e8SDoug Rabson PLUGIN_TYPE_DATA = 1, 840c19800e8SDoug Rabson PLUGIN_TYPE_FUNC 841c19800e8SDoug Rabson }; 8424137ff4cSJacques Vidrine 843b528cefcSMark Murray struct credentials; /* this is to keep the compiler happy */ 844b528cefcSMark Murray struct getargs; 845b528cefcSMark Murray struct sockaddr; 846b528cefcSMark Murray 847ae771770SStanislav Sedov /** 848ae771770SStanislav Sedov * Semi private, not stable yet 849ae771770SStanislav Sedov */ 850ae771770SStanislav Sedov 851ae771770SStanislav Sedov typedef struct krb5_crypto_iov { 852ae771770SStanislav Sedov unsigned int flags; 853ae771770SStanislav Sedov /* ignored */ 854ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_EMPTY 0 855ae771770SStanislav Sedov /* OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_HEADER) */ 856ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_HEADER 1 857ae771770SStanislav Sedov /* IN and OUT */ 858ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_DATA 2 859ae771770SStanislav Sedov /* IN */ 860ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_SIGN_ONLY 3 861ae771770SStanislav Sedov /* (only for encryption) OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_TRAILER) */ 862ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_PADDING 4 863ae771770SStanislav Sedov /* OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_TRAILER) */ 864ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_TRAILER 5 865ae771770SStanislav Sedov /* OUT krb5_crypto_length(KRB5_CRYPTO_TYPE_CHECKSUM) */ 866ae771770SStanislav Sedov #define KRB5_CRYPTO_TYPE_CHECKSUM 6 867ae771770SStanislav Sedov krb5_data data; 868ae771770SStanislav Sedov } krb5_crypto_iov; 869ae771770SStanislav Sedov 870ae771770SStanislav Sedov 871ae771770SStanislav Sedov /* Glue for MIT */ 872ae771770SStanislav Sedov 873ae771770SStanislav Sedov typedef struct { 874ae771770SStanislav Sedov int32_t lr_type; 875ae771770SStanislav Sedov krb5_timestamp value; 876ae771770SStanislav Sedov } krb5_last_req_entry; 877ae771770SStanislav Sedov 878ae771770SStanislav Sedov typedef krb5_error_code 879ae771770SStanislav Sedov (KRB5_CALLCONV * krb5_gic_process_last_req)(krb5_context, krb5_last_req_entry **, void *); 880ae771770SStanislav Sedov 881ae771770SStanislav Sedov /* 882ae771770SStanislav Sedov * 883ae771770SStanislav Sedov */ 884ae771770SStanislav Sedov 885ae771770SStanislav Sedov struct hx509_certs_data; 886ae771770SStanislav Sedov 887b528cefcSMark Murray #include <krb5-protos.h> 888b528cefcSMark Murray 889ae771770SStanislav Sedov /* variables */ 890ae771770SStanislav Sedov 891ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_config_file; 892ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_defkeyname; 893ae771770SStanislav Sedov 894ae771770SStanislav Sedov 895ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_acc_ops; 896ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_fcc_ops; 897ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_mcc_ops; 898ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_kcm_ops; 899ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_akcm_ops; 900ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_cc_ops krb5_scc_ops; 901ae771770SStanislav Sedov 902ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_fkt_ops; 903ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_wrfkt_ops; 904ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_javakt_ops; 905ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_mkt_ops; 906ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_akf_ops; 907ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const krb5_kt_ops krb5_any_ops; 908ae771770SStanislav Sedov 909ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_cc_type_api; 910ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_cc_type_file; 911ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_cc_type_memory; 912ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_cc_type_kcm; 913ae771770SStanislav Sedov extern KRB5_LIB_VARIABLE const char *krb5_cc_type_scc; 914ae771770SStanislav Sedov 915b528cefcSMark Murray #endif /* __KRB5_H__ */ 916b528cefcSMark Murray 917*ed549cb0SCy Schubert /* clang analyzer workarounds */ 918*ed549cb0SCy Schubert 919*ed549cb0SCy Schubert #ifdef __clang_analyzer__ 920*ed549cb0SCy Schubert /* 921*ed549cb0SCy Schubert * The clang analyzer (lint) can't know that krb5_enomem() always returns 922*ed549cb0SCy Schubert * non-zero, so code like: 923*ed549cb0SCy Schubert * 924*ed549cb0SCy Schubert * if ((x = malloc(...)) == NULL) 925*ed549cb0SCy Schubert * ret = krb5_enomem(context) 926*ed549cb0SCy Schubert * if (ret == 0) 927*ed549cb0SCy Schubert * *x = ...; 928*ed549cb0SCy Schubert * 929*ed549cb0SCy Schubert * causes false positives. 930*ed549cb0SCy Schubert * 931*ed549cb0SCy Schubert * The fix is to make krb5_enomem() a macro that always evaluates to ENOMEM. 932*ed549cb0SCy Schubert */ 933*ed549cb0SCy Schubert #define krb5_enomem(c) (krb5_enomem(c), ENOMEM) 934*ed549cb0SCy Schubert #endif 935*ed549cb0SCy Schubert 936