| 1 | /* Generated from krb5.asn1 */ |
| 2 | /* Do not edit */ |
| 3 | |
| 4 | #ifndef __krb5_asn1_h__ |
| 5 | #define __krb5_asn1_h__ |
| 6 | |
| 7 | #include <stddef.h> |
| 8 | #include <time.h> |
| 9 | |
| 10 | #ifndef __asn1_common_definitions__ |
| 11 | #define __asn1_common_definitions__ |
| 12 | |
| 13 | #ifndef __HEIM_BASE_DATA__ |
| 14 | #define __HEIM_BASE_DATA__ 1 |
| 15 | struct heim_base_data { |
| 16 | size_t length; |
| 17 | void *data; |
| 18 | }; |
| 19 | typedef struct heim_base_data heim_octet_string; |
| 20 | #endif |
| 21 | |
| 22 | typedef struct heim_integer { |
| 23 | size_t length; |
| 24 | void *data; |
| 25 | int negative; |
| 26 | } heim_integer; |
| 27 | |
| 28 | typedef char *heim_general_string; |
| 29 | |
| 30 | typedef char *heim_utf8_string; |
| 31 | |
| 32 | typedef struct heim_base_data heim_printable_string; |
| 33 | |
| 34 | typedef struct heim_base_data heim_ia5_string; |
| 35 | |
| 36 | typedef struct heim_bmp_string { |
| 37 | size_t length; |
| 38 | uint16_t *data; |
| 39 | } heim_bmp_string; |
| 40 | |
| 41 | typedef struct heim_universal_string { |
| 42 | size_t length; |
| 43 | uint32_t *data; |
| 44 | } heim_universal_string; |
| 45 | |
| 46 | typedef char *heim_visible_string; |
| 47 | |
| 48 | typedef struct heim_oid { |
| 49 | size_t length; |
| 50 | unsigned *components; |
| 51 | } heim_oid; |
| 52 | |
| 53 | typedef struct heim_bit_string { |
| 54 | size_t length; |
| 55 | void *data; |
| 56 | } heim_bit_string; |
| 57 | |
| 58 | typedef struct heim_base_data heim_any; |
| 59 | typedef struct heim_base_data heim_any_set; |
| 60 | |
| 61 | #define ASN1_MALLOC_ENCODE(T, B, BL, S, L, R) \ |
| 62 | do { \ |
| 63 | (BL) = length_##T((S)); \ |
| 64 | (B) = malloc((BL)); \ |
| 65 | if((B) == NULL) { \ |
| 66 | (R) = ENOMEM; \ |
| 67 | } else { \ |
| 68 | (R) = encode_##T(((unsigned char*)(B)) + (BL) - 1, (BL), \ |
| 69 | (S), (L)); \ |
| 70 | if((R) != 0) { \ |
| 71 | free((B)); \ |
| 72 | (B) = NULL; \ |
| 73 | } \ |
| 74 | } \ |
| 75 | } while (0) |
| 76 | |
| 77 | #ifdef _WIN32 |
| 78 | #ifndef ASN1_LIB |
| 79 | #define ASN1EXP __declspec(dllimport) |
| 80 | #else |
| 81 | #define ASN1EXP |
| 82 | #endif |
| 83 | #define ASN1CALL __stdcall |
| 84 | #else |
| 85 | #define ASN1EXP |
| 86 | #define ASN1CALL |
| 87 | #endif |
| 88 | struct units; |
| 89 | |
| 90 | #endif |
| 91 | |
| 92 | /* |
| 93 | NAME-TYPE ::= INTEGER { |
| 94 | KRB5_NT_UNKNOWN(0), |
| 95 | KRB5_NT_PRINCIPAL(1), |
| 96 | KRB5_NT_SRV_INST(2), |
| 97 | KRB5_NT_SRV_HST(3), |
| 98 | KRB5_NT_SRV_XHST(4), |
| 99 | KRB5_NT_UID(5), |
| 100 | KRB5_NT_X500_PRINCIPAL(6), |
| 101 | KRB5_NT_SMTP_NAME(7), |
| 102 | KRB5_NT_ENTERPRISE_PRINCIPAL(10), |
| 103 | KRB5_NT_WELLKNOWN(11), |
| 104 | KRB5_NT_SRV_HST_DOMAIN(12), |
| 105 | KRB5_NT_ENT_PRINCIPAL_AND_ID(-130), |
| 106 | KRB5_NT_MS_PRINCIPAL(-128), |
| 107 | KRB5_NT_MS_PRINCIPAL_AND_ID(-129), |
| 108 | KRB5_NT_NTLM(-1200), |
| 109 | KRB5_NT_X509_GENERAL_NAME(-1201), |
| 110 | KRB5_NT_GSS_HOSTBASED_SERVICE(-1202), |
| 111 | KRB5_NT_CACHE_UUID(-1203), |
| 112 | KRB5_NT_SRV_HST_NEEDS_CANON(-195894762) |
| 113 | } |
| 114 | */ |
| 115 | |
| 116 | typedef enum NAME_TYPE { |
| 117 | KRB5_NT_UNKNOWN = 0, |
| 118 | KRB5_NT_PRINCIPAL = 1, |
| 119 | KRB5_NT_SRV_INST = 2, |
| 120 | KRB5_NT_SRV_HST = 3, |
| 121 | KRB5_NT_SRV_XHST = 4, |
| 122 | KRB5_NT_UID = 5, |
| 123 | KRB5_NT_X500_PRINCIPAL = 6, |
| 124 | KRB5_NT_SMTP_NAME = 7, |
| 125 | KRB5_NT_ENTERPRISE_PRINCIPAL = 10, |
| 126 | KRB5_NT_WELLKNOWN = 11, |
| 127 | KRB5_NT_SRV_HST_DOMAIN = 12, |
| 128 | KRB5_NT_ENT_PRINCIPAL_AND_ID = -130, |
| 129 | KRB5_NT_MS_PRINCIPAL = -128, |
| 130 | KRB5_NT_MS_PRINCIPAL_AND_ID = -129, |
| 131 | KRB5_NT_NTLM = -1200, |
| 132 | KRB5_NT_X509_GENERAL_NAME = -1201, |
| 133 | KRB5_NT_GSS_HOSTBASED_SERVICE = -1202, |
| 134 | KRB5_NT_CACHE_UUID = -1203, |
| 135 | KRB5_NT_SRV_HST_NEEDS_CANON = -195894762 |
| 136 | } NAME_TYPE; |
| 137 | |
| 138 | ASN1EXP int ASN1CALL decode_NAME_TYPE(const unsigned char *, size_t, NAME_TYPE *, size_t *); |
| 139 | ASN1EXP int ASN1CALL encode_NAME_TYPE(unsigned char *, size_t, const NAME_TYPE *, size_t *); |
| 140 | ASN1EXP size_t ASN1CALL length_NAME_TYPE(const NAME_TYPE *); |
| 141 | ASN1EXP int ASN1CALL copy_NAME_TYPE (const NAME_TYPE *, NAME_TYPE *); |
| 142 | ASN1EXP void ASN1CALL free_NAME_TYPE (NAME_TYPE *); |
| 143 | |
| 144 | |
| 145 | /* |
| 146 | MESSAGE-TYPE ::= INTEGER { |
| 147 | krb_as_req(10), |
| 148 | krb_as_rep(11), |
| 149 | krb_tgs_req(12), |
| 150 | krb_tgs_rep(13), |
| 151 | krb_ap_req(14), |
| 152 | krb_ap_rep(15), |
| 153 | krb_safe(20), |
| 154 | krb_priv(21), |
| 155 | krb_cred(22), |
| 156 | krb_error(30) |
| 157 | } |
| 158 | */ |
| 159 | |
| 160 | typedef enum MESSAGE_TYPE { |
| 161 | krb_as_req = 10, |
| 162 | krb_as_rep = 11, |
| 163 | krb_tgs_req = 12, |
| 164 | krb_tgs_rep = 13, |
| 165 | krb_ap_req = 14, |
| 166 | krb_ap_rep = 15, |
| 167 | krb_safe = 20, |
| 168 | krb_priv = 21, |
| 169 | krb_cred = 22, |
| 170 | krb_error = 30 |
| 171 | } MESSAGE_TYPE; |
| 172 | |
| 173 | /* |
| 174 | PADATA-TYPE ::= INTEGER { |
| 175 | KRB5_PADATA_NONE(0), |
| 176 | KRB5_PADATA_TGS_REQ(1), |
| 177 | KRB5_PADATA_AP_REQ(1), |
| 178 | KRB5_PADATA_ENC_TIMESTAMP(2), |
| 179 | KRB5_PADATA_PW_SALT(3), |
| 180 | KRB5_PADATA_ENC_UNIX_TIME(5), |
| 181 | KRB5_PADATA_SANDIA_SECUREID(6), |
| 182 | KRB5_PADATA_SESAME(7), |
| 183 | KRB5_PADATA_OSF_DCE(8), |
| 184 | KRB5_PADATA_CYBERSAFE_SECUREID(9), |
| 185 | KRB5_PADATA_AFS3_SALT(10), |
| 186 | KRB5_PADATA_ETYPE_INFO(11), |
| 187 | KRB5_PADATA_SAM_CHALLENGE(12), |
| 188 | KRB5_PADATA_SAM_RESPONSE(13), |
| 189 | KRB5_PADATA_PK_AS_REQ_19(14), |
| 190 | KRB5_PADATA_PK_AS_REP_19(15), |
| 191 | KRB5_PADATA_PK_AS_REQ_WIN(15), |
| 192 | KRB5_PADATA_PK_AS_REQ(16), |
| 193 | KRB5_PADATA_PK_AS_REP(17), |
| 194 | KRB5_PADATA_PA_PK_OCSP_RESPONSE(18), |
| 195 | KRB5_PADATA_ETYPE_INFO2(19), |
| 196 | KRB5_PADATA_USE_SPECIFIED_KVNO(20), |
| 197 | KRB5_PADATA_SVR_REFERRAL_INFO(20), |
| 198 | KRB5_PADATA_SAM_REDIRECT(21), |
| 199 | KRB5_PADATA_GET_FROM_TYPED_DATA(22), |
| 200 | KRB5_PADATA_SAM_ETYPE_INFO(23), |
| 201 | KRB5_PADATA_SERVER_REFERRAL(25), |
| 202 | KRB5_PADATA_ALT_PRINC(24), |
| 203 | KRB5_PADATA_SAM_CHALLENGE2(30), |
| 204 | KRB5_PADATA_SAM_RESPONSE2(31), |
| 205 | KRB5_PA_EXTRA_TGT(41), |
| 206 | KRB5_PADATA_FX_FAST_ARMOR(71), |
| 207 | KRB5_PADATA_TD_KRB_PRINCIPAL(102), |
| 208 | KRB5_PADATA_PK_TD_TRUSTED_CERTIFIERS(104), |
| 209 | KRB5_PADATA_PK_TD_CERTIFICATE_INDEX(105), |
| 210 | KRB5_PADATA_TD_APP_DEFINED_ERROR(106), |
| 211 | KRB5_PADATA_TD_REQ_NONCE(107), |
| 212 | KRB5_PADATA_TD_REQ_SEQ(108), |
| 213 | KRB5_PADATA_PA_PAC_REQUEST(128), |
| 214 | KRB5_PADATA_FOR_USER(129), |
| 215 | KRB5_PADATA_FOR_X509_USER(130), |
| 216 | KRB5_PADATA_FOR_CHECK_DUPS(131), |
| 217 | KRB5_PADATA_AS_CHECKSUM(132), |
| 218 | KRB5_PADATA_PK_AS_09_BINDING(132), |
| 219 | KRB5_PADATA_FX_COOKIE(133), |
| 220 | KRB5_PADATA_AUTHENTICATION_SET(134), |
| 221 | KRB5_PADATA_AUTH_SET_SELECTED(135), |
| 222 | KRB5_PADATA_FX_FAST(136), |
| 223 | KRB5_PADATA_FX_ERROR(137), |
| 224 | KRB5_PADATA_ENCRYPTED_CHALLENGE(138), |
| 225 | KRB5_PADATA_OTP_CHALLENGE(141), |
| 226 | KRB5_PADATA_OTP_REQUEST(142), |
| 227 | KBB5_PADATA_OTP_CONFIRM(143), |
| 228 | KRB5_PADATA_OTP_PIN_CHANGE(144), |
| 229 | KRB5_PADATA_EPAK_AS_REQ(145), |
| 230 | KRB5_PADATA_EPAK_AS_REP(146), |
| 231 | KRB5_PADATA_PKINIT_KX(147), |
| 232 | KRB5_PADATA_PKU2U_NAME(148), |
| 233 | KRB5_PADATA_REQ_ENC_PA_REP(149), |
| 234 | KRB5_PADATA_SUPPORTED_ETYPES(165) |
| 235 | } |
| 236 | */ |
| 237 | |
| 238 | typedef enum PADATA_TYPE { |
| 239 | KRB5_PADATA_NONE = 0, |
| 240 | KRB5_PADATA_TGS_REQ = 1, |
| 241 | KRB5_PADATA_AP_REQ = 1, |
| 242 | KRB5_PADATA_ENC_TIMESTAMP = 2, |
| 243 | KRB5_PADATA_PW_SALT = 3, |
| 244 | KRB5_PADATA_ENC_UNIX_TIME = 5, |
| 245 | KRB5_PADATA_SANDIA_SECUREID = 6, |
| 246 | KRB5_PADATA_SESAME = 7, |
| 247 | KRB5_PADATA_OSF_DCE = 8, |
| 248 | KRB5_PADATA_CYBERSAFE_SECUREID = 9, |
| 249 | KRB5_PADATA_AFS3_SALT = 10, |
| 250 | KRB5_PADATA_ETYPE_INFO = 11, |
| 251 | KRB5_PADATA_SAM_CHALLENGE = 12, |
| 252 | KRB5_PADATA_SAM_RESPONSE = 13, |
| 253 | KRB5_PADATA_PK_AS_REQ_19 = 14, |
| 254 | KRB5_PADATA_PK_AS_REP_19 = 15, |
| 255 | KRB5_PADATA_PK_AS_REQ_WIN = 15, |
| 256 | KRB5_PADATA_PK_AS_REQ = 16, |
| 257 | KRB5_PADATA_PK_AS_REP = 17, |
| 258 | KRB5_PADATA_PA_PK_OCSP_RESPONSE = 18, |
| 259 | KRB5_PADATA_ETYPE_INFO2 = 19, |
| 260 | KRB5_PADATA_USE_SPECIFIED_KVNO = 20, |
| 261 | KRB5_PADATA_SVR_REFERRAL_INFO = 20, |
| 262 | KRB5_PADATA_SAM_REDIRECT = 21, |
| 263 | KRB5_PADATA_GET_FROM_TYPED_DATA = 22, |
| 264 | KRB5_PADATA_SAM_ETYPE_INFO = 23, |
| 265 | KRB5_PADATA_SERVER_REFERRAL = 25, |
| 266 | KRB5_PADATA_ALT_PRINC = 24, |
| 267 | KRB5_PADATA_SAM_CHALLENGE2 = 30, |
| 268 | KRB5_PADATA_SAM_RESPONSE2 = 31, |
| 269 | = 41, |
| 270 | KRB5_PADATA_FX_FAST_ARMOR = 71, |
| 271 | KRB5_PADATA_TD_KRB_PRINCIPAL = 102, |
| 272 | KRB5_PADATA_PK_TD_TRUSTED_CERTIFIERS = 104, |
| 273 | KRB5_PADATA_PK_TD_CERTIFICATE_INDEX = 105, |
| 274 | KRB5_PADATA_TD_APP_DEFINED_ERROR = 106, |
| 275 | KRB5_PADATA_TD_REQ_NONCE = 107, |
| 276 | KRB5_PADATA_TD_REQ_SEQ = 108, |
| 277 | KRB5_PADATA_PA_PAC_REQUEST = 128, |
| 278 | KRB5_PADATA_FOR_USER = 129, |
| 279 | KRB5_PADATA_FOR_X509_USER = 130, |
| 280 | KRB5_PADATA_FOR_CHECK_DUPS = 131, |
| 281 | KRB5_PADATA_AS_CHECKSUM = 132, |
| 282 | KRB5_PADATA_PK_AS_09_BINDING = 132, |
| 283 | KRB5_PADATA_FX_COOKIE = 133, |
| 284 | KRB5_PADATA_AUTHENTICATION_SET = 134, |
| 285 | KRB5_PADATA_AUTH_SET_SELECTED = 135, |
| 286 | KRB5_PADATA_FX_FAST = 136, |
| 287 | KRB5_PADATA_FX_ERROR = 137, |
| 288 | KRB5_PADATA_ENCRYPTED_CHALLENGE = 138, |
| 289 | KRB5_PADATA_OTP_CHALLENGE = 141, |
| 290 | KRB5_PADATA_OTP_REQUEST = 142, |
| 291 | KBB5_PADATA_OTP_CONFIRM = 143, |
| 292 | KRB5_PADATA_OTP_PIN_CHANGE = 144, |
| 293 | KRB5_PADATA_EPAK_AS_REQ = 145, |
| 294 | KRB5_PADATA_EPAK_AS_REP = 146, |
| 295 | KRB5_PADATA_PKINIT_KX = 147, |
| 296 | KRB5_PADATA_PKU2U_NAME = 148, |
| 297 | KRB5_PADATA_REQ_ENC_PA_REP = 149, |
| 298 | KRB5_PADATA_SUPPORTED_ETYPES = 165 |
| 299 | } PADATA_TYPE; |
| 300 | |
| 301 | ASN1EXP int ASN1CALL decode_PADATA_TYPE(const unsigned char *, size_t, PADATA_TYPE *, size_t *); |
| 302 | ASN1EXP int ASN1CALL encode_PADATA_TYPE(unsigned char *, size_t, const PADATA_TYPE *, size_t *); |
| 303 | ASN1EXP size_t ASN1CALL length_PADATA_TYPE(const PADATA_TYPE *); |
| 304 | ASN1EXP int ASN1CALL copy_PADATA_TYPE (const PADATA_TYPE *, PADATA_TYPE *); |
| 305 | ASN1EXP void ASN1CALL free_PADATA_TYPE (PADATA_TYPE *); |
| 306 | |
| 307 | |
| 308 | /* |
| 309 | AUTHDATA-TYPE ::= INTEGER { |
| 310 | KRB5_AUTHDATA_IF_RELEVANT(1), |
| 311 | KRB5_AUTHDATA_INTENDED_FOR_SERVER(2), |
| 312 | KRB5_AUTHDATA_INTENDED_FOR_APPLICATION_CLASS(3), |
| 313 | KRB5_AUTHDATA_KDC_ISSUED(4), |
| 314 | KRB5_AUTHDATA_AND_OR(5), |
| 315 | KRB5_AUTHDATA_MANDATORY_TICKET_EXTENSIONS(6), |
| 316 | KRB5_AUTHDATA_IN_TICKET_EXTENSIONS(7), |
| 317 | KRB5_AUTHDATA_MANDATORY_FOR_KDC(8), |
| 318 | KRB5_AUTHDATA_INITIAL_VERIFIED_CAS(9), |
| 319 | KRB5_AUTHDATA_OSF_DCE(64), |
| 320 | KRB5_AUTHDATA_SESAME(65), |
| 321 | KRB5_AUTHDATA_OSF_DCE_PKI_CERTID(66), |
| 322 | KRB5_AUTHDATA_WIN2K_PAC(128), |
| 323 | KRB5_AUTHDATA_GSS_API_ETYPE_NEGOTIATION(129), |
| 324 | KRB5_AUTHDATA_SIGNTICKET_OLDER(-17), |
| 325 | KRB5_AUTHDATA_SIGNTICKET_OLD(142), |
| 326 | KRB5_AUTHDATA_SIGNTICKET(512) |
| 327 | } |
| 328 | */ |
| 329 | |
| 330 | typedef enum AUTHDATA_TYPE { |
| 331 | KRB5_AUTHDATA_IF_RELEVANT = 1, |
| 332 | KRB5_AUTHDATA_INTENDED_FOR_SERVER = 2, |
| 333 | KRB5_AUTHDATA_INTENDED_FOR_APPLICATION_CLASS = 3, |
| 334 | KRB5_AUTHDATA_KDC_ISSUED = 4, |
| 335 | KRB5_AUTHDATA_AND_OR = 5, |
| 336 | KRB5_AUTHDATA_MANDATORY_TICKET_EXTENSIONS = 6, |
| 337 | KRB5_AUTHDATA_IN_TICKET_EXTENSIONS = 7, |
| 338 | KRB5_AUTHDATA_MANDATORY_FOR_KDC = 8, |
| 339 | KRB5_AUTHDATA_INITIAL_VERIFIED_CAS = 9, |
| 340 | KRB5_AUTHDATA_OSF_DCE = 64, |
| 341 | KRB5_AUTHDATA_SESAME = 65, |
| 342 | KRB5_AUTHDATA_OSF_DCE_PKI_CERTID = 66, |
| 343 | KRB5_AUTHDATA_WIN2K_PAC = 128, |
| 344 | KRB5_AUTHDATA_GSS_API_ETYPE_NEGOTIATION = 129, |
| 345 | KRB5_AUTHDATA_SIGNTICKET_OLDER = -17, |
| 346 | KRB5_AUTHDATA_SIGNTICKET_OLD = 142, |
| 347 | KRB5_AUTHDATA_SIGNTICKET = 512 |
| 348 | } AUTHDATA_TYPE; |
| 349 | |
| 350 | ASN1EXP int ASN1CALL decode_AUTHDATA_TYPE(const unsigned char *, size_t, AUTHDATA_TYPE *, size_t *); |
| 351 | ASN1EXP int ASN1CALL encode_AUTHDATA_TYPE(unsigned char *, size_t, const AUTHDATA_TYPE *, size_t *); |
| 352 | ASN1EXP size_t ASN1CALL length_AUTHDATA_TYPE(const AUTHDATA_TYPE *); |
| 353 | ASN1EXP int ASN1CALL copy_AUTHDATA_TYPE (const AUTHDATA_TYPE *, AUTHDATA_TYPE *); |
| 354 | ASN1EXP void ASN1CALL free_AUTHDATA_TYPE (AUTHDATA_TYPE *); |
| 355 | |
| 356 | |
| 357 | /* |
| 358 | CKSUMTYPE ::= INTEGER { |
| 359 | CKSUMTYPE_NONE(0), |
| 360 | CKSUMTYPE_CRC32(1), |
| 361 | CKSUMTYPE_RSA_MD4(2), |
| 362 | CKSUMTYPE_RSA_MD4_DES(3), |
| 363 | CKSUMTYPE_DES_MAC(4), |
| 364 | CKSUMTYPE_DES_MAC_K(5), |
| 365 | CKSUMTYPE_RSA_MD4_DES_K(6), |
| 366 | CKSUMTYPE_RSA_MD5(7), |
| 367 | CKSUMTYPE_RSA_MD5_DES(8), |
| 368 | CKSUMTYPE_RSA_MD5_DES3(9), |
| 369 | CKSUMTYPE_SHA1_OTHER(10), |
| 370 | CKSUMTYPE_HMAC_SHA1_DES3(12), |
| 371 | CKSUMTYPE_SHA1(14), |
| 372 | CKSUMTYPE_HMAC_SHA1_96_AES_128(15), |
| 373 | CKSUMTYPE_HMAC_SHA1_96_AES_256(16), |
| 374 | CKSUMTYPE_HMAC_SHA256_128_AES128(19), |
| 375 | CKSUMTYPE_HMAC_SHA384_192_AES256(20), |
| 376 | CKSUMTYPE_GSSAPI(32771), |
| 377 | CKSUMTYPE_HMAC_MD5(-138), |
| 378 | CKSUMTYPE_HMAC_MD5_ENC(-1138) |
| 379 | } |
| 380 | */ |
| 381 | |
| 382 | typedef enum CKSUMTYPE { |
| 383 | CKSUMTYPE_NONE = 0, |
| 384 | CKSUMTYPE_CRC32 = 1, |
| 385 | CKSUMTYPE_RSA_MD4 = 2, |
| 386 | CKSUMTYPE_RSA_MD4_DES = 3, |
| 387 | CKSUMTYPE_DES_MAC = 4, |
| 388 | CKSUMTYPE_DES_MAC_K = 5, |
| 389 | CKSUMTYPE_RSA_MD4_DES_K = 6, |
| 390 | CKSUMTYPE_RSA_MD5 = 7, |
| 391 | CKSUMTYPE_RSA_MD5_DES = 8, |
| 392 | CKSUMTYPE_RSA_MD5_DES3 = 9, |
| 393 | CKSUMTYPE_SHA1_OTHER = 10, |
| 394 | CKSUMTYPE_HMAC_SHA1_DES3 = 12, |
| 395 | CKSUMTYPE_SHA1 = 14, |
| 396 | CKSUMTYPE_HMAC_SHA1_96_AES_128 = 15, |
| 397 | CKSUMTYPE_HMAC_SHA1_96_AES_256 = 16, |
| 398 | CKSUMTYPE_HMAC_SHA256_128_AES128 = 19, |
| 399 | CKSUMTYPE_HMAC_SHA384_192_AES256 = 20, |
| 400 | CKSUMTYPE_GSSAPI = 32771, |
| 401 | CKSUMTYPE_HMAC_MD5 = -138, |
| 402 | CKSUMTYPE_HMAC_MD5_ENC = -1138 |
| 403 | } CKSUMTYPE; |
| 404 | |
| 405 | ASN1EXP int ASN1CALL decode_CKSUMTYPE(const unsigned char *, size_t, CKSUMTYPE *, size_t *); |
| 406 | ASN1EXP int ASN1CALL encode_CKSUMTYPE(unsigned char *, size_t, const CKSUMTYPE *, size_t *); |
| 407 | ASN1EXP size_t ASN1CALL length_CKSUMTYPE(const CKSUMTYPE *); |
| 408 | ASN1EXP int ASN1CALL copy_CKSUMTYPE (const CKSUMTYPE *, CKSUMTYPE *); |
| 409 | ASN1EXP void ASN1CALL free_CKSUMTYPE (CKSUMTYPE *); |
| 410 | |
| 411 | |
| 412 | /* |
| 413 | ENCTYPE ::= INTEGER { |
| 414 | KRB5_ENCTYPE_NULL(0), |
| 415 | KRB5_ENCTYPE_DES_CBC_CRC(1), |
| 416 | KRB5_ENCTYPE_DES_CBC_MD4(2), |
| 417 | KRB5_ENCTYPE_DES_CBC_MD5(3), |
| 418 | KRB5_ENCTYPE_DES3_CBC_MD5(5), |
| 419 | KRB5_ENCTYPE_OLD_DES3_CBC_SHA1(7), |
| 420 | KRB5_ENCTYPE_SIGN_DSA_GENERATE(8), |
| 421 | KRB5_ENCTYPE_ENCRYPT_RSA_PRIV(9), |
| 422 | KRB5_ENCTYPE_ENCRYPT_RSA_PUB(10), |
| 423 | KRB5_ENCTYPE_DES3_CBC_SHA1(16), |
| 424 | KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96(17), |
| 425 | KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96(18), |
| 426 | KRB5_ENCTYPE_AES128_CTS_HMAC_SHA256_128(19), |
| 427 | KRB5_ENCTYPE_AES256_CTS_HMAC_SHA384_192(20), |
| 428 | KRB5_ENCTYPE_ARCFOUR_HMAC_MD5(23), |
| 429 | KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56(24), |
| 430 | KRB5_ENCTYPE_ENCTYPE_PK_CROSS(48), |
| 431 | KRB5_ENCTYPE_ARCFOUR_MD4(-128), |
| 432 | KRB5_ENCTYPE_ARCFOUR_HMAC_OLD(-133), |
| 433 | KRB5_ENCTYPE_ARCFOUR_HMAC_OLD_EXP(-135), |
| 434 | KRB5_ENCTYPE_DES_CBC_NONE(-4096), |
| 435 | KRB5_ENCTYPE_DES3_CBC_NONE(-4097), |
| 436 | KRB5_ENCTYPE_DES_CFB64_NONE(-4098), |
| 437 | KRB5_ENCTYPE_DES_PCBC_NONE(-4099), |
| 438 | KRB5_ENCTYPE_DIGEST_MD5_NONE(-4100), |
| 439 | KRB5_ENCTYPE_CRAM_MD5_NONE(-4101) |
| 440 | } |
| 441 | */ |
| 442 | |
| 443 | typedef enum ENCTYPE { |
| 444 | KRB5_ENCTYPE_NULL = 0, |
| 445 | KRB5_ENCTYPE_DES_CBC_CRC = 1, |
| 446 | KRB5_ENCTYPE_DES_CBC_MD4 = 2, |
| 447 | KRB5_ENCTYPE_DES_CBC_MD5 = 3, |
| 448 | KRB5_ENCTYPE_DES3_CBC_MD5 = 5, |
| 449 | KRB5_ENCTYPE_OLD_DES3_CBC_SHA1 = 7, |
| 450 | KRB5_ENCTYPE_SIGN_DSA_GENERATE = 8, |
| 451 | KRB5_ENCTYPE_ENCRYPT_RSA_PRIV = 9, |
| 452 | KRB5_ENCTYPE_ENCRYPT_RSA_PUB = 10, |
| 453 | KRB5_ENCTYPE_DES3_CBC_SHA1 = 16, |
| 454 | KRB5_ENCTYPE_AES128_CTS_HMAC_SHA1_96 = 17, |
| 455 | KRB5_ENCTYPE_AES256_CTS_HMAC_SHA1_96 = 18, |
| 456 | KRB5_ENCTYPE_AES128_CTS_HMAC_SHA256_128 = 19, |
| 457 | KRB5_ENCTYPE_AES256_CTS_HMAC_SHA384_192 = 20, |
| 458 | KRB5_ENCTYPE_ARCFOUR_HMAC_MD5 = 23, |
| 459 | KRB5_ENCTYPE_ARCFOUR_HMAC_MD5_56 = 24, |
| 460 | KRB5_ENCTYPE_ENCTYPE_PK_CROSS = 48, |
| 461 | KRB5_ENCTYPE_ARCFOUR_MD4 = -128, |
| 462 | KRB5_ENCTYPE_ARCFOUR_HMAC_OLD = -133, |
| 463 | KRB5_ENCTYPE_ARCFOUR_HMAC_OLD_EXP = -135, |
| 464 | KRB5_ENCTYPE_DES_CBC_NONE = -4096, |
| 465 | KRB5_ENCTYPE_DES3_CBC_NONE = -4097, |
| 466 | KRB5_ENCTYPE_DES_CFB64_NONE = -4098, |
| 467 | KRB5_ENCTYPE_DES_PCBC_NONE = -4099, |
| 468 | KRB5_ENCTYPE_DIGEST_MD5_NONE = -4100, |
| 469 | KRB5_ENCTYPE_CRAM_MD5_NONE = -4101 |
| 470 | } ENCTYPE; |
| 471 | |
| 472 | ASN1EXP int ASN1CALL decode_ENCTYPE(const unsigned char *, size_t, ENCTYPE *, size_t *); |
| 473 | ASN1EXP int ASN1CALL encode_ENCTYPE(unsigned char *, size_t, const ENCTYPE *, size_t *); |
| 474 | ASN1EXP size_t ASN1CALL length_ENCTYPE(const ENCTYPE *); |
| 475 | ASN1EXP int ASN1CALL copy_ENCTYPE (const ENCTYPE *, ENCTYPE *); |
| 476 | ASN1EXP void ASN1CALL free_ENCTYPE (ENCTYPE *); |
| 477 | |
| 478 | |
| 479 | /* |
| 480 | krb5uint32 ::= INTEGER (0..4294967295) |
| 481 | */ |
| 482 | |
| 483 | typedef unsigned int krb5uint32; |
| 484 | |
| 485 | /* |
| 486 | krb5int32 ::= INTEGER (-2147483648..2147483647) |
| 487 | */ |
| 488 | |
| 489 | typedef int krb5int32; |
| 490 | |
| 491 | /* |
| 492 | KerberosString ::= GeneralString |
| 493 | */ |
| 494 | |
| 495 | typedef heim_general_string KerberosString; |
| 496 | |
| 497 | ASN1EXP int ASN1CALL decode_KerberosString(const unsigned char *, size_t, KerberosString *, size_t *); |
| 498 | ASN1EXP int ASN1CALL encode_KerberosString(unsigned char *, size_t, const KerberosString *, size_t *); |
| 499 | ASN1EXP size_t ASN1CALL length_KerberosString(const KerberosString *); |
| 500 | ASN1EXP int ASN1CALL copy_KerberosString (const KerberosString *, KerberosString *); |
| 501 | ASN1EXP void ASN1CALL free_KerberosString (KerberosString *); |
| 502 | |
| 503 | |
| 504 | /* |
| 505 | Realm ::= GeneralString |
| 506 | */ |
| 507 | |
| 508 | typedef heim_general_string Realm; |
| 509 | |
| 510 | ASN1EXP int ASN1CALL decode_Realm(const unsigned char *, size_t, Realm *, size_t *); |
| 511 | ASN1EXP int ASN1CALL encode_Realm(unsigned char *, size_t, const Realm *, size_t *); |
| 512 | ASN1EXP size_t ASN1CALL length_Realm(const Realm *); |
| 513 | ASN1EXP int ASN1CALL copy_Realm (const Realm *, Realm *); |
| 514 | ASN1EXP void ASN1CALL free_Realm (Realm *); |
| 515 | |
| 516 | |
| 517 | /* |
| 518 | PrincipalName ::= SEQUENCE { |
| 519 | name-type [0] NAME-TYPE, |
| 520 | name-string [1] SEQUENCE OF GeneralString, |
| 521 | } |
| 522 | */ |
| 523 | |
| 524 | typedef struct PrincipalName { |
| 525 | NAME_TYPE name_type; |
| 526 | struct PrincipalName_name_string { |
| 527 | unsigned int len; |
| 528 | heim_general_string *val; |
| 529 | } name_string; |
| 530 | } PrincipalName; |
| 531 | |
| 532 | ASN1EXP int ASN1CALL decode_PrincipalName(const unsigned char *, size_t, PrincipalName *, size_t *); |
| 533 | ASN1EXP int ASN1CALL encode_PrincipalName(unsigned char *, size_t, const PrincipalName *, size_t *); |
| 534 | ASN1EXP size_t ASN1CALL length_PrincipalName(const PrincipalName *); |
| 535 | ASN1EXP int ASN1CALL copy_PrincipalName (const PrincipalName *, PrincipalName *); |
| 536 | ASN1EXP void ASN1CALL free_PrincipalName (PrincipalName *); |
| 537 | |
| 538 | |
| 539 | /* |
| 540 | Principal ::= SEQUENCE { |
| 541 | name [0] PrincipalName, |
| 542 | realm [1] Realm, |
| 543 | } |
| 544 | */ |
| 545 | |
| 546 | typedef struct Principal { |
| 547 | PrincipalName name; |
| 548 | Realm realm; |
| 549 | } Principal; |
| 550 | |
| 551 | ASN1EXP int ASN1CALL decode_Principal(const unsigned char *, size_t, Principal *, size_t *); |
| 552 | ASN1EXP int ASN1CALL encode_Principal(unsigned char *, size_t, const Principal *, size_t *); |
| 553 | ASN1EXP size_t ASN1CALL length_Principal(const Principal *); |
| 554 | ASN1EXP int ASN1CALL copy_Principal (const Principal *, Principal *); |
| 555 | ASN1EXP void ASN1CALL free_Principal (Principal *); |
| 556 | |
| 557 | |
| 558 | /* |
| 559 | Principals ::= SEQUENCE OF Principal |
| 560 | */ |
| 561 | |
| 562 | typedef struct Principals { |
| 563 | unsigned int len; |
| 564 | Principal *val; |
| 565 | } Principals; |
| 566 | |
| 567 | ASN1EXP int ASN1CALL add_Principals (Principals *, const Principal *); |
| 568 | ASN1EXP int ASN1CALL remove_Principals (Principals *, unsigned int); |
| 569 | ASN1EXP int ASN1CALL decode_Principals(const unsigned char *, size_t, Principals *, size_t *); |
| 570 | ASN1EXP int ASN1CALL encode_Principals(unsigned char *, size_t, const Principals *, size_t *); |
| 571 | ASN1EXP size_t ASN1CALL length_Principals(const Principals *); |
| 572 | ASN1EXP int ASN1CALL copy_Principals (const Principals *, Principals *); |
| 573 | ASN1EXP void ASN1CALL free_Principals (Principals *); |
| 574 | |
| 575 | |
| 576 | /* |
| 577 | HostAddress ::= SEQUENCE { |
| 578 | addr-type [0] krb5int32, |
| 579 | address [1] OCTET STRING, |
| 580 | } |
| 581 | */ |
| 582 | |
| 583 | typedef struct HostAddress { |
| 584 | krb5int32 addr_type; |
| 585 | heim_octet_string address; |
| 586 | } HostAddress; |
| 587 | |
| 588 | ASN1EXP int ASN1CALL decode_HostAddress(const unsigned char *, size_t, HostAddress *, size_t *); |
| 589 | ASN1EXP int ASN1CALL encode_HostAddress(unsigned char *, size_t, const HostAddress *, size_t *); |
| 590 | ASN1EXP size_t ASN1CALL length_HostAddress(const HostAddress *); |
| 591 | ASN1EXP int ASN1CALL copy_HostAddress (const HostAddress *, HostAddress *); |
| 592 | ASN1EXP void ASN1CALL free_HostAddress (HostAddress *); |
| 593 | |
| 594 | |
| 595 | /* |
| 596 | HostAddresses ::= SEQUENCE OF HostAddress |
| 597 | */ |
| 598 | |
| 599 | typedef struct HostAddresses { |
| 600 | unsigned int len; |
| 601 | HostAddress *val; |
| 602 | } HostAddresses; |
| 603 | |
| 604 | ASN1EXP int ASN1CALL decode_HostAddresses(const unsigned char *, size_t, HostAddresses *, size_t *); |
| 605 | ASN1EXP int ASN1CALL encode_HostAddresses(unsigned char *, size_t, const HostAddresses *, size_t *); |
| 606 | ASN1EXP size_t ASN1CALL length_HostAddresses(const HostAddresses *); |
| 607 | ASN1EXP int ASN1CALL copy_HostAddresses (const HostAddresses *, HostAddresses *); |
| 608 | ASN1EXP void ASN1CALL free_HostAddresses (HostAddresses *); |
| 609 | |
| 610 | |
| 611 | /* |
| 612 | KerberosTime ::= GeneralizedTime |
| 613 | */ |
| 614 | |
| 615 | typedef time_t KerberosTime; |
| 616 | |
| 617 | ASN1EXP int ASN1CALL decode_KerberosTime(const unsigned char *, size_t, KerberosTime *, size_t *); |
| 618 | ASN1EXP int ASN1CALL encode_KerberosTime(unsigned char *, size_t, const KerberosTime *, size_t *); |
| 619 | ASN1EXP size_t ASN1CALL length_KerberosTime(const KerberosTime *); |
| 620 | ASN1EXP int ASN1CALL copy_KerberosTime (const KerberosTime *, KerberosTime *); |
| 621 | ASN1EXP void ASN1CALL free_KerberosTime (KerberosTime *); |
| 622 | |
| 623 | |
| 624 | /* |
| 625 | AuthorizationDataElement ::= SEQUENCE { |
| 626 | ad-type [0] krb5int32, |
| 627 | ad-data [1] OCTET STRING, |
| 628 | } |
| 629 | */ |
| 630 | |
| 631 | typedef struct AuthorizationDataElement { |
| 632 | krb5int32 ad_type; |
| 633 | heim_octet_string ad_data; |
| 634 | } AuthorizationDataElement; |
| 635 | |
| 636 | ASN1EXP int ASN1CALL decode_AuthorizationDataElement(const unsigned char *, size_t, AuthorizationDataElement *, size_t *); |
| 637 | ASN1EXP int ASN1CALL encode_AuthorizationDataElement(unsigned char *, size_t, const AuthorizationDataElement *, size_t *); |
| 638 | ASN1EXP size_t ASN1CALL length_AuthorizationDataElement(const AuthorizationDataElement *); |
| 639 | ASN1EXP int ASN1CALL copy_AuthorizationDataElement (const AuthorizationDataElement *, AuthorizationDataElement *); |
| 640 | ASN1EXP void ASN1CALL free_AuthorizationDataElement (AuthorizationDataElement *); |
| 641 | |
| 642 | |
| 643 | /* |
| 644 | AuthorizationData ::= SEQUENCE OF AuthorizationDataElement |
| 645 | */ |
| 646 | |
| 647 | typedef struct AuthorizationData { |
| 648 | unsigned int len; |
| 649 | AuthorizationDataElement *val; |
| 650 | } AuthorizationData; |
| 651 | |
| 652 | ASN1EXP int ASN1CALL add_AuthorizationData (AuthorizationData *, const AuthorizationDataElement *); |
| 653 | ASN1EXP int ASN1CALL remove_AuthorizationData (AuthorizationData *, unsigned int); |
| 654 | ASN1EXP int ASN1CALL decode_AuthorizationData(const unsigned char *, size_t, AuthorizationData *, size_t *); |
| 655 | ASN1EXP int ASN1CALL encode_AuthorizationData(unsigned char *, size_t, const AuthorizationData *, size_t *); |
| 656 | ASN1EXP size_t ASN1CALL length_AuthorizationData(const AuthorizationData *); |
| 657 | ASN1EXP int ASN1CALL copy_AuthorizationData (const AuthorizationData *, AuthorizationData *); |
| 658 | ASN1EXP void ASN1CALL free_AuthorizationData (AuthorizationData *); |
| 659 | |
| 660 | |
| 661 | /* |
| 662 | APOptions ::= BIT STRING { |
| 663 | reserved(0), |
| 664 | use-session-key(1), |
| 665 | mutual-required(2) |
| 666 | } |
| 667 | */ |
| 668 | |
| 669 | typedef struct APOptions { |
| 670 | unsigned int reserved:1; |
| 671 | unsigned int use_session_key:1; |
| 672 | unsigned int mutual_required:1; |
| 673 | unsigned int _unused3:1; |
| 674 | unsigned int _unused4:1; |
| 675 | unsigned int _unused5:1; |
| 676 | unsigned int _unused6:1; |
| 677 | unsigned int _unused7:1; |
| 678 | unsigned int _unused8:1; |
| 679 | unsigned int _unused9:1; |
| 680 | unsigned int _unused10:1; |
| 681 | unsigned int _unused11:1; |
| 682 | unsigned int _unused12:1; |
| 683 | unsigned int _unused13:1; |
| 684 | unsigned int _unused14:1; |
| 685 | unsigned int _unused15:1; |
| 686 | unsigned int _unused16:1; |
| 687 | unsigned int _unused17:1; |
| 688 | unsigned int _unused18:1; |
| 689 | unsigned int _unused19:1; |
| 690 | unsigned int _unused20:1; |
| 691 | unsigned int _unused21:1; |
| 692 | unsigned int _unused22:1; |
| 693 | unsigned int _unused23:1; |
| 694 | unsigned int _unused24:1; |
| 695 | unsigned int _unused25:1; |
| 696 | unsigned int _unused26:1; |
| 697 | unsigned int _unused27:1; |
| 698 | unsigned int _unused28:1; |
| 699 | unsigned int _unused29:1; |
| 700 | unsigned int _unused30:1; |
| 701 | unsigned int _unused31:1; |
| 702 | } APOptions; |
| 703 | |
| 704 | |
| 705 | unsigned APOptions2int(APOptions); |
| 706 | APOptions int2APOptions(unsigned); |
| 707 | const struct units * asn1_APOptions_units(void); |
| 708 | /* |
| 709 | TicketFlags ::= BIT STRING { |
| 710 | reserved(0), |
| 711 | forwardable(1), |
| 712 | forwarded(2), |
| 713 | proxiable(3), |
| 714 | proxy(4), |
| 715 | may-postdate(5), |
| 716 | postdated(6), |
| 717 | invalid(7), |
| 718 | renewable(8), |
| 719 | initial(9), |
| 720 | pre-authent(10), |
| 721 | hw-authent(11), |
| 722 | transited-policy-checked(12), |
| 723 | ok-as-delegate(13), |
| 724 | enc-pa-rep(15), |
| 725 | anonymous(16) |
| 726 | } |
| 727 | */ |
| 728 | |
| 729 | typedef struct TicketFlags { |
| 730 | unsigned int reserved:1; |
| 731 | unsigned int forwardable:1; |
| 732 | unsigned int forwarded:1; |
| 733 | unsigned int proxiable:1; |
| 734 | unsigned int proxy:1; |
| 735 | unsigned int may_postdate:1; |
| 736 | unsigned int postdated:1; |
| 737 | unsigned int invalid:1; |
| 738 | unsigned int renewable:1; |
| 739 | unsigned int initial:1; |
| 740 | unsigned int pre_authent:1; |
| 741 | unsigned int hw_authent:1; |
| 742 | unsigned int transited_policy_checked:1; |
| 743 | unsigned int ok_as_delegate:1; |
| 744 | unsigned int _unused14:1; |
| 745 | unsigned int enc_pa_rep:1; |
| 746 | unsigned int anonymous:1; |
| 747 | unsigned int _unused17:1; |
| 748 | unsigned int _unused18:1; |
| 749 | unsigned int _unused19:1; |
| 750 | unsigned int _unused20:1; |
| 751 | unsigned int _unused21:1; |
| 752 | unsigned int _unused22:1; |
| 753 | unsigned int _unused23:1; |
| 754 | unsigned int _unused24:1; |
| 755 | unsigned int _unused25:1; |
| 756 | unsigned int _unused26:1; |
| 757 | unsigned int _unused27:1; |
| 758 | unsigned int _unused28:1; |
| 759 | unsigned int _unused29:1; |
| 760 | unsigned int _unused30:1; |
| 761 | unsigned int _unused31:1; |
| 762 | } TicketFlags; |
| 763 | |
| 764 | |
| 765 | unsigned TicketFlags2int(TicketFlags); |
| 766 | TicketFlags int2TicketFlags(unsigned); |
| 767 | const struct units * asn1_TicketFlags_units(void); |
| 768 | ASN1EXP int ASN1CALL decode_TicketFlags(const unsigned char *, size_t, TicketFlags *, size_t *); |
| 769 | ASN1EXP int ASN1CALL encode_TicketFlags(unsigned char *, size_t, const TicketFlags *, size_t *); |
| 770 | ASN1EXP size_t ASN1CALL length_TicketFlags(const TicketFlags *); |
| 771 | ASN1EXP int ASN1CALL copy_TicketFlags (const TicketFlags *, TicketFlags *); |
| 772 | ASN1EXP void ASN1CALL free_TicketFlags (TicketFlags *); |
| 773 | |
| 774 | |
| 775 | /* |
| 776 | KDCOptions ::= BIT STRING { |
| 777 | reserved(0), |
| 778 | forwardable(1), |
| 779 | forwarded(2), |
| 780 | proxiable(3), |
| 781 | proxy(4), |
| 782 | allow-postdate(5), |
| 783 | postdated(6), |
| 784 | renewable(8), |
| 785 | constrained-delegation(14), |
| 786 | canonicalize(15), |
| 787 | request-anonymous(16), |
| 788 | disable-transited-check(26), |
| 789 | renewable-ok(27), |
| 790 | enc-tkt-in-skey(28), |
| 791 | renew(30), |
| 792 | validate(31) |
| 793 | } |
| 794 | */ |
| 795 | |
| 796 | typedef struct KDCOptions { |
| 797 | unsigned int reserved:1; |
| 798 | unsigned int forwardable:1; |
| 799 | unsigned int forwarded:1; |
| 800 | unsigned int proxiable:1; |
| 801 | unsigned int proxy:1; |
| 802 | unsigned int allow_postdate:1; |
| 803 | unsigned int postdated:1; |
| 804 | unsigned int _unused7:1; |
| 805 | unsigned int renewable:1; |
| 806 | unsigned int _unused9:1; |
| 807 | unsigned int _unused10:1; |
| 808 | unsigned int _unused11:1; |
| 809 | unsigned int _unused12:1; |
| 810 | unsigned int _unused13:1; |
| 811 | unsigned int constrained_delegation:1; |
| 812 | unsigned int canonicalize:1; |
| 813 | unsigned int request_anonymous:1; |
| 814 | unsigned int _unused17:1; |
| 815 | unsigned int _unused18:1; |
| 816 | unsigned int _unused19:1; |
| 817 | unsigned int _unused20:1; |
| 818 | unsigned int _unused21:1; |
| 819 | unsigned int _unused22:1; |
| 820 | unsigned int _unused23:1; |
| 821 | unsigned int _unused24:1; |
| 822 | unsigned int _unused25:1; |
| 823 | unsigned int disable_transited_check:1; |
| 824 | unsigned int renewable_ok:1; |
| 825 | unsigned int enc_tkt_in_skey:1; |
| 826 | unsigned int _unused29:1; |
| 827 | unsigned int renew:1; |
| 828 | unsigned int validate:1; |
| 829 | } KDCOptions; |
| 830 | |
| 831 | |
| 832 | unsigned KDCOptions2int(KDCOptions); |
| 833 | KDCOptions int2KDCOptions(unsigned); |
| 834 | const struct units * asn1_KDCOptions_units(void); |
| 835 | ASN1EXP int ASN1CALL decode_KDCOptions(const unsigned char *, size_t, KDCOptions *, size_t *); |
| 836 | ASN1EXP int ASN1CALL encode_KDCOptions(unsigned char *, size_t, const KDCOptions *, size_t *); |
| 837 | ASN1EXP size_t ASN1CALL length_KDCOptions(const KDCOptions *); |
| 838 | ASN1EXP int ASN1CALL copy_KDCOptions (const KDCOptions *, KDCOptions *); |
| 839 | ASN1EXP void ASN1CALL free_KDCOptions (KDCOptions *); |
| 840 | |
| 841 | |
| 842 | /* |
| 843 | LR-TYPE ::= INTEGER { |
| 844 | LR_NONE(0), |
| 845 | LR_INITIAL_TGT(1), |
| 846 | LR_INITIAL(2), |
| 847 | LR_ISSUE_USE_TGT(3), |
| 848 | LR_RENEWAL(4), |
| 849 | LR_REQUEST(5), |
| 850 | LR_PW_EXPTIME(6), |
| 851 | LR_ACCT_EXPTIME(7) |
| 852 | } |
| 853 | */ |
| 854 | |
| 855 | typedef enum LR_TYPE { |
| 856 | LR_NONE = 0, |
| 857 | LR_INITIAL_TGT = 1, |
| 858 | LR_INITIAL = 2, |
| 859 | LR_ISSUE_USE_TGT = 3, |
| 860 | LR_RENEWAL = 4, |
| 861 | LR_REQUEST = 5, |
| 862 | LR_PW_EXPTIME = 6, |
| 863 | LR_ACCT_EXPTIME = 7 |
| 864 | } LR_TYPE; |
| 865 | |
| 866 | ASN1EXP int ASN1CALL decode_LR_TYPE(const unsigned char *, size_t, LR_TYPE *, size_t *); |
| 867 | ASN1EXP int ASN1CALL encode_LR_TYPE(unsigned char *, size_t, const LR_TYPE *, size_t *); |
| 868 | ASN1EXP size_t ASN1CALL length_LR_TYPE(const LR_TYPE *); |
| 869 | ASN1EXP int ASN1CALL copy_LR_TYPE (const LR_TYPE *, LR_TYPE *); |
| 870 | ASN1EXP void ASN1CALL free_LR_TYPE (LR_TYPE *); |
| 871 | |
| 872 | |
| 873 | /* |
| 874 | LastReq ::= SEQUENCE OF SEQUENCE { |
| 875 | lr-type [0] LR-TYPE, |
| 876 | lr-value [1] KerberosTime, |
| 877 | } |
| 878 | */ |
| 879 | |
| 880 | typedef struct LastReq { |
| 881 | unsigned int len; |
| 882 | struct LastReq_val { |
| 883 | LR_TYPE lr_type; |
| 884 | KerberosTime lr_value; |
| 885 | } *val; |
| 886 | } LastReq; |
| 887 | |
| 888 | ASN1EXP int ASN1CALL decode_LastReq(const unsigned char *, size_t, LastReq *, size_t *); |
| 889 | ASN1EXP int ASN1CALL encode_LastReq(unsigned char *, size_t, const LastReq *, size_t *); |
| 890 | ASN1EXP size_t ASN1CALL length_LastReq(const LastReq *); |
| 891 | ASN1EXP int ASN1CALL copy_LastReq (const LastReq *, LastReq *); |
| 892 | ASN1EXP void ASN1CALL free_LastReq (LastReq *); |
| 893 | |
| 894 | |
| 895 | /* |
| 896 | EncryptedData ::= SEQUENCE { |
| 897 | etype [0] ENCTYPE, |
| 898 | kvno [1] krb5int32 OPTIONAL, |
| 899 | cipher [2] OCTET STRING, |
| 900 | } |
| 901 | */ |
| 902 | |
| 903 | typedef struct EncryptedData { |
| 904 | ENCTYPE etype; |
| 905 | krb5int32 *kvno; |
| 906 | heim_octet_string cipher; |
| 907 | } EncryptedData; |
| 908 | |
| 909 | ASN1EXP int ASN1CALL decode_EncryptedData(const unsigned char *, size_t, EncryptedData *, size_t *); |
| 910 | ASN1EXP int ASN1CALL encode_EncryptedData(unsigned char *, size_t, const EncryptedData *, size_t *); |
| 911 | ASN1EXP size_t ASN1CALL length_EncryptedData(const EncryptedData *); |
| 912 | ASN1EXP int ASN1CALL copy_EncryptedData (const EncryptedData *, EncryptedData *); |
| 913 | ASN1EXP void ASN1CALL free_EncryptedData (EncryptedData *); |
| 914 | |
| 915 | |
| 916 | /* |
| 917 | EncryptionKey ::= SEQUENCE { |
| 918 | keytype [0] krb5int32, |
| 919 | keyvalue [1] OCTET STRING, |
| 920 | } |
| 921 | */ |
| 922 | |
| 923 | typedef struct EncryptionKey { |
| 924 | krb5int32 keytype; |
| 925 | heim_octet_string keyvalue; |
| 926 | } EncryptionKey; |
| 927 | |
| 928 | ASN1EXP int ASN1CALL decode_EncryptionKey(const unsigned char *, size_t, EncryptionKey *, size_t *); |
| 929 | ASN1EXP int ASN1CALL encode_EncryptionKey(unsigned char *, size_t, const EncryptionKey *, size_t *); |
| 930 | ASN1EXP size_t ASN1CALL length_EncryptionKey(const EncryptionKey *); |
| 931 | ASN1EXP int ASN1CALL copy_EncryptionKey (const EncryptionKey *, EncryptionKey *); |
| 932 | ASN1EXP void ASN1CALL free_EncryptionKey (EncryptionKey *); |
| 933 | |
| 934 | |
| 935 | /* |
| 936 | TransitedEncoding ::= SEQUENCE { |
| 937 | tr-type [0] krb5int32, |
| 938 | contents [1] OCTET STRING, |
| 939 | } |
| 940 | */ |
| 941 | |
| 942 | typedef struct TransitedEncoding { |
| 943 | krb5int32 tr_type; |
| 944 | heim_octet_string contents; |
| 945 | } TransitedEncoding; |
| 946 | |
| 947 | ASN1EXP int ASN1CALL decode_TransitedEncoding(const unsigned char *, size_t, TransitedEncoding *, size_t *); |
| 948 | ASN1EXP int ASN1CALL encode_TransitedEncoding(unsigned char *, size_t, const TransitedEncoding *, size_t *); |
| 949 | ASN1EXP size_t ASN1CALL length_TransitedEncoding(const TransitedEncoding *); |
| 950 | ASN1EXP int ASN1CALL copy_TransitedEncoding (const TransitedEncoding *, TransitedEncoding *); |
| 951 | ASN1EXP void ASN1CALL free_TransitedEncoding (TransitedEncoding *); |
| 952 | |
| 953 | |
| 954 | /* |
| 955 | Ticket ::= [APPLICATION 1] SEQUENCE { |
| 956 | tkt-vno [0] krb5int32, |
| 957 | realm [1] Realm, |
| 958 | sname [2] PrincipalName, |
| 959 | enc-part [3] EncryptedData, |
| 960 | } |
| 961 | */ |
| 962 | |
| 963 | typedef struct Ticket { |
| 964 | krb5int32 tkt_vno; |
| 965 | Realm realm; |
| 966 | PrincipalName sname; |
| 967 | EncryptedData enc_part; |
| 968 | } Ticket; |
| 969 | |
| 970 | ASN1EXP int ASN1CALL decode_Ticket(const unsigned char *, size_t, Ticket *, size_t *); |
| 971 | ASN1EXP int ASN1CALL encode_Ticket(unsigned char *, size_t, const Ticket *, size_t *); |
| 972 | ASN1EXP size_t ASN1CALL length_Ticket(const Ticket *); |
| 973 | ASN1EXP int ASN1CALL copy_Ticket (const Ticket *, Ticket *); |
| 974 | ASN1EXP void ASN1CALL free_Ticket (Ticket *); |
| 975 | |
| 976 | |
| 977 | /* |
| 978 | EncTicketPart ::= [APPLICATION 3] SEQUENCE { |
| 979 | flags [0] TicketFlags, |
| 980 | key [1] EncryptionKey, |
| 981 | crealm [2] Realm, |
| 982 | cname [3] PrincipalName, |
| 983 | transited [4] TransitedEncoding, |
| 984 | authtime [5] KerberosTime, |
| 985 | starttime [6] KerberosTime OPTIONAL, |
| 986 | endtime [7] KerberosTime, |
| 987 | renew-till [8] KerberosTime OPTIONAL, |
| 988 | caddr [9] HostAddresses OPTIONAL, |
| 989 | authorization-data [10] AuthorizationData OPTIONAL, |
| 990 | } |
| 991 | */ |
| 992 | |
| 993 | typedef struct EncTicketPart { |
| 994 | TicketFlags flags; |
| 995 | EncryptionKey key; |
| 996 | Realm crealm; |
| 997 | PrincipalName cname; |
| 998 | TransitedEncoding transited; |
| 999 | KerberosTime authtime; |
| 1000 | KerberosTime *starttime; |
| 1001 | KerberosTime endtime; |
| 1002 | KerberosTime *renew_till; |
| 1003 | HostAddresses *caddr; |
| 1004 | AuthorizationData *authorization_data; |
| 1005 | } EncTicketPart; |
| 1006 | |
| 1007 | ASN1EXP int ASN1CALL decode_EncTicketPart(const unsigned char *, size_t, EncTicketPart *, size_t *); |
| 1008 | ASN1EXP int ASN1CALL encode_EncTicketPart(unsigned char *, size_t, const EncTicketPart *, size_t *); |
| 1009 | ASN1EXP size_t ASN1CALL length_EncTicketPart(const EncTicketPart *); |
| 1010 | ASN1EXP int ASN1CALL copy_EncTicketPart (const EncTicketPart *, EncTicketPart *); |
| 1011 | ASN1EXP void ASN1CALL free_EncTicketPart (EncTicketPart *); |
| 1012 | |
| 1013 | |
| 1014 | /* |
| 1015 | Checksum ::= SEQUENCE { |
| 1016 | cksumtype [0] CKSUMTYPE, |
| 1017 | checksum [1] OCTET STRING, |
| 1018 | } |
| 1019 | */ |
| 1020 | |
| 1021 | typedef struct Checksum { |
| 1022 | CKSUMTYPE cksumtype; |
| 1023 | heim_octet_string checksum; |
| 1024 | } Checksum; |
| 1025 | |
| 1026 | ASN1EXP int ASN1CALL decode_Checksum(const unsigned char *, size_t, Checksum *, size_t *); |
| 1027 | ASN1EXP int ASN1CALL encode_Checksum(unsigned char *, size_t, const Checksum *, size_t *); |
| 1028 | ASN1EXP size_t ASN1CALL length_Checksum(const Checksum *); |
| 1029 | ASN1EXP int ASN1CALL copy_Checksum (const Checksum *, Checksum *); |
| 1030 | ASN1EXP void ASN1CALL free_Checksum (Checksum *); |
| 1031 | |
| 1032 | |
| 1033 | /* |
| 1034 | Authenticator ::= [APPLICATION 2] SEQUENCE { |
| 1035 | authenticator-vno [0] krb5int32, |
| 1036 | crealm [1] Realm, |
| 1037 | cname [2] PrincipalName, |
| 1038 | cksum [3] Checksum OPTIONAL, |
| 1039 | cusec [4] krb5int32, |
| 1040 | ctime [5] KerberosTime, |
| 1041 | subkey [6] EncryptionKey OPTIONAL, |
| 1042 | seq-number [7] krb5uint32 OPTIONAL, |
| 1043 | authorization-data [8] AuthorizationData OPTIONAL, |
| 1044 | } |
| 1045 | */ |
| 1046 | |
| 1047 | typedef struct Authenticator { |
| 1048 | krb5int32 authenticator_vno; |
| 1049 | Realm crealm; |
| 1050 | PrincipalName cname; |
| 1051 | Checksum *cksum; |
| 1052 | krb5int32 cusec; |
| 1053 | KerberosTime ctime; |
| 1054 | EncryptionKey *subkey; |
| 1055 | krb5uint32 *seq_number; |
| 1056 | AuthorizationData *authorization_data; |
| 1057 | } Authenticator; |
| 1058 | |
| 1059 | ASN1EXP int ASN1CALL decode_Authenticator(const unsigned char *, size_t, Authenticator *, size_t *); |
| 1060 | ASN1EXP int ASN1CALL encode_Authenticator(unsigned char *, size_t, const Authenticator *, size_t *); |
| 1061 | ASN1EXP size_t ASN1CALL length_Authenticator(const Authenticator *); |
| 1062 | ASN1EXP int ASN1CALL copy_Authenticator (const Authenticator *, Authenticator *); |
| 1063 | ASN1EXP void ASN1CALL free_Authenticator (Authenticator *); |
| 1064 | |
| 1065 | |
| 1066 | /* |
| 1067 | PA-DATA ::= SEQUENCE { |
| 1068 | padata-type [1] PADATA-TYPE, |
| 1069 | padata-value [2] OCTET STRING, |
| 1070 | } |
| 1071 | */ |
| 1072 | |
| 1073 | typedef struct PA_DATA { |
| 1074 | PADATA_TYPE padata_type; |
| 1075 | heim_octet_string padata_value; |
| 1076 | } PA_DATA; |
| 1077 | |
| 1078 | ASN1EXP int ASN1CALL decode_PA_DATA(const unsigned char *, size_t, PA_DATA *, size_t *); |
| 1079 | ASN1EXP int ASN1CALL encode_PA_DATA(unsigned char *, size_t, const PA_DATA *, size_t *); |
| 1080 | ASN1EXP size_t ASN1CALL length_PA_DATA(const PA_DATA *); |
| 1081 | ASN1EXP int ASN1CALL copy_PA_DATA (const PA_DATA *, PA_DATA *); |
| 1082 | ASN1EXP void ASN1CALL free_PA_DATA (PA_DATA *); |
| 1083 | |
| 1084 | |
| 1085 | /* |
| 1086 | ETYPE-INFO-ENTRY ::= SEQUENCE { |
| 1087 | etype [0] ENCTYPE, |
| 1088 | salt [1] OCTET STRING OPTIONAL, |
| 1089 | salttype [2] krb5int32 OPTIONAL, |
| 1090 | } |
| 1091 | */ |
| 1092 | |
| 1093 | typedef struct ETYPE_INFO_ENTRY { |
| 1094 | ENCTYPE etype; |
| 1095 | heim_octet_string *salt; |
| 1096 | krb5int32 *salttype; |
| 1097 | } ETYPE_INFO_ENTRY; |
| 1098 | |
| 1099 | ASN1EXP int ASN1CALL decode_ETYPE_INFO_ENTRY(const unsigned char *, size_t, ETYPE_INFO_ENTRY *, size_t *); |
| 1100 | ASN1EXP int ASN1CALL encode_ETYPE_INFO_ENTRY(unsigned char *, size_t, const ETYPE_INFO_ENTRY *, size_t *); |
| 1101 | ASN1EXP size_t ASN1CALL length_ETYPE_INFO_ENTRY(const ETYPE_INFO_ENTRY *); |
| 1102 | ASN1EXP int ASN1CALL copy_ETYPE_INFO_ENTRY (const ETYPE_INFO_ENTRY *, ETYPE_INFO_ENTRY *); |
| 1103 | ASN1EXP void ASN1CALL free_ETYPE_INFO_ENTRY (ETYPE_INFO_ENTRY *); |
| 1104 | |
| 1105 | |
| 1106 | /* |
| 1107 | ETYPE-INFO ::= SEQUENCE OF ETYPE-INFO-ENTRY |
| 1108 | */ |
| 1109 | |
| 1110 | typedef struct ETYPE_INFO { |
| 1111 | unsigned int len; |
| 1112 | ETYPE_INFO_ENTRY *val; |
| 1113 | } ETYPE_INFO; |
| 1114 | |
| 1115 | ASN1EXP int ASN1CALL add_ETYPE_INFO (ETYPE_INFO *, const ETYPE_INFO_ENTRY *); |
| 1116 | ASN1EXP int ASN1CALL remove_ETYPE_INFO (ETYPE_INFO *, unsigned int); |
| 1117 | ASN1EXP int ASN1CALL decode_ETYPE_INFO(const unsigned char *, size_t, ETYPE_INFO *, size_t *); |
| 1118 | ASN1EXP int ASN1CALL encode_ETYPE_INFO(unsigned char *, size_t, const ETYPE_INFO *, size_t *); |
| 1119 | ASN1EXP size_t ASN1CALL length_ETYPE_INFO(const ETYPE_INFO *); |
| 1120 | ASN1EXP int ASN1CALL copy_ETYPE_INFO (const ETYPE_INFO *, ETYPE_INFO *); |
| 1121 | ASN1EXP void ASN1CALL free_ETYPE_INFO (ETYPE_INFO *); |
| 1122 | |
| 1123 | |
| 1124 | /* |
| 1125 | ETYPE-INFO2-ENTRY ::= SEQUENCE { |
| 1126 | etype [0] ENCTYPE, |
| 1127 | salt [1] KerberosString OPTIONAL, |
| 1128 | s2kparams [2] OCTET STRING OPTIONAL, |
| 1129 | } |
| 1130 | */ |
| 1131 | |
| 1132 | typedef struct ETYPE_INFO2_ENTRY { |
| 1133 | ENCTYPE etype; |
| 1134 | KerberosString *salt; |
| 1135 | heim_octet_string *s2kparams; |
| 1136 | } ETYPE_INFO2_ENTRY; |
| 1137 | |
| 1138 | ASN1EXP int ASN1CALL decode_ETYPE_INFO2_ENTRY(const unsigned char *, size_t, ETYPE_INFO2_ENTRY *, size_t *); |
| 1139 | ASN1EXP int ASN1CALL encode_ETYPE_INFO2_ENTRY(unsigned char *, size_t, const ETYPE_INFO2_ENTRY *, size_t *); |
| 1140 | ASN1EXP size_t ASN1CALL length_ETYPE_INFO2_ENTRY(const ETYPE_INFO2_ENTRY *); |
| 1141 | ASN1EXP int ASN1CALL copy_ETYPE_INFO2_ENTRY (const ETYPE_INFO2_ENTRY *, ETYPE_INFO2_ENTRY *); |
| 1142 | ASN1EXP void ASN1CALL free_ETYPE_INFO2_ENTRY (ETYPE_INFO2_ENTRY *); |
| 1143 | |
| 1144 | |
| 1145 | /* |
| 1146 | ETYPE-INFO2 ::= SEQUENCE OF ETYPE-INFO2-ENTRY |
| 1147 | */ |
| 1148 | |
| 1149 | typedef struct ETYPE_INFO2 { |
| 1150 | unsigned int len; |
| 1151 | ETYPE_INFO2_ENTRY *val; |
| 1152 | } ETYPE_INFO2; |
| 1153 | |
| 1154 | ASN1EXP int ASN1CALL add_ETYPE_INFO2 (ETYPE_INFO2 *, const ETYPE_INFO2_ENTRY *); |
| 1155 | ASN1EXP int ASN1CALL remove_ETYPE_INFO2 (ETYPE_INFO2 *, unsigned int); |
| 1156 | ASN1EXP int ASN1CALL decode_ETYPE_INFO2(const unsigned char *, size_t, ETYPE_INFO2 *, size_t *); |
| 1157 | ASN1EXP int ASN1CALL encode_ETYPE_INFO2(unsigned char *, size_t, const ETYPE_INFO2 *, size_t *); |
| 1158 | ASN1EXP size_t ASN1CALL length_ETYPE_INFO2(const ETYPE_INFO2 *); |
| 1159 | ASN1EXP int ASN1CALL copy_ETYPE_INFO2 (const ETYPE_INFO2 *, ETYPE_INFO2 *); |
| 1160 | ASN1EXP void ASN1CALL free_ETYPE_INFO2 (ETYPE_INFO2 *); |
| 1161 | |
| 1162 | |
| 1163 | /* |
| 1164 | METHOD-DATA ::= SEQUENCE OF PA-DATA |
| 1165 | */ |
| 1166 | |
| 1167 | typedef struct METHOD_DATA { |
| 1168 | unsigned int len; |
| 1169 | PA_DATA *val; |
| 1170 | } METHOD_DATA; |
| 1171 | |
| 1172 | ASN1EXP int ASN1CALL add_METHOD_DATA (METHOD_DATA *, const PA_DATA *); |
| 1173 | ASN1EXP int ASN1CALL remove_METHOD_DATA (METHOD_DATA *, unsigned int); |
| 1174 | ASN1EXP int ASN1CALL decode_METHOD_DATA(const unsigned char *, size_t, METHOD_DATA *, size_t *); |
| 1175 | ASN1EXP int ASN1CALL encode_METHOD_DATA(unsigned char *, size_t, const METHOD_DATA *, size_t *); |
| 1176 | ASN1EXP size_t ASN1CALL length_METHOD_DATA(const METHOD_DATA *); |
| 1177 | ASN1EXP int ASN1CALL copy_METHOD_DATA (const METHOD_DATA *, METHOD_DATA *); |
| 1178 | ASN1EXP void ASN1CALL free_METHOD_DATA (METHOD_DATA *); |
| 1179 | |
| 1180 | |
| 1181 | /* |
| 1182 | TypedData ::= SEQUENCE { |
| 1183 | data-type [0] krb5int32, |
| 1184 | data-value [1] OCTET STRING OPTIONAL, |
| 1185 | } |
| 1186 | */ |
| 1187 | |
| 1188 | typedef struct TypedData { |
| 1189 | krb5int32 data_type; |
| 1190 | heim_octet_string *data_value; |
| 1191 | } TypedData; |
| 1192 | |
| 1193 | ASN1EXP int ASN1CALL decode_TypedData(const unsigned char *, size_t, TypedData *, size_t *); |
| 1194 | ASN1EXP int ASN1CALL encode_TypedData(unsigned char *, size_t, const TypedData *, size_t *); |
| 1195 | ASN1EXP size_t ASN1CALL length_TypedData(const TypedData *); |
| 1196 | ASN1EXP int ASN1CALL copy_TypedData (const TypedData *, TypedData *); |
| 1197 | ASN1EXP void ASN1CALL free_TypedData (TypedData *); |
| 1198 | |
| 1199 | |
| 1200 | /* |
| 1201 | TYPED-DATA ::= SEQUENCE OF TypedData |
| 1202 | */ |
| 1203 | |
| 1204 | typedef struct TYPED_DATA { |
| 1205 | unsigned int len; |
| 1206 | TypedData *val; |
| 1207 | } TYPED_DATA; |
| 1208 | |
| 1209 | /* |
| 1210 | KDC-REQ-BODY ::= SEQUENCE { |
| 1211 | kdc-options [0] KDCOptions, |
| 1212 | cname [1] PrincipalName OPTIONAL, |
| 1213 | realm [2] Realm, |
| 1214 | sname [3] PrincipalName OPTIONAL, |
| 1215 | from [4] KerberosTime OPTIONAL, |
| 1216 | till [5] KerberosTime OPTIONAL, |
| 1217 | rtime [6] KerberosTime OPTIONAL, |
| 1218 | nonce [7] krb5int32, |
| 1219 | etype [8] SEQUENCE OF ENCTYPE, |
| 1220 | addresses [9] HostAddresses OPTIONAL, |
| 1221 | enc-authorization-data [10] EncryptedData OPTIONAL, |
| 1222 | additional-tickets [11] SEQUENCE OF Ticket OPTIONAL, |
| 1223 | } |
| 1224 | */ |
| 1225 | |
| 1226 | typedef struct KDC_REQ_BODY { |
| 1227 | KDCOptions kdc_options; |
| 1228 | PrincipalName *cname; |
| 1229 | Realm realm; |
| 1230 | PrincipalName *sname; |
| 1231 | KerberosTime *from; |
| 1232 | KerberosTime *till; |
| 1233 | KerberosTime *rtime; |
| 1234 | krb5int32 nonce; |
| 1235 | struct KDC_REQ_BODY_etype { |
| 1236 | unsigned int len; |
| 1237 | ENCTYPE *val; |
| 1238 | } etype; |
| 1239 | HostAddresses *addresses; |
| 1240 | EncryptedData *enc_authorization_data; |
| 1241 | struct KDC_REQ_BODY_additional_tickets { |
| 1242 | unsigned int len; |
| 1243 | Ticket *val; |
| 1244 | } *additional_tickets; |
| 1245 | } KDC_REQ_BODY; |
| 1246 | |
| 1247 | ASN1EXP int ASN1CALL decode_KDC_REQ_BODY(const unsigned char *, size_t, KDC_REQ_BODY *, size_t *); |
| 1248 | ASN1EXP int ASN1CALL encode_KDC_REQ_BODY(unsigned char *, size_t, const KDC_REQ_BODY *, size_t *); |
| 1249 | ASN1EXP size_t ASN1CALL length_KDC_REQ_BODY(const KDC_REQ_BODY *); |
| 1250 | ASN1EXP int ASN1CALL copy_KDC_REQ_BODY (const KDC_REQ_BODY *, KDC_REQ_BODY *); |
| 1251 | ASN1EXP void ASN1CALL free_KDC_REQ_BODY (KDC_REQ_BODY *); |
| 1252 | |
| 1253 | |
| 1254 | /* |
| 1255 | KDC-REQ ::= SEQUENCE { |
| 1256 | pvno [1] krb5int32, |
| 1257 | msg-type [2] MESSAGE-TYPE, |
| 1258 | padata [3] METHOD-DATA OPTIONAL, |
| 1259 | req-body [4] KDC-REQ-BODY, |
| 1260 | } |
| 1261 | */ |
| 1262 | |
| 1263 | typedef struct KDC_REQ { |
| 1264 | krb5int32 pvno; |
| 1265 | MESSAGE_TYPE msg_type; |
| 1266 | METHOD_DATA *padata; |
| 1267 | KDC_REQ_BODY req_body; |
| 1268 | } KDC_REQ; |
| 1269 | |
| 1270 | /* |
| 1271 | AS-REQ ::= [APPLICATION 10] KDC-REQ |
| 1272 | */ |
| 1273 | |
| 1274 | typedef KDC_REQ AS_REQ; |
| 1275 | |
| 1276 | ASN1EXP int ASN1CALL decode_AS_REQ(const unsigned char *, size_t, AS_REQ *, size_t *); |
| 1277 | ASN1EXP int ASN1CALL encode_AS_REQ(unsigned char *, size_t, const AS_REQ *, size_t *); |
| 1278 | ASN1EXP size_t ASN1CALL length_AS_REQ(const AS_REQ *); |
| 1279 | ASN1EXP int ASN1CALL copy_AS_REQ (const AS_REQ *, AS_REQ *); |
| 1280 | ASN1EXP void ASN1CALL free_AS_REQ (AS_REQ *); |
| 1281 | |
| 1282 | |
| 1283 | /* |
| 1284 | TGS-REQ ::= [APPLICATION 12] KDC-REQ |
| 1285 | */ |
| 1286 | |
| 1287 | typedef KDC_REQ TGS_REQ; |
| 1288 | |
| 1289 | ASN1EXP int ASN1CALL decode_TGS_REQ(const unsigned char *, size_t, TGS_REQ *, size_t *); |
| 1290 | ASN1EXP int ASN1CALL encode_TGS_REQ(unsigned char *, size_t, const TGS_REQ *, size_t *); |
| 1291 | ASN1EXP size_t ASN1CALL length_TGS_REQ(const TGS_REQ *); |
| 1292 | ASN1EXP int ASN1CALL copy_TGS_REQ (const TGS_REQ *, TGS_REQ *); |
| 1293 | ASN1EXP void ASN1CALL free_TGS_REQ (TGS_REQ *); |
| 1294 | |
| 1295 | |
| 1296 | /* |
| 1297 | PA-ENC-TS-ENC ::= SEQUENCE { |
| 1298 | patimestamp [0] KerberosTime, |
| 1299 | pausec [1] krb5int32 OPTIONAL, |
| 1300 | } |
| 1301 | */ |
| 1302 | |
| 1303 | typedef struct PA_ENC_TS_ENC { |
| 1304 | KerberosTime patimestamp; |
| 1305 | krb5int32 *pausec; |
| 1306 | } PA_ENC_TS_ENC; |
| 1307 | |
| 1308 | ASN1EXP int ASN1CALL decode_PA_ENC_TS_ENC(const unsigned char *, size_t, PA_ENC_TS_ENC *, size_t *); |
| 1309 | ASN1EXP int ASN1CALL encode_PA_ENC_TS_ENC(unsigned char *, size_t, const PA_ENC_TS_ENC *, size_t *); |
| 1310 | ASN1EXP size_t ASN1CALL length_PA_ENC_TS_ENC(const PA_ENC_TS_ENC *); |
| 1311 | ASN1EXP int ASN1CALL copy_PA_ENC_TS_ENC (const PA_ENC_TS_ENC *, PA_ENC_TS_ENC *); |
| 1312 | ASN1EXP void ASN1CALL free_PA_ENC_TS_ENC (PA_ENC_TS_ENC *); |
| 1313 | |
| 1314 | |
| 1315 | /* |
| 1316 | PA-PAC-REQUEST ::= SEQUENCE { |
| 1317 | include-pac [0] BOOLEAN, |
| 1318 | } |
| 1319 | */ |
| 1320 | |
| 1321 | typedef struct PA_PAC_REQUEST { |
| 1322 | int include_pac; |
| 1323 | } PA_PAC_REQUEST; |
| 1324 | |
| 1325 | ASN1EXP int ASN1CALL decode_PA_PAC_REQUEST(const unsigned char *, size_t, PA_PAC_REQUEST *, size_t *); |
| 1326 | ASN1EXP int ASN1CALL encode_PA_PAC_REQUEST(unsigned char *, size_t, const PA_PAC_REQUEST *, size_t *); |
| 1327 | ASN1EXP size_t ASN1CALL length_PA_PAC_REQUEST(const PA_PAC_REQUEST *); |
| 1328 | ASN1EXP int ASN1CALL copy_PA_PAC_REQUEST (const PA_PAC_REQUEST *, PA_PAC_REQUEST *); |
| 1329 | ASN1EXP void ASN1CALL free_PA_PAC_REQUEST (PA_PAC_REQUEST *); |
| 1330 | |
| 1331 | |
| 1332 | /* |
| 1333 | PROV-SRV-LOCATION ::= GeneralString |
| 1334 | */ |
| 1335 | |
| 1336 | typedef heim_general_string PROV_SRV_LOCATION; |
| 1337 | |
| 1338 | /* |
| 1339 | KDC-REP ::= SEQUENCE { |
| 1340 | pvno [0] krb5int32, |
| 1341 | msg-type [1] MESSAGE-TYPE, |
| 1342 | padata [2] METHOD-DATA OPTIONAL, |
| 1343 | crealm [3] Realm, |
| 1344 | cname [4] PrincipalName, |
| 1345 | ticket [5] Ticket, |
| 1346 | enc-part [6] EncryptedData, |
| 1347 | } |
| 1348 | */ |
| 1349 | |
| 1350 | typedef struct KDC_REP { |
| 1351 | krb5int32 pvno; |
| 1352 | MESSAGE_TYPE msg_type; |
| 1353 | METHOD_DATA *padata; |
| 1354 | Realm crealm; |
| 1355 | PrincipalName cname; |
| 1356 | Ticket ticket; |
| 1357 | EncryptedData enc_part; |
| 1358 | } KDC_REP; |
| 1359 | |
| 1360 | ASN1EXP int ASN1CALL decode_KDC_REP(const unsigned char *, size_t, KDC_REP *, size_t *); |
| 1361 | ASN1EXP int ASN1CALL encode_KDC_REP(unsigned char *, size_t, const KDC_REP *, size_t *); |
| 1362 | ASN1EXP size_t ASN1CALL length_KDC_REP(const KDC_REP *); |
| 1363 | ASN1EXP int ASN1CALL copy_KDC_REP (const KDC_REP *, KDC_REP *); |
| 1364 | ASN1EXP void ASN1CALL free_KDC_REP (KDC_REP *); |
| 1365 | |
| 1366 | |
| 1367 | /* |
| 1368 | AS-REP ::= [APPLICATION 11] KDC-REP |
| 1369 | */ |
| 1370 | |
| 1371 | typedef KDC_REP AS_REP; |
| 1372 | |
| 1373 | ASN1EXP int ASN1CALL decode_AS_REP(const unsigned char *, size_t, AS_REP *, size_t *); |
| 1374 | ASN1EXP int ASN1CALL encode_AS_REP(unsigned char *, size_t, const AS_REP *, size_t *); |
| 1375 | ASN1EXP size_t ASN1CALL length_AS_REP(const AS_REP *); |
| 1376 | ASN1EXP int ASN1CALL copy_AS_REP (const AS_REP *, AS_REP *); |
| 1377 | ASN1EXP void ASN1CALL free_AS_REP (AS_REP *); |
| 1378 | |
| 1379 | |
| 1380 | /* |
| 1381 | TGS-REP ::= [APPLICATION 13] KDC-REP |
| 1382 | */ |
| 1383 | |
| 1384 | typedef KDC_REP TGS_REP; |
| 1385 | |
| 1386 | ASN1EXP int ASN1CALL decode_TGS_REP(const unsigned char *, size_t, TGS_REP *, size_t *); |
| 1387 | ASN1EXP int ASN1CALL encode_TGS_REP(unsigned char *, size_t, const TGS_REP *, size_t *); |
| 1388 | ASN1EXP size_t ASN1CALL length_TGS_REP(const TGS_REP *); |
| 1389 | ASN1EXP int ASN1CALL copy_TGS_REP (const TGS_REP *, TGS_REP *); |
| 1390 | ASN1EXP void ASN1CALL free_TGS_REP (TGS_REP *); |
| 1391 | |
| 1392 | |
| 1393 | /* |
| 1394 | EncKDCRepPart ::= SEQUENCE { |
| 1395 | key [0] EncryptionKey, |
| 1396 | last-req [1] LastReq, |
| 1397 | nonce [2] krb5int32, |
| 1398 | key-expiration [3] KerberosTime OPTIONAL, |
| 1399 | flags [4] TicketFlags, |
| 1400 | authtime [5] KerberosTime, |
| 1401 | starttime [6] KerberosTime OPTIONAL, |
| 1402 | endtime [7] KerberosTime, |
| 1403 | renew-till [8] KerberosTime OPTIONAL, |
| 1404 | srealm [9] Realm, |
| 1405 | sname [10] PrincipalName, |
| 1406 | caddr [11] HostAddresses OPTIONAL, |
| 1407 | encrypted-pa-data [12] METHOD-DATA OPTIONAL, |
| 1408 | } |
| 1409 | */ |
| 1410 | |
| 1411 | typedef struct EncKDCRepPart { |
| 1412 | EncryptionKey key; |
| 1413 | LastReq last_req; |
| 1414 | krb5int32 nonce; |
| 1415 | KerberosTime *key_expiration; |
| 1416 | TicketFlags flags; |
| 1417 | KerberosTime authtime; |
| 1418 | KerberosTime *starttime; |
| 1419 | KerberosTime endtime; |
| 1420 | KerberosTime *renew_till; |
| 1421 | Realm srealm; |
| 1422 | PrincipalName sname; |
| 1423 | HostAddresses *caddr; |
| 1424 | METHOD_DATA *encrypted_pa_data; |
| 1425 | } EncKDCRepPart; |
| 1426 | |
| 1427 | ASN1EXP int ASN1CALL decode_EncKDCRepPart(const unsigned char *, size_t, EncKDCRepPart *, size_t *); |
| 1428 | ASN1EXP int ASN1CALL encode_EncKDCRepPart(unsigned char *, size_t, const EncKDCRepPart *, size_t *); |
| 1429 | ASN1EXP size_t ASN1CALL length_EncKDCRepPart(const EncKDCRepPart *); |
| 1430 | ASN1EXP int ASN1CALL copy_EncKDCRepPart (const EncKDCRepPart *, EncKDCRepPart *); |
| 1431 | ASN1EXP void ASN1CALL free_EncKDCRepPart (EncKDCRepPart *); |
| 1432 | |
| 1433 | |
| 1434 | /* |
| 1435 | EncASRepPart ::= [APPLICATION 25] EncKDCRepPart |
| 1436 | */ |
| 1437 | |
| 1438 | typedef EncKDCRepPart EncASRepPart; |
| 1439 | |
| 1440 | ASN1EXP int ASN1CALL decode_EncASRepPart(const unsigned char *, size_t, EncASRepPart *, size_t *); |
| 1441 | ASN1EXP int ASN1CALL encode_EncASRepPart(unsigned char *, size_t, const EncASRepPart *, size_t *); |
| 1442 | ASN1EXP size_t ASN1CALL length_EncASRepPart(const EncASRepPart *); |
| 1443 | ASN1EXP int ASN1CALL copy_EncASRepPart (const EncASRepPart *, EncASRepPart *); |
| 1444 | ASN1EXP void ASN1CALL free_EncASRepPart (EncASRepPart *); |
| 1445 | |
| 1446 | |
| 1447 | /* |
| 1448 | EncTGSRepPart ::= [APPLICATION 26] EncKDCRepPart |
| 1449 | */ |
| 1450 | |
| 1451 | typedef EncKDCRepPart EncTGSRepPart; |
| 1452 | |
| 1453 | ASN1EXP int ASN1CALL decode_EncTGSRepPart(const unsigned char *, size_t, EncTGSRepPart *, size_t *); |
| 1454 | ASN1EXP int ASN1CALL encode_EncTGSRepPart(unsigned char *, size_t, const EncTGSRepPart *, size_t *); |
| 1455 | ASN1EXP size_t ASN1CALL length_EncTGSRepPart(const EncTGSRepPart *); |
| 1456 | ASN1EXP int ASN1CALL copy_EncTGSRepPart (const EncTGSRepPart *, EncTGSRepPart *); |
| 1457 | ASN1EXP void ASN1CALL free_EncTGSRepPart (EncTGSRepPart *); |
| 1458 | |
| 1459 | |
| 1460 | /* |
| 1461 | AP-REQ ::= [APPLICATION 14] SEQUENCE { |
| 1462 | pvno [0] krb5int32, |
| 1463 | msg-type [1] MESSAGE-TYPE, |
| 1464 | ap-options [2] APOptions, |
| 1465 | ticket [3] Ticket, |
| 1466 | authenticator [4] EncryptedData, |
| 1467 | } |
| 1468 | */ |
| 1469 | |
| 1470 | typedef struct AP_REQ { |
| 1471 | krb5int32 pvno; |
| 1472 | MESSAGE_TYPE msg_type; |
| 1473 | APOptions ap_options; |
| 1474 | Ticket ticket; |
| 1475 | EncryptedData authenticator; |
| 1476 | } AP_REQ; |
| 1477 | |
| 1478 | ASN1EXP int ASN1CALL decode_AP_REQ(const unsigned char *, size_t, AP_REQ *, size_t *); |
| 1479 | ASN1EXP int ASN1CALL encode_AP_REQ(unsigned char *, size_t, const AP_REQ *, size_t *); |
| 1480 | ASN1EXP size_t ASN1CALL length_AP_REQ(const AP_REQ *); |
| 1481 | ASN1EXP int ASN1CALL copy_AP_REQ (const AP_REQ *, AP_REQ *); |
| 1482 | ASN1EXP void ASN1CALL free_AP_REQ (AP_REQ *); |
| 1483 | |
| 1484 | |
| 1485 | /* |
| 1486 | AP-REP ::= [APPLICATION 15] SEQUENCE { |
| 1487 | pvno [0] krb5int32, |
| 1488 | msg-type [1] MESSAGE-TYPE, |
| 1489 | enc-part [2] EncryptedData, |
| 1490 | } |
| 1491 | */ |
| 1492 | |
| 1493 | typedef struct AP_REP { |
| 1494 | krb5int32 pvno; |
| 1495 | MESSAGE_TYPE msg_type; |
| 1496 | EncryptedData enc_part; |
| 1497 | } AP_REP; |
| 1498 | |
| 1499 | ASN1EXP int ASN1CALL decode_AP_REP(const unsigned char *, size_t, AP_REP *, size_t *); |
| 1500 | ASN1EXP int ASN1CALL encode_AP_REP(unsigned char *, size_t, const AP_REP *, size_t *); |
| 1501 | ASN1EXP size_t ASN1CALL length_AP_REP(const AP_REP *); |
| 1502 | ASN1EXP int ASN1CALL copy_AP_REP (const AP_REP *, AP_REP *); |
| 1503 | ASN1EXP void ASN1CALL free_AP_REP (AP_REP *); |
| 1504 | |
| 1505 | |
| 1506 | /* |
| 1507 | EncAPRepPart ::= [APPLICATION 27] SEQUENCE { |
| 1508 | ctime [0] KerberosTime, |
| 1509 | cusec [1] krb5int32, |
| 1510 | subkey [2] EncryptionKey OPTIONAL, |
| 1511 | seq-number [3] krb5uint32 OPTIONAL, |
| 1512 | } |
| 1513 | */ |
| 1514 | |
| 1515 | typedef struct EncAPRepPart { |
| 1516 | KerberosTime ctime; |
| 1517 | krb5int32 cusec; |
| 1518 | EncryptionKey *subkey; |
| 1519 | krb5uint32 *seq_number; |
| 1520 | } EncAPRepPart; |
| 1521 | |
| 1522 | ASN1EXP int ASN1CALL decode_EncAPRepPart(const unsigned char *, size_t, EncAPRepPart *, size_t *); |
| 1523 | ASN1EXP int ASN1CALL encode_EncAPRepPart(unsigned char *, size_t, const EncAPRepPart *, size_t *); |
| 1524 | ASN1EXP size_t ASN1CALL length_EncAPRepPart(const EncAPRepPart *); |
| 1525 | ASN1EXP int ASN1CALL copy_EncAPRepPart (const EncAPRepPart *, EncAPRepPart *); |
| 1526 | ASN1EXP void ASN1CALL free_EncAPRepPart (EncAPRepPart *); |
| 1527 | |
| 1528 | |
| 1529 | /* |
| 1530 | KRB-SAFE-BODY ::= SEQUENCE { |
| 1531 | user-data [0] OCTET STRING, |
| 1532 | timestamp [1] KerberosTime OPTIONAL, |
| 1533 | usec [2] krb5int32 OPTIONAL, |
| 1534 | seq-number [3] krb5uint32 OPTIONAL, |
| 1535 | s-address [4] HostAddress OPTIONAL, |
| 1536 | r-address [5] HostAddress OPTIONAL, |
| 1537 | } |
| 1538 | */ |
| 1539 | |
| 1540 | typedef struct KRB_SAFE_BODY { |
| 1541 | heim_octet_string user_data; |
| 1542 | KerberosTime *timestamp; |
| 1543 | krb5int32 *usec; |
| 1544 | krb5uint32 *seq_number; |
| 1545 | HostAddress *s_address; |
| 1546 | HostAddress *r_address; |
| 1547 | } KRB_SAFE_BODY; |
| 1548 | |
| 1549 | ASN1EXP int ASN1CALL decode_KRB_SAFE_BODY(const unsigned char *, size_t, KRB_SAFE_BODY *, size_t *); |
| 1550 | ASN1EXP int ASN1CALL encode_KRB_SAFE_BODY(unsigned char *, size_t, const KRB_SAFE_BODY *, size_t *); |
| 1551 | ASN1EXP size_t ASN1CALL length_KRB_SAFE_BODY(const KRB_SAFE_BODY *); |
| 1552 | ASN1EXP int ASN1CALL copy_KRB_SAFE_BODY (const KRB_SAFE_BODY *, KRB_SAFE_BODY *); |
| 1553 | ASN1EXP void ASN1CALL free_KRB_SAFE_BODY (KRB_SAFE_BODY *); |
| 1554 | |
| 1555 | |
| 1556 | /* |
| 1557 | KRB-SAFE ::= [APPLICATION 20] SEQUENCE { |
| 1558 | pvno [0] krb5int32, |
| 1559 | msg-type [1] MESSAGE-TYPE, |
| 1560 | safe-body [2] KRB-SAFE-BODY, |
| 1561 | cksum [3] Checksum, |
| 1562 | } |
| 1563 | */ |
| 1564 | |
| 1565 | typedef struct KRB_SAFE { |
| 1566 | krb5int32 pvno; |
| 1567 | MESSAGE_TYPE msg_type; |
| 1568 | KRB_SAFE_BODY safe_body; |
| 1569 | Checksum cksum; |
| 1570 | } KRB_SAFE; |
| 1571 | |
| 1572 | ASN1EXP int ASN1CALL decode_KRB_SAFE(const unsigned char *, size_t, KRB_SAFE *, size_t *); |
| 1573 | ASN1EXP int ASN1CALL encode_KRB_SAFE(unsigned char *, size_t, const KRB_SAFE *, size_t *); |
| 1574 | ASN1EXP size_t ASN1CALL length_KRB_SAFE(const KRB_SAFE *); |
| 1575 | ASN1EXP int ASN1CALL copy_KRB_SAFE (const KRB_SAFE *, KRB_SAFE *); |
| 1576 | ASN1EXP void ASN1CALL free_KRB_SAFE (KRB_SAFE *); |
| 1577 | |
| 1578 | |
| 1579 | /* |
| 1580 | KRB-PRIV ::= [APPLICATION 21] SEQUENCE { |
| 1581 | pvno [0] krb5int32, |
| 1582 | msg-type [1] MESSAGE-TYPE, |
| 1583 | enc-part [3] EncryptedData, |
| 1584 | } |
| 1585 | */ |
| 1586 | |
| 1587 | typedef struct KRB_PRIV { |
| 1588 | krb5int32 pvno; |
| 1589 | MESSAGE_TYPE msg_type; |
| 1590 | EncryptedData enc_part; |
| 1591 | } KRB_PRIV; |
| 1592 | |
| 1593 | ASN1EXP int ASN1CALL decode_KRB_PRIV(const unsigned char *, size_t, KRB_PRIV *, size_t *); |
| 1594 | ASN1EXP int ASN1CALL encode_KRB_PRIV(unsigned char *, size_t, const KRB_PRIV *, size_t *); |
| 1595 | ASN1EXP size_t ASN1CALL length_KRB_PRIV(const KRB_PRIV *); |
| 1596 | ASN1EXP int ASN1CALL copy_KRB_PRIV (const KRB_PRIV *, KRB_PRIV *); |
| 1597 | ASN1EXP void ASN1CALL free_KRB_PRIV (KRB_PRIV *); |
| 1598 | |
| 1599 | |
| 1600 | /* |
| 1601 | EncKrbPrivPart ::= [APPLICATION 28] SEQUENCE { |
| 1602 | user-data [0] OCTET STRING, |
| 1603 | timestamp [1] KerberosTime OPTIONAL, |
| 1604 | usec [2] krb5int32 OPTIONAL, |
| 1605 | seq-number [3] krb5uint32 OPTIONAL, |
| 1606 | s-address [4] HostAddress OPTIONAL, |
| 1607 | r-address [5] HostAddress OPTIONAL, |
| 1608 | } |
| 1609 | */ |
| 1610 | |
| 1611 | typedef struct EncKrbPrivPart { |
| 1612 | heim_octet_string user_data; |
| 1613 | KerberosTime *timestamp; |
| 1614 | krb5int32 *usec; |
| 1615 | krb5uint32 *seq_number; |
| 1616 | HostAddress *s_address; |
| 1617 | HostAddress *r_address; |
| 1618 | } EncKrbPrivPart; |
| 1619 | |
| 1620 | ASN1EXP int ASN1CALL decode_EncKrbPrivPart(const unsigned char *, size_t, EncKrbPrivPart *, size_t *); |
| 1621 | ASN1EXP int ASN1CALL encode_EncKrbPrivPart(unsigned char *, size_t, const EncKrbPrivPart *, size_t *); |
| 1622 | ASN1EXP size_t ASN1CALL length_EncKrbPrivPart(const EncKrbPrivPart *); |
| 1623 | ASN1EXP int ASN1CALL copy_EncKrbPrivPart (const EncKrbPrivPart *, EncKrbPrivPart *); |
| 1624 | ASN1EXP void ASN1CALL free_EncKrbPrivPart (EncKrbPrivPart *); |
| 1625 | |
| 1626 | |
| 1627 | /* |
| 1628 | KRB-CRED ::= [APPLICATION 22] SEQUENCE { |
| 1629 | pvno [0] krb5int32, |
| 1630 | msg-type [1] MESSAGE-TYPE, |
| 1631 | tickets [2] SEQUENCE OF Ticket, |
| 1632 | enc-part [3] EncryptedData, |
| 1633 | } |
| 1634 | */ |
| 1635 | |
| 1636 | typedef struct KRB_CRED { |
| 1637 | krb5int32 pvno; |
| 1638 | MESSAGE_TYPE msg_type; |
| 1639 | struct KRB_CRED_tickets { |
| 1640 | unsigned int len; |
| 1641 | Ticket *val; |
| 1642 | } tickets; |
| 1643 | EncryptedData enc_part; |
| 1644 | } KRB_CRED; |
| 1645 | |
| 1646 | ASN1EXP int ASN1CALL decode_KRB_CRED(const unsigned char *, size_t, KRB_CRED *, size_t *); |
| 1647 | ASN1EXP int ASN1CALL encode_KRB_CRED(unsigned char *, size_t, const KRB_CRED *, size_t *); |
| 1648 | ASN1EXP size_t ASN1CALL length_KRB_CRED(const KRB_CRED *); |
| 1649 | ASN1EXP int ASN1CALL copy_KRB_CRED (const KRB_CRED *, KRB_CRED *); |
| 1650 | ASN1EXP void ASN1CALL free_KRB_CRED (KRB_CRED *); |
| 1651 | |
| 1652 | |
| 1653 | /* |
| 1654 | KrbCredInfo ::= SEQUENCE { |
| 1655 | key [0] EncryptionKey, |
| 1656 | prealm [1] Realm OPTIONAL, |
| 1657 | pname [2] PrincipalName OPTIONAL, |
| 1658 | flags [3] TicketFlags OPTIONAL, |
| 1659 | authtime [4] KerberosTime OPTIONAL, |
| 1660 | starttime [5] KerberosTime OPTIONAL, |
| 1661 | endtime [6] KerberosTime OPTIONAL, |
| 1662 | renew-till [7] KerberosTime OPTIONAL, |
| 1663 | srealm [8] Realm OPTIONAL, |
| 1664 | sname [9] PrincipalName OPTIONAL, |
| 1665 | caddr [10] HostAddresses OPTIONAL, |
| 1666 | } |
| 1667 | */ |
| 1668 | |
| 1669 | typedef struct KrbCredInfo { |
| 1670 | EncryptionKey key; |
| 1671 | Realm *prealm; |
| 1672 | PrincipalName *pname; |
| 1673 | TicketFlags *flags; |
| 1674 | KerberosTime *authtime; |
| 1675 | KerberosTime *starttime; |
| 1676 | KerberosTime *endtime; |
| 1677 | KerberosTime *renew_till; |
| 1678 | Realm *srealm; |
| 1679 | PrincipalName *sname; |
| 1680 | HostAddresses *caddr; |
| 1681 | } KrbCredInfo; |
| 1682 | |
| 1683 | ASN1EXP int ASN1CALL decode_KrbCredInfo(const unsigned char *, size_t, KrbCredInfo *, size_t *); |
| 1684 | ASN1EXP int ASN1CALL encode_KrbCredInfo(unsigned char *, size_t, const KrbCredInfo *, size_t *); |
| 1685 | ASN1EXP size_t ASN1CALL length_KrbCredInfo(const KrbCredInfo *); |
| 1686 | ASN1EXP int ASN1CALL copy_KrbCredInfo (const KrbCredInfo *, KrbCredInfo *); |
| 1687 | ASN1EXP void ASN1CALL free_KrbCredInfo (KrbCredInfo *); |
| 1688 | |
| 1689 | |
| 1690 | /* |
| 1691 | EncKrbCredPart ::= [APPLICATION 29] SEQUENCE { |
| 1692 | ticket-info [0] SEQUENCE OF KrbCredInfo, |
| 1693 | nonce [1] krb5int32 OPTIONAL, |
| 1694 | timestamp [2] KerberosTime OPTIONAL, |
| 1695 | usec [3] krb5int32 OPTIONAL, |
| 1696 | s-address [4] HostAddress OPTIONAL, |
| 1697 | r-address [5] HostAddress OPTIONAL, |
| 1698 | } |
| 1699 | */ |
| 1700 | |
| 1701 | typedef struct EncKrbCredPart { |
| 1702 | struct EncKrbCredPart_ticket_info { |
| 1703 | unsigned int len; |
| 1704 | KrbCredInfo *val; |
| 1705 | } ticket_info; |
| 1706 | krb5int32 *nonce; |
| 1707 | KerberosTime *timestamp; |
| 1708 | krb5int32 *usec; |
| 1709 | HostAddress *s_address; |
| 1710 | HostAddress *r_address; |
| 1711 | } EncKrbCredPart; |
| 1712 | |
| 1713 | ASN1EXP int ASN1CALL decode_EncKrbCredPart(const unsigned char *, size_t, EncKrbCredPart *, size_t *); |
| 1714 | ASN1EXP int ASN1CALL encode_EncKrbCredPart(unsigned char *, size_t, const EncKrbCredPart *, size_t *); |
| 1715 | ASN1EXP size_t ASN1CALL length_EncKrbCredPart(const EncKrbCredPart *); |
| 1716 | ASN1EXP int ASN1CALL copy_EncKrbCredPart (const EncKrbCredPart *, EncKrbCredPart *); |
| 1717 | ASN1EXP void ASN1CALL free_EncKrbCredPart (EncKrbCredPart *); |
| 1718 | |
| 1719 | |
| 1720 | /* |
| 1721 | KRB-ERROR ::= [APPLICATION 30] SEQUENCE { |
| 1722 | pvno [0] krb5int32, |
| 1723 | msg-type [1] MESSAGE-TYPE, |
| 1724 | ctime [2] KerberosTime OPTIONAL, |
| 1725 | cusec [3] krb5int32 OPTIONAL, |
| 1726 | stime [4] KerberosTime, |
| 1727 | susec [5] krb5int32, |
| 1728 | error-code [6] krb5int32, |
| 1729 | crealm [7] Realm OPTIONAL, |
| 1730 | cname [8] PrincipalName OPTIONAL, |
| 1731 | realm [9] Realm, |
| 1732 | sname [10] PrincipalName, |
| 1733 | e-text [11] GeneralString OPTIONAL, |
| 1734 | e-data [12] OCTET STRING OPTIONAL, |
| 1735 | } |
| 1736 | */ |
| 1737 | |
| 1738 | typedef struct KRB_ERROR { |
| 1739 | krb5int32 pvno; |
| 1740 | MESSAGE_TYPE msg_type; |
| 1741 | KerberosTime *ctime; |
| 1742 | krb5int32 *cusec; |
| 1743 | KerberosTime stime; |
| 1744 | krb5int32 susec; |
| 1745 | krb5int32 error_code; |
| 1746 | Realm *crealm; |
| 1747 | PrincipalName *cname; |
| 1748 | Realm realm; |
| 1749 | PrincipalName sname; |
| 1750 | heim_general_string *e_text; |
| 1751 | heim_octet_string *e_data; |
| 1752 | } KRB_ERROR; |
| 1753 | |
| 1754 | ASN1EXP int ASN1CALL decode_KRB_ERROR(const unsigned char *, size_t, KRB_ERROR *, size_t *); |
| 1755 | ASN1EXP int ASN1CALL encode_KRB_ERROR(unsigned char *, size_t, const KRB_ERROR *, size_t *); |
| 1756 | ASN1EXP size_t ASN1CALL length_KRB_ERROR(const KRB_ERROR *); |
| 1757 | ASN1EXP int ASN1CALL copy_KRB_ERROR (const KRB_ERROR *, KRB_ERROR *); |
| 1758 | ASN1EXP void ASN1CALL free_KRB_ERROR (KRB_ERROR *); |
| 1759 | |
| 1760 | |
| 1761 | /* |
| 1762 | ChangePasswdDataMS ::= SEQUENCE { |
| 1763 | newpasswd [0] OCTET STRING, |
| 1764 | targname [1] PrincipalName OPTIONAL, |
| 1765 | targrealm [2] Realm OPTIONAL, |
| 1766 | } |
| 1767 | */ |
| 1768 | |
| 1769 | typedef struct ChangePasswdDataMS { |
| 1770 | heim_octet_string newpasswd; |
| 1771 | PrincipalName *targname; |
| 1772 | Realm *targrealm; |
| 1773 | } ChangePasswdDataMS; |
| 1774 | |
| 1775 | ASN1EXP int ASN1CALL decode_ChangePasswdDataMS(const unsigned char *, size_t, ChangePasswdDataMS *, size_t *); |
| 1776 | ASN1EXP int ASN1CALL encode_ChangePasswdDataMS(unsigned char *, size_t, const ChangePasswdDataMS *, size_t *); |
| 1777 | ASN1EXP size_t ASN1CALL length_ChangePasswdDataMS(const ChangePasswdDataMS *); |
| 1778 | ASN1EXP int ASN1CALL copy_ChangePasswdDataMS (const ChangePasswdDataMS *, ChangePasswdDataMS *); |
| 1779 | ASN1EXP void ASN1CALL free_ChangePasswdDataMS (ChangePasswdDataMS *); |
| 1780 | |
| 1781 | |
| 1782 | /* |
| 1783 | EtypeList ::= SEQUENCE OF ENCTYPE |
| 1784 | */ |
| 1785 | |
| 1786 | typedef struct EtypeList { |
| 1787 | unsigned int len; |
| 1788 | ENCTYPE *val; |
| 1789 | } EtypeList; |
| 1790 | |
| 1791 | ASN1EXP int ASN1CALL decode_EtypeList(const unsigned char *, size_t, EtypeList *, size_t *); |
| 1792 | ASN1EXP int ASN1CALL encode_EtypeList(unsigned char *, size_t, const EtypeList *, size_t *); |
| 1793 | ASN1EXP size_t ASN1CALL length_EtypeList(const EtypeList *); |
| 1794 | ASN1EXP int ASN1CALL copy_EtypeList (const EtypeList *, EtypeList *); |
| 1795 | ASN1EXP void ASN1CALL free_EtypeList (EtypeList *); |
| 1796 | |
| 1797 | |
| 1798 | enum { krb5_pvno = 5 }; |
| 1799 | |
| 1800 | enum { DOMAIN_X500_COMPRESS = 1 }; |
| 1801 | |
| 1802 | /* |
| 1803 | AD-IF-RELEVANT ::= AuthorizationData |
| 1804 | */ |
| 1805 | |
| 1806 | typedef AuthorizationData AD_IF_RELEVANT; |
| 1807 | |
| 1808 | ASN1EXP int ASN1CALL decode_AD_IF_RELEVANT(const unsigned char *, size_t, AD_IF_RELEVANT *, size_t *); |
| 1809 | ASN1EXP int ASN1CALL encode_AD_IF_RELEVANT(unsigned char *, size_t, const AD_IF_RELEVANT *, size_t *); |
| 1810 | ASN1EXP size_t ASN1CALL length_AD_IF_RELEVANT(const AD_IF_RELEVANT *); |
| 1811 | ASN1EXP int ASN1CALL copy_AD_IF_RELEVANT (const AD_IF_RELEVANT *, AD_IF_RELEVANT *); |
| 1812 | ASN1EXP void ASN1CALL free_AD_IF_RELEVANT (AD_IF_RELEVANT *); |
| 1813 | |
| 1814 | |
| 1815 | /* |
| 1816 | AD-KDCIssued ::= SEQUENCE { |
| 1817 | ad-checksum [0] Checksum, |
| 1818 | i-realm [1] Realm OPTIONAL, |
| 1819 | i-sname [2] PrincipalName OPTIONAL, |
| 1820 | elements [3] AuthorizationData, |
| 1821 | } |
| 1822 | */ |
| 1823 | |
| 1824 | typedef struct AD_KDCIssued { |
| 1825 | Checksum ad_checksum; |
| 1826 | Realm *i_realm; |
| 1827 | PrincipalName *i_sname; |
| 1828 | AuthorizationData elements; |
| 1829 | } AD_KDCIssued; |
| 1830 | |
| 1831 | ASN1EXP int ASN1CALL decode_AD_KDCIssued(const unsigned char *, size_t, AD_KDCIssued *, size_t *); |
| 1832 | ASN1EXP int ASN1CALL encode_AD_KDCIssued(unsigned char *, size_t, const AD_KDCIssued *, size_t *); |
| 1833 | ASN1EXP size_t ASN1CALL length_AD_KDCIssued(const AD_KDCIssued *); |
| 1834 | ASN1EXP int ASN1CALL copy_AD_KDCIssued (const AD_KDCIssued *, AD_KDCIssued *); |
| 1835 | ASN1EXP void ASN1CALL free_AD_KDCIssued (AD_KDCIssued *); |
| 1836 | |
| 1837 | |
| 1838 | /* |
| 1839 | AD-AND-OR ::= SEQUENCE { |
| 1840 | condition-count [0] INTEGER, |
| 1841 | elements [1] AuthorizationData, |
| 1842 | } |
| 1843 | */ |
| 1844 | |
| 1845 | typedef struct AD_AND_OR { |
| 1846 | heim_integer condition_count; |
| 1847 | AuthorizationData elements; |
| 1848 | } AD_AND_OR; |
| 1849 | |
| 1850 | ASN1EXP int ASN1CALL decode_AD_AND_OR(const unsigned char *, size_t, AD_AND_OR *, size_t *); |
| 1851 | ASN1EXP int ASN1CALL encode_AD_AND_OR(unsigned char *, size_t, const AD_AND_OR *, size_t *); |
| 1852 | ASN1EXP size_t ASN1CALL length_AD_AND_OR(const AD_AND_OR *); |
| 1853 | ASN1EXP int ASN1CALL copy_AD_AND_OR (const AD_AND_OR *, AD_AND_OR *); |
| 1854 | ASN1EXP void ASN1CALL free_AD_AND_OR (AD_AND_OR *); |
| 1855 | |
| 1856 | |
| 1857 | /* |
| 1858 | AD-MANDATORY-FOR-KDC ::= AuthorizationData |
| 1859 | */ |
| 1860 | |
| 1861 | typedef AuthorizationData AD_MANDATORY_FOR_KDC; |
| 1862 | |
| 1863 | /* |
| 1864 | PA-SAM-TYPE ::= INTEGER { |
| 1865 | PA_SAM_TYPE_ENIGMA(1), |
| 1866 | PA_SAM_TYPE_DIGI_PATH(2), |
| 1867 | PA_SAM_TYPE_SKEY_K0(3), |
| 1868 | PA_SAM_TYPE_SKEY(4), |
| 1869 | PA_SAM_TYPE_SECURID(5), |
| 1870 | PA_SAM_TYPE_CRYPTOCARD(6) |
| 1871 | } |
| 1872 | */ |
| 1873 | |
| 1874 | typedef enum PA_SAM_TYPE { |
| 1875 | PA_SAM_TYPE_ENIGMA = 1, |
| 1876 | PA_SAM_TYPE_DIGI_PATH = 2, |
| 1877 | PA_SAM_TYPE_SKEY_K0 = 3, |
| 1878 | PA_SAM_TYPE_SKEY = 4, |
| 1879 | PA_SAM_TYPE_SECURID = 5, |
| 1880 | PA_SAM_TYPE_CRYPTOCARD = 6 |
| 1881 | } PA_SAM_TYPE; |
| 1882 | |
| 1883 | /* |
| 1884 | PA-SAM-REDIRECT ::= HostAddresses |
| 1885 | */ |
| 1886 | |
| 1887 | typedef HostAddresses PA_SAM_REDIRECT; |
| 1888 | |
| 1889 | /* |
| 1890 | SAMFlags ::= BIT STRING { |
| 1891 | use-sad-as-key(0), |
| 1892 | send-encrypted-sad(1), |
| 1893 | must-pk-encrypt-sad(2) |
| 1894 | } |
| 1895 | */ |
| 1896 | |
| 1897 | typedef struct SAMFlags { |
| 1898 | unsigned int use_sad_as_key:1; |
| 1899 | unsigned int send_encrypted_sad:1; |
| 1900 | unsigned int must_pk_encrypt_sad:1; |
| 1901 | unsigned int _unused3:1; |
| 1902 | unsigned int _unused4:1; |
| 1903 | unsigned int _unused5:1; |
| 1904 | unsigned int _unused6:1; |
| 1905 | unsigned int _unused7:1; |
| 1906 | unsigned int _unused8:1; |
| 1907 | unsigned int _unused9:1; |
| 1908 | unsigned int _unused10:1; |
| 1909 | unsigned int _unused11:1; |
| 1910 | unsigned int _unused12:1; |
| 1911 | unsigned int _unused13:1; |
| 1912 | unsigned int _unused14:1; |
| 1913 | unsigned int _unused15:1; |
| 1914 | unsigned int _unused16:1; |
| 1915 | unsigned int _unused17:1; |
| 1916 | unsigned int _unused18:1; |
| 1917 | unsigned int _unused19:1; |
| 1918 | unsigned int _unused20:1; |
| 1919 | unsigned int _unused21:1; |
| 1920 | unsigned int _unused22:1; |
| 1921 | unsigned int _unused23:1; |
| 1922 | unsigned int _unused24:1; |
| 1923 | unsigned int _unused25:1; |
| 1924 | unsigned int _unused26:1; |
| 1925 | unsigned int _unused27:1; |
| 1926 | unsigned int _unused28:1; |
| 1927 | unsigned int _unused29:1; |
| 1928 | unsigned int _unused30:1; |
| 1929 | unsigned int _unused31:1; |
| 1930 | } SAMFlags; |
| 1931 | |
| 1932 | |
| 1933 | unsigned SAMFlags2int(SAMFlags); |
| 1934 | SAMFlags int2SAMFlags(unsigned); |
| 1935 | const struct units * asn1_SAMFlags_units(void); |
| 1936 | /* |
| 1937 | PA-SAM-CHALLENGE-2-BODY ::= SEQUENCE { |
| 1938 | sam-type [0] krb5int32, |
| 1939 | sam-flags [1] SAMFlags, |
| 1940 | sam-type-name [2] GeneralString OPTIONAL, |
| 1941 | sam-track-id [3] GeneralString OPTIONAL, |
| 1942 | sam-challenge-label [4] GeneralString OPTIONAL, |
| 1943 | sam-challenge [5] GeneralString OPTIONAL, |
| 1944 | sam-response-prompt [6] GeneralString OPTIONAL, |
| 1945 | sam-pk-for-sad [7] EncryptionKey OPTIONAL, |
| 1946 | sam-nonce [8] krb5int32, |
| 1947 | sam-etype [9] krb5int32, |
| 1948 | ..., |
| 1949 | } |
| 1950 | */ |
| 1951 | |
| 1952 | typedef struct PA_SAM_CHALLENGE_2_BODY { |
| 1953 | krb5int32 sam_type; |
| 1954 | SAMFlags sam_flags; |
| 1955 | heim_general_string *sam_type_name; |
| 1956 | heim_general_string *sam_track_id; |
| 1957 | heim_general_string *sam_challenge_label; |
| 1958 | heim_general_string *sam_challenge; |
| 1959 | heim_general_string *sam_response_prompt; |
| 1960 | EncryptionKey *sam_pk_for_sad; |
| 1961 | krb5int32 sam_nonce; |
| 1962 | krb5int32 sam_etype; |
| 1963 | } PA_SAM_CHALLENGE_2_BODY; |
| 1964 | |
| 1965 | /* |
| 1966 | PA-SAM-CHALLENGE-2 ::= SEQUENCE { |
| 1967 | sam-body [0] PA-SAM-CHALLENGE-2-BODY, |
| 1968 | sam-cksum [1] SEQUENCE OF Checksum, |
| 1969 | ..., |
| 1970 | } |
| 1971 | */ |
| 1972 | |
| 1973 | typedef struct PA_SAM_CHALLENGE_2 { |
| 1974 | PA_SAM_CHALLENGE_2_BODY sam_body; |
| 1975 | struct PA_SAM_CHALLENGE_2_sam_cksum { |
| 1976 | unsigned int len; |
| 1977 | Checksum *val; |
| 1978 | } sam_cksum; |
| 1979 | } PA_SAM_CHALLENGE_2; |
| 1980 | |
| 1981 | /* |
| 1982 | PA-SAM-RESPONSE-2 ::= SEQUENCE { |
| 1983 | sam-type [0] krb5int32, |
| 1984 | sam-flags [1] SAMFlags, |
| 1985 | sam-track-id [2] GeneralString OPTIONAL, |
| 1986 | sam-enc-nonce-or-sad [3] EncryptedData, |
| 1987 | sam-nonce [4] krb5int32, |
| 1988 | ..., |
| 1989 | } |
| 1990 | */ |
| 1991 | |
| 1992 | typedef struct PA_SAM_RESPONSE_2 { |
| 1993 | krb5int32 sam_type; |
| 1994 | SAMFlags sam_flags; |
| 1995 | heim_general_string *sam_track_id; |
| 1996 | EncryptedData sam_enc_nonce_or_sad; |
| 1997 | krb5int32 sam_nonce; |
| 1998 | } PA_SAM_RESPONSE_2; |
| 1999 | |
| 2000 | /* |
| 2001 | PA-ENC-SAM-RESPONSE-ENC ::= SEQUENCE { |
| 2002 | sam-nonce [0] krb5int32, |
| 2003 | sam-sad [1] GeneralString OPTIONAL, |
| 2004 | ..., |
| 2005 | } |
| 2006 | */ |
| 2007 | |
| 2008 | typedef struct PA_ENC_SAM_RESPONSE_ENC { |
| 2009 | krb5int32 sam_nonce; |
| 2010 | heim_general_string *sam_sad; |
| 2011 | } PA_ENC_SAM_RESPONSE_ENC; |
| 2012 | |
| 2013 | /* |
| 2014 | PA-S4U2Self ::= SEQUENCE { |
| 2015 | name [0] PrincipalName, |
| 2016 | realm [1] Realm, |
| 2017 | cksum [2] Checksum, |
| 2018 | auth [3] GeneralString, |
| 2019 | } |
| 2020 | */ |
| 2021 | |
| 2022 | typedef struct PA_S4U2Self { |
| 2023 | PrincipalName name; |
| 2024 | Realm realm; |
| 2025 | Checksum cksum; |
| 2026 | heim_general_string auth; |
| 2027 | } PA_S4U2Self; |
| 2028 | |
| 2029 | ASN1EXP int ASN1CALL decode_PA_S4U2Self(const unsigned char *, size_t, PA_S4U2Self *, size_t *); |
| 2030 | ASN1EXP int ASN1CALL encode_PA_S4U2Self(unsigned char *, size_t, const PA_S4U2Self *, size_t *); |
| 2031 | ASN1EXP size_t ASN1CALL length_PA_S4U2Self(const PA_S4U2Self *); |
| 2032 | ASN1EXP int ASN1CALL copy_PA_S4U2Self (const PA_S4U2Self *, PA_S4U2Self *); |
| 2033 | ASN1EXP void ASN1CALL free_PA_S4U2Self (PA_S4U2Self *); |
| 2034 | |
| 2035 | |
| 2036 | /* |
| 2037 | KRB5SignedPathData ::= SEQUENCE { |
| 2038 | client [0] Principal OPTIONAL, |
| 2039 | authtime [1] KerberosTime, |
| 2040 | delegated [2] Principals OPTIONAL, |
| 2041 | method_data [3] METHOD-DATA OPTIONAL, |
| 2042 | } |
| 2043 | */ |
| 2044 | |
| 2045 | typedef struct KRB5SignedPathData { |
| 2046 | Principal *client; |
| 2047 | KerberosTime authtime; |
| 2048 | Principals *delegated; |
| 2049 | METHOD_DATA *method_data; |
| 2050 | } KRB5SignedPathData; |
| 2051 | |
| 2052 | ASN1EXP int ASN1CALL decode_KRB5SignedPathData(const unsigned char *, size_t, KRB5SignedPathData *, size_t *); |
| 2053 | ASN1EXP int ASN1CALL encode_KRB5SignedPathData(unsigned char *, size_t, const KRB5SignedPathData *, size_t *); |
| 2054 | ASN1EXP size_t ASN1CALL length_KRB5SignedPathData(const KRB5SignedPathData *); |
| 2055 | ASN1EXP int ASN1CALL copy_KRB5SignedPathData (const KRB5SignedPathData *, KRB5SignedPathData *); |
| 2056 | ASN1EXP void ASN1CALL free_KRB5SignedPathData (KRB5SignedPathData *); |
| 2057 | |
| 2058 | |
| 2059 | /* |
| 2060 | KRB5SignedPath ::= SEQUENCE { |
| 2061 | etype [0] ENCTYPE, |
| 2062 | cksum [1] Checksum, |
| 2063 | delegated [2] Principals OPTIONAL, |
| 2064 | method_data [3] METHOD-DATA OPTIONAL, |
| 2065 | } |
| 2066 | */ |
| 2067 | |
| 2068 | typedef struct KRB5SignedPath { |
| 2069 | ENCTYPE etype; |
| 2070 | Checksum cksum; |
| 2071 | Principals *delegated; |
| 2072 | METHOD_DATA *method_data; |
| 2073 | } KRB5SignedPath; |
| 2074 | |
| 2075 | ASN1EXP int ASN1CALL decode_KRB5SignedPath(const unsigned char *, size_t, KRB5SignedPath *, size_t *); |
| 2076 | ASN1EXP int ASN1CALL encode_KRB5SignedPath(unsigned char *, size_t, const KRB5SignedPath *, size_t *); |
| 2077 | ASN1EXP size_t ASN1CALL length_KRB5SignedPath(const KRB5SignedPath *); |
| 2078 | ASN1EXP int ASN1CALL copy_KRB5SignedPath (const KRB5SignedPath *, KRB5SignedPath *); |
| 2079 | ASN1EXP void ASN1CALL free_KRB5SignedPath (KRB5SignedPath *); |
| 2080 | |
| 2081 | |
| 2082 | /* |
| 2083 | AD-LoginAlias ::= SEQUENCE { |
| 2084 | login-alias [0] PrincipalName, |
| 2085 | checksum [1] Checksum, |
| 2086 | } |
| 2087 | */ |
| 2088 | |
| 2089 | typedef struct AD_LoginAlias { |
| 2090 | PrincipalName login_alias; |
| 2091 | Checksum checksum; |
| 2092 | } AD_LoginAlias; |
| 2093 | |
| 2094 | ASN1EXP int ASN1CALL decode_AD_LoginAlias(const unsigned char *, size_t, AD_LoginAlias *, size_t *); |
| 2095 | ASN1EXP int ASN1CALL encode_AD_LoginAlias(unsigned char *, size_t, const AD_LoginAlias *, size_t *); |
| 2096 | ASN1EXP size_t ASN1CALL length_AD_LoginAlias(const AD_LoginAlias *); |
| 2097 | ASN1EXP int ASN1CALL copy_AD_LoginAlias (const AD_LoginAlias *, AD_LoginAlias *); |
| 2098 | ASN1EXP void ASN1CALL free_AD_LoginAlias (AD_LoginAlias *); |
| 2099 | |
| 2100 | |
| 2101 | /* |
| 2102 | PA-SvrReferralData ::= SEQUENCE { |
| 2103 | referred-name [1] PrincipalName OPTIONAL, |
| 2104 | referred-realm [0] Realm, |
| 2105 | } |
| 2106 | */ |
| 2107 | |
| 2108 | typedef struct PA_SvrReferralData { |
| 2109 | PrincipalName *referred_name; |
| 2110 | Realm referred_realm; |
| 2111 | } PA_SvrReferralData; |
| 2112 | |
| 2113 | ASN1EXP int ASN1CALL decode_PA_SvrReferralData(const unsigned char *, size_t, PA_SvrReferralData *, size_t *); |
| 2114 | ASN1EXP int ASN1CALL encode_PA_SvrReferralData(unsigned char *, size_t, const PA_SvrReferralData *, size_t *); |
| 2115 | ASN1EXP size_t ASN1CALL length_PA_SvrReferralData(const PA_SvrReferralData *); |
| 2116 | ASN1EXP int ASN1CALL copy_PA_SvrReferralData (const PA_SvrReferralData *, PA_SvrReferralData *); |
| 2117 | ASN1EXP void ASN1CALL free_PA_SvrReferralData (PA_SvrReferralData *); |
| 2118 | |
| 2119 | |
| 2120 | /* |
| 2121 | PA-SERVER-REFERRAL-DATA ::= EncryptedData |
| 2122 | */ |
| 2123 | |
| 2124 | typedef EncryptedData PA_SERVER_REFERRAL_DATA; |
| 2125 | |
| 2126 | ASN1EXP int ASN1CALL decode_PA_SERVER_REFERRAL_DATA(const unsigned char *, size_t, PA_SERVER_REFERRAL_DATA *, size_t *); |
| 2127 | ASN1EXP int ASN1CALL encode_PA_SERVER_REFERRAL_DATA(unsigned char *, size_t, const PA_SERVER_REFERRAL_DATA *, size_t *); |
| 2128 | ASN1EXP size_t ASN1CALL length_PA_SERVER_REFERRAL_DATA(const PA_SERVER_REFERRAL_DATA *); |
| 2129 | ASN1EXP int ASN1CALL copy_PA_SERVER_REFERRAL_DATA (const PA_SERVER_REFERRAL_DATA *, PA_SERVER_REFERRAL_DATA *); |
| 2130 | ASN1EXP void ASN1CALL free_PA_SERVER_REFERRAL_DATA (PA_SERVER_REFERRAL_DATA *); |
| 2131 | |
| 2132 | |
| 2133 | /* |
| 2134 | PA-ServerReferralData ::= SEQUENCE { |
| 2135 | referred-realm [0] Realm OPTIONAL, |
| 2136 | true-principal-name [1] PrincipalName OPTIONAL, |
| 2137 | requested-principal-name [2] PrincipalName OPTIONAL, |
| 2138 | referral-valid-until [3] KerberosTime OPTIONAL, |
| 2139 | ..., |
| 2140 | } |
| 2141 | */ |
| 2142 | |
| 2143 | typedef struct PA_ServerReferralData { |
| 2144 | Realm *referred_realm; |
| 2145 | PrincipalName *true_principal_name; |
| 2146 | PrincipalName *requested_principal_name; |
| 2147 | KerberosTime *referral_valid_until; |
| 2148 | } PA_ServerReferralData; |
| 2149 | |
| 2150 | ASN1EXP int ASN1CALL decode_PA_ServerReferralData(const unsigned char *, size_t, PA_ServerReferralData *, size_t *); |
| 2151 | ASN1EXP int ASN1CALL encode_PA_ServerReferralData(unsigned char *, size_t, const PA_ServerReferralData *, size_t *); |
| 2152 | ASN1EXP size_t ASN1CALL length_PA_ServerReferralData(const PA_ServerReferralData *); |
| 2153 | ASN1EXP int ASN1CALL copy_PA_ServerReferralData (const PA_ServerReferralData *, PA_ServerReferralData *); |
| 2154 | ASN1EXP void ASN1CALL free_PA_ServerReferralData (PA_ServerReferralData *); |
| 2155 | |
| 2156 | |
| 2157 | /* |
| 2158 | FastOptions ::= BIT STRING { |
| 2159 | reserved(0), |
| 2160 | hide-client-names(1), |
| 2161 | kdc-follow-referrals(16) |
| 2162 | } |
| 2163 | */ |
| 2164 | |
| 2165 | typedef struct FastOptions { |
| 2166 | unsigned int reserved:1; |
| 2167 | unsigned int hide_client_names:1; |
| 2168 | unsigned int _unused2:1; |
| 2169 | unsigned int _unused3:1; |
| 2170 | unsigned int _unused4:1; |
| 2171 | unsigned int _unused5:1; |
| 2172 | unsigned int _unused6:1; |
| 2173 | unsigned int _unused7:1; |
| 2174 | unsigned int _unused8:1; |
| 2175 | unsigned int _unused9:1; |
| 2176 | unsigned int _unused10:1; |
| 2177 | unsigned int _unused11:1; |
| 2178 | unsigned int _unused12:1; |
| 2179 | unsigned int _unused13:1; |
| 2180 | unsigned int _unused14:1; |
| 2181 | unsigned int _unused15:1; |
| 2182 | unsigned int kdc_follow_referrals:1; |
| 2183 | unsigned int _unused17:1; |
| 2184 | unsigned int _unused18:1; |
| 2185 | unsigned int _unused19:1; |
| 2186 | unsigned int _unused20:1; |
| 2187 | unsigned int _unused21:1; |
| 2188 | unsigned int _unused22:1; |
| 2189 | unsigned int _unused23:1; |
| 2190 | unsigned int _unused24:1; |
| 2191 | unsigned int _unused25:1; |
| 2192 | unsigned int _unused26:1; |
| 2193 | unsigned int _unused27:1; |
| 2194 | unsigned int _unused28:1; |
| 2195 | unsigned int _unused29:1; |
| 2196 | unsigned int _unused30:1; |
| 2197 | unsigned int _unused31:1; |
| 2198 | } FastOptions; |
| 2199 | |
| 2200 | |
| 2201 | unsigned FastOptions2int(FastOptions); |
| 2202 | FastOptions int2FastOptions(unsigned); |
| 2203 | const struct units * asn1_FastOptions_units(void); |
| 2204 | /* |
| 2205 | KrbFastReq ::= SEQUENCE { |
| 2206 | fast-options [0] FastOptions, |
| 2207 | padata [1] METHOD-DATA, |
| 2208 | req-body [2] KDC-REQ-BODY, |
| 2209 | ..., |
| 2210 | } |
| 2211 | */ |
| 2212 | |
| 2213 | typedef struct KrbFastReq { |
| 2214 | FastOptions fast_options; |
| 2215 | METHOD_DATA padata; |
| 2216 | KDC_REQ_BODY req_body; |
| 2217 | } KrbFastReq; |
| 2218 | |
| 2219 | ASN1EXP int ASN1CALL decode_KrbFastReq(const unsigned char *, size_t, KrbFastReq *, size_t *); |
| 2220 | ASN1EXP int ASN1CALL encode_KrbFastReq(unsigned char *, size_t, const KrbFastReq *, size_t *); |
| 2221 | ASN1EXP size_t ASN1CALL length_KrbFastReq(const KrbFastReq *); |
| 2222 | ASN1EXP int ASN1CALL copy_KrbFastReq (const KrbFastReq *, KrbFastReq *); |
| 2223 | ASN1EXP void ASN1CALL free_KrbFastReq (KrbFastReq *); |
| 2224 | |
| 2225 | |
| 2226 | /* |
| 2227 | KrbFastArmor ::= SEQUENCE { |
| 2228 | armor-type [0] krb5int32, |
| 2229 | armor-value [1] OCTET STRING, |
| 2230 | ..., |
| 2231 | } |
| 2232 | */ |
| 2233 | |
| 2234 | typedef struct KrbFastArmor { |
| 2235 | krb5int32 armor_type; |
| 2236 | heim_octet_string armor_value; |
| 2237 | } KrbFastArmor; |
| 2238 | |
| 2239 | ASN1EXP int ASN1CALL decode_KrbFastArmor(const unsigned char *, size_t, KrbFastArmor *, size_t *); |
| 2240 | ASN1EXP int ASN1CALL encode_KrbFastArmor(unsigned char *, size_t, const KrbFastArmor *, size_t *); |
| 2241 | ASN1EXP size_t ASN1CALL length_KrbFastArmor(const KrbFastArmor *); |
| 2242 | ASN1EXP int ASN1CALL copy_KrbFastArmor (const KrbFastArmor *, KrbFastArmor *); |
| 2243 | ASN1EXP void ASN1CALL free_KrbFastArmor (KrbFastArmor *); |
| 2244 | |
| 2245 | |
| 2246 | /* |
| 2247 | KrbFastArmoredReq ::= SEQUENCE { |
| 2248 | armor [0] KrbFastArmor OPTIONAL, |
| 2249 | req-checksum [1] Checksum, |
| 2250 | enc-fast-req [2] EncryptedData, |
| 2251 | } |
| 2252 | */ |
| 2253 | |
| 2254 | typedef struct KrbFastArmoredReq { |
| 2255 | KrbFastArmor *armor; |
| 2256 | Checksum req_checksum; |
| 2257 | EncryptedData enc_fast_req; |
| 2258 | } KrbFastArmoredReq; |
| 2259 | |
| 2260 | /* |
| 2261 | PA-FX-FAST-REQUEST ::= CHOICE { |
| 2262 | armored-data [0] KrbFastArmoredReq, |
| 2263 | ..., |
| 2264 | } |
| 2265 | */ |
| 2266 | |
| 2267 | typedef struct PA_FX_FAST_REQUEST { |
| 2268 | enum PA_FX_FAST_REQUEST_enum { |
| 2269 | choice_PA_FX_FAST_REQUEST_asn1_ellipsis = 0, |
| 2270 | choice_PA_FX_FAST_REQUEST_armored_data |
| 2271 | /* ... */ |
| 2272 | } element; |
| 2273 | union { |
| 2274 | KrbFastArmoredReq armored_data; |
| 2275 | heim_octet_string asn1_ellipsis; |
| 2276 | } u; |
| 2277 | } PA_FX_FAST_REQUEST; |
| 2278 | |
| 2279 | ASN1EXP int ASN1CALL decode_PA_FX_FAST_REQUEST(const unsigned char *, size_t, PA_FX_FAST_REQUEST *, size_t *); |
| 2280 | ASN1EXP int ASN1CALL encode_PA_FX_FAST_REQUEST(unsigned char *, size_t, const PA_FX_FAST_REQUEST *, size_t *); |
| 2281 | ASN1EXP size_t ASN1CALL length_PA_FX_FAST_REQUEST(const PA_FX_FAST_REQUEST *); |
| 2282 | ASN1EXP int ASN1CALL copy_PA_FX_FAST_REQUEST (const PA_FX_FAST_REQUEST *, PA_FX_FAST_REQUEST *); |
| 2283 | ASN1EXP void ASN1CALL free_PA_FX_FAST_REQUEST (PA_FX_FAST_REQUEST *); |
| 2284 | |
| 2285 | |
| 2286 | /* |
| 2287 | KrbFastFinished ::= SEQUENCE { |
| 2288 | timestamp [0] KerberosTime, |
| 2289 | usec [1] krb5int32, |
| 2290 | crealm [2] Realm, |
| 2291 | cname [3] PrincipalName, |
| 2292 | ticket-checksum [4] Checksum, |
| 2293 | ..., |
| 2294 | } |
| 2295 | */ |
| 2296 | |
| 2297 | typedef struct KrbFastFinished { |
| 2298 | KerberosTime timestamp; |
| 2299 | krb5int32 usec; |
| 2300 | Realm crealm; |
| 2301 | PrincipalName cname; |
| 2302 | Checksum ticket_checksum; |
| 2303 | } KrbFastFinished; |
| 2304 | |
| 2305 | ASN1EXP int ASN1CALL decode_KrbFastFinished(const unsigned char *, size_t, KrbFastFinished *, size_t *); |
| 2306 | ASN1EXP int ASN1CALL encode_KrbFastFinished(unsigned char *, size_t, const KrbFastFinished *, size_t *); |
| 2307 | ASN1EXP size_t ASN1CALL length_KrbFastFinished(const KrbFastFinished *); |
| 2308 | ASN1EXP int ASN1CALL copy_KrbFastFinished (const KrbFastFinished *, KrbFastFinished *); |
| 2309 | ASN1EXP void ASN1CALL free_KrbFastFinished (KrbFastFinished *); |
| 2310 | |
| 2311 | |
| 2312 | /* |
| 2313 | KrbFastResponse ::= SEQUENCE { |
| 2314 | padata [0] METHOD-DATA, |
| 2315 | strengthen-key [1] EncryptionKey OPTIONAL, |
| 2316 | finished [2] KrbFastFinished OPTIONAL, |
| 2317 | nonce [3] krb5uint32, |
| 2318 | ..., |
| 2319 | } |
| 2320 | */ |
| 2321 | |
| 2322 | typedef struct KrbFastResponse { |
| 2323 | METHOD_DATA padata; |
| 2324 | EncryptionKey *strengthen_key; |
| 2325 | KrbFastFinished *finished; |
| 2326 | krb5uint32 nonce; |
| 2327 | } KrbFastResponse; |
| 2328 | |
| 2329 | ASN1EXP int ASN1CALL decode_KrbFastResponse(const unsigned char *, size_t, KrbFastResponse *, size_t *); |
| 2330 | ASN1EXP int ASN1CALL encode_KrbFastResponse(unsigned char *, size_t, const KrbFastResponse *, size_t *); |
| 2331 | ASN1EXP size_t ASN1CALL length_KrbFastResponse(const KrbFastResponse *); |
| 2332 | ASN1EXP int ASN1CALL copy_KrbFastResponse (const KrbFastResponse *, KrbFastResponse *); |
| 2333 | ASN1EXP void ASN1CALL free_KrbFastResponse (KrbFastResponse *); |
| 2334 | |
| 2335 | |
| 2336 | /* |
| 2337 | KrbFastArmoredRep ::= SEQUENCE { |
| 2338 | enc-fast-rep [0] EncryptedData, |
| 2339 | ..., |
| 2340 | } |
| 2341 | */ |
| 2342 | |
| 2343 | typedef struct KrbFastArmoredRep { |
| 2344 | EncryptedData enc_fast_rep; |
| 2345 | } KrbFastArmoredRep; |
| 2346 | |
| 2347 | /* |
| 2348 | PA-FX-FAST-REPLY ::= CHOICE { |
| 2349 | armored-data [0] KrbFastArmoredRep, |
| 2350 | ..., |
| 2351 | } |
| 2352 | */ |
| 2353 | |
| 2354 | typedef struct PA_FX_FAST_REPLY { |
| 2355 | enum PA_FX_FAST_REPLY_enum { |
| 2356 | choice_PA_FX_FAST_REPLY_asn1_ellipsis = 0, |
| 2357 | choice_PA_FX_FAST_REPLY_armored_data |
| 2358 | /* ... */ |
| 2359 | } element; |
| 2360 | union { |
| 2361 | KrbFastArmoredRep armored_data; |
| 2362 | heim_octet_string asn1_ellipsis; |
| 2363 | } u; |
| 2364 | } PA_FX_FAST_REPLY; |
| 2365 | |
| 2366 | ASN1EXP int ASN1CALL decode_PA_FX_FAST_REPLY(const unsigned char *, size_t, PA_FX_FAST_REPLY *, size_t *); |
| 2367 | ASN1EXP int ASN1CALL encode_PA_FX_FAST_REPLY(unsigned char *, size_t, const PA_FX_FAST_REPLY *, size_t *); |
| 2368 | ASN1EXP size_t ASN1CALL length_PA_FX_FAST_REPLY(const PA_FX_FAST_REPLY *); |
| 2369 | ASN1EXP int ASN1CALL copy_PA_FX_FAST_REPLY (const PA_FX_FAST_REPLY *, PA_FX_FAST_REPLY *); |
| 2370 | ASN1EXP void ASN1CALL free_PA_FX_FAST_REPLY (PA_FX_FAST_REPLY *); |
| 2371 | |
| 2372 | |
| 2373 | /* |
| 2374 | KDCFastFlags ::= BIT STRING { |
| 2375 | use_reply_key(0), |
| 2376 | reply_key_used(1), |
| 2377 | reply_key_replaced(2), |
| 2378 | kdc_verfied(3) |
| 2379 | } |
| 2380 | */ |
| 2381 | |
| 2382 | typedef struct KDCFastFlags { |
| 2383 | unsigned int use_reply_key:1; |
| 2384 | unsigned int reply_key_used:1; |
| 2385 | unsigned int reply_key_replaced:1; |
| 2386 | unsigned int kdc_verfied:1; |
| 2387 | unsigned int _unused4:1; |
| 2388 | unsigned int _unused5:1; |
| 2389 | unsigned int _unused6:1; |
| 2390 | unsigned int _unused7:1; |
| 2391 | unsigned int _unused8:1; |
| 2392 | unsigned int _unused9:1; |
| 2393 | unsigned int _unused10:1; |
| 2394 | unsigned int _unused11:1; |
| 2395 | unsigned int _unused12:1; |
| 2396 | unsigned int _unused13:1; |
| 2397 | unsigned int _unused14:1; |
| 2398 | unsigned int _unused15:1; |
| 2399 | unsigned int _unused16:1; |
| 2400 | unsigned int _unused17:1; |
| 2401 | unsigned int _unused18:1; |
| 2402 | unsigned int _unused19:1; |
| 2403 | unsigned int _unused20:1; |
| 2404 | unsigned int _unused21:1; |
| 2405 | unsigned int _unused22:1; |
| 2406 | unsigned int _unused23:1; |
| 2407 | unsigned int _unused24:1; |
| 2408 | unsigned int _unused25:1; |
| 2409 | unsigned int _unused26:1; |
| 2410 | unsigned int _unused27:1; |
| 2411 | unsigned int _unused28:1; |
| 2412 | unsigned int _unused29:1; |
| 2413 | unsigned int _unused30:1; |
| 2414 | unsigned int _unused31:1; |
| 2415 | } KDCFastFlags; |
| 2416 | |
| 2417 | |
| 2418 | unsigned KDCFastFlags2int(KDCFastFlags); |
| 2419 | KDCFastFlags int2KDCFastFlags(unsigned); |
| 2420 | const struct units * asn1_KDCFastFlags_units(void); |
| 2421 | /* |
| 2422 | KDCFastState ::= SEQUENCE { |
| 2423 | flags [0] KDCFastFlags, |
| 2424 | expiration [1] GeneralizedTime, |
| 2425 | fast-state [2] METHOD-DATA, |
| 2426 | expected-pa-types [3] SEQUENCE OF PADATA-TYPE OPTIONAL, |
| 2427 | } |
| 2428 | */ |
| 2429 | |
| 2430 | typedef struct KDCFastState { |
| 2431 | KDCFastFlags flags; |
| 2432 | time_t expiration; |
| 2433 | METHOD_DATA fast_state; |
| 2434 | struct KDCFastState_expected_pa_types { |
| 2435 | unsigned int len; |
| 2436 | PADATA_TYPE *val; |
| 2437 | } *expected_pa_types; |
| 2438 | } KDCFastState; |
| 2439 | |
| 2440 | ASN1EXP int ASN1CALL decode_KDCFastState(const unsigned char *, size_t, KDCFastState *, size_t *); |
| 2441 | ASN1EXP int ASN1CALL encode_KDCFastState(unsigned char *, size_t, const KDCFastState *, size_t *); |
| 2442 | ASN1EXP size_t ASN1CALL length_KDCFastState(const KDCFastState *); |
| 2443 | ASN1EXP int ASN1CALL copy_KDCFastState (const KDCFastState *, KDCFastState *); |
| 2444 | ASN1EXP void ASN1CALL free_KDCFastState (KDCFastState *); |
| 2445 | |
| 2446 | |
| 2447 | /* |
| 2448 | KDCFastCookie ::= SEQUENCE { |
| 2449 | version [0] UTF8String, |
| 2450 | cookie [1] EncryptedData, |
| 2451 | } |
| 2452 | */ |
| 2453 | |
| 2454 | typedef struct KDCFastCookie { |
| 2455 | heim_utf8_string version; |
| 2456 | EncryptedData cookie; |
| 2457 | } KDCFastCookie; |
| 2458 | |
| 2459 | ASN1EXP int ASN1CALL decode_KDCFastCookie(const unsigned char *, size_t, KDCFastCookie *, size_t *); |
| 2460 | ASN1EXP int ASN1CALL encode_KDCFastCookie(unsigned char *, size_t, const KDCFastCookie *, size_t *); |
| 2461 | ASN1EXP size_t ASN1CALL length_KDCFastCookie(const KDCFastCookie *); |
| 2462 | ASN1EXP int ASN1CALL copy_KDCFastCookie (const KDCFastCookie *, KDCFastCookie *); |
| 2463 | ASN1EXP void ASN1CALL free_KDCFastCookie (KDCFastCookie *); |
| 2464 | |
| 2465 | |
| 2466 | /* |
| 2467 | KDC-PROXY-MESSAGE ::= SEQUENCE { |
| 2468 | kerb-message [0] OCTET STRING, |
| 2469 | target-domain [1] Realm OPTIONAL, |
| 2470 | dclocator-hint [2] INTEGER OPTIONAL, |
| 2471 | } |
| 2472 | */ |
| 2473 | |
| 2474 | typedef struct KDC_PROXY_MESSAGE { |
| 2475 | heim_octet_string kerb_message; |
| 2476 | Realm *target_domain; |
| 2477 | heim_integer *dclocator_hint; |
| 2478 | } KDC_PROXY_MESSAGE; |
| 2479 | |
| 2480 | ASN1EXP int ASN1CALL decode_KDC_PROXY_MESSAGE(const unsigned char *, size_t, KDC_PROXY_MESSAGE *, size_t *); |
| 2481 | ASN1EXP int ASN1CALL encode_KDC_PROXY_MESSAGE(unsigned char *, size_t, const KDC_PROXY_MESSAGE *, size_t *); |
| 2482 | ASN1EXP size_t ASN1CALL length_KDC_PROXY_MESSAGE(const KDC_PROXY_MESSAGE *); |
| 2483 | ASN1EXP int ASN1CALL copy_KDC_PROXY_MESSAGE (const KDC_PROXY_MESSAGE *, KDC_PROXY_MESSAGE *); |
| 2484 | ASN1EXP void ASN1CALL free_KDC_PROXY_MESSAGE (KDC_PROXY_MESSAGE *); |
| 2485 | |
| 2486 | |
| 2487 | /* |
| 2488 | KERB-TIMES ::= SEQUENCE { |
| 2489 | authtime [0] KerberosTime, |
| 2490 | starttime [1] KerberosTime, |
| 2491 | endtime [2] KerberosTime, |
| 2492 | renew_till [3] KerberosTime, |
| 2493 | } |
| 2494 | */ |
| 2495 | |
| 2496 | typedef struct KERB_TIMES { |
| 2497 | KerberosTime authtime; |
| 2498 | KerberosTime starttime; |
| 2499 | KerberosTime endtime; |
| 2500 | KerberosTime renew_till; |
| 2501 | } KERB_TIMES; |
| 2502 | |
| 2503 | ASN1EXP int ASN1CALL decode_KERB_TIMES(const unsigned char *, size_t, KERB_TIMES *, size_t *); |
| 2504 | ASN1EXP int ASN1CALL encode_KERB_TIMES(unsigned char *, size_t, const KERB_TIMES *, size_t *); |
| 2505 | ASN1EXP size_t ASN1CALL length_KERB_TIMES(const KERB_TIMES *); |
| 2506 | ASN1EXP int ASN1CALL copy_KERB_TIMES (const KERB_TIMES *, KERB_TIMES *); |
| 2507 | ASN1EXP void ASN1CALL free_KERB_TIMES (KERB_TIMES *); |
| 2508 | |
| 2509 | |
| 2510 | /* |
| 2511 | KERB-CRED ::= SEQUENCE { |
| 2512 | client [0] Principal, |
| 2513 | server [1] Principal, |
| 2514 | keyblock [2] EncryptionKey, |
| 2515 | times [3] KERB-TIMES, |
| 2516 | ticket [4] OCTET STRING, |
| 2517 | authdata [5] OCTET STRING, |
| 2518 | addresses [6] HostAddresses, |
| 2519 | flags [7] TicketFlags, |
| 2520 | } |
| 2521 | */ |
| 2522 | |
| 2523 | typedef struct KERB_CRED { |
| 2524 | Principal client; |
| 2525 | Principal server; |
| 2526 | EncryptionKey keyblock; |
| 2527 | KERB_TIMES times; |
| 2528 | heim_octet_string ticket; |
| 2529 | heim_octet_string authdata; |
| 2530 | HostAddresses addresses; |
| 2531 | TicketFlags flags; |
| 2532 | } KERB_CRED; |
| 2533 | |
| 2534 | ASN1EXP int ASN1CALL decode_KERB_CRED(const unsigned char *, size_t, KERB_CRED *, size_t *); |
| 2535 | ASN1EXP int ASN1CALL encode_KERB_CRED(unsigned char *, size_t, const KERB_CRED *, size_t *); |
| 2536 | ASN1EXP size_t ASN1CALL length_KERB_CRED(const KERB_CRED *); |
| 2537 | ASN1EXP int ASN1CALL copy_KERB_CRED (const KERB_CRED *, KERB_CRED *); |
| 2538 | ASN1EXP void ASN1CALL free_KERB_CRED (KERB_CRED *); |
| 2539 | |
| 2540 | |
| 2541 | /* |
| 2542 | KERB-TGS-REQ-IN ::= SEQUENCE { |
| 2543 | cache [0] OCTET STRING, |
| 2544 | addrs [1] HostAddresses, |
| 2545 | flags [2] krb5uint32, |
| 2546 | imp [3] Principal OPTIONAL, |
| 2547 | ticket [4] OCTET STRING OPTIONAL, |
| 2548 | in_cred [5] KERB-CRED, |
| 2549 | krbtgt [6] KERB-CRED, |
| 2550 | padata [7] METHOD-DATA, |
| 2551 | } |
| 2552 | */ |
| 2553 | |
| 2554 | typedef struct KERB_TGS_REQ_IN { |
| 2555 | heim_octet_string cache; |
| 2556 | HostAddresses addrs; |
| 2557 | krb5uint32 flags; |
| 2558 | Principal *imp; |
| 2559 | heim_octet_string *ticket; |
| 2560 | KERB_CRED in_cred; |
| 2561 | KERB_CRED krbtgt; |
| 2562 | METHOD_DATA padata; |
| 2563 | } KERB_TGS_REQ_IN; |
| 2564 | |
| 2565 | ASN1EXP int ASN1CALL decode_KERB_TGS_REQ_IN(const unsigned char *, size_t, KERB_TGS_REQ_IN *, size_t *); |
| 2566 | ASN1EXP int ASN1CALL encode_KERB_TGS_REQ_IN(unsigned char *, size_t, const KERB_TGS_REQ_IN *, size_t *); |
| 2567 | ASN1EXP size_t ASN1CALL length_KERB_TGS_REQ_IN(const KERB_TGS_REQ_IN *); |
| 2568 | ASN1EXP int ASN1CALL copy_KERB_TGS_REQ_IN (const KERB_TGS_REQ_IN *, KERB_TGS_REQ_IN *); |
| 2569 | ASN1EXP void ASN1CALL free_KERB_TGS_REQ_IN (KERB_TGS_REQ_IN *); |
| 2570 | |
| 2571 | |
| 2572 | /* |
| 2573 | KERB-TGS-REQ-OUT ::= SEQUENCE { |
| 2574 | subkey [0] EncryptionKey OPTIONAL, |
| 2575 | t [1] TGS-REQ, |
| 2576 | } |
| 2577 | */ |
| 2578 | |
| 2579 | typedef struct KERB_TGS_REQ_OUT { |
| 2580 | EncryptionKey *subkey; |
| 2581 | TGS_REQ t; |
| 2582 | } KERB_TGS_REQ_OUT; |
| 2583 | |
| 2584 | ASN1EXP int ASN1CALL decode_KERB_TGS_REQ_OUT(const unsigned char *, size_t, KERB_TGS_REQ_OUT *, size_t *); |
| 2585 | ASN1EXP int ASN1CALL encode_KERB_TGS_REQ_OUT(unsigned char *, size_t, const KERB_TGS_REQ_OUT *, size_t *); |
| 2586 | ASN1EXP size_t ASN1CALL length_KERB_TGS_REQ_OUT(const KERB_TGS_REQ_OUT *); |
| 2587 | ASN1EXP int ASN1CALL copy_KERB_TGS_REQ_OUT (const KERB_TGS_REQ_OUT *, KERB_TGS_REQ_OUT *); |
| 2588 | ASN1EXP void ASN1CALL free_KERB_TGS_REQ_OUT (KERB_TGS_REQ_OUT *); |
| 2589 | |
| 2590 | |
| 2591 | /* |
| 2592 | KERB-TGS-REP-IN ::= SEQUENCE { |
| 2593 | cache [0] OCTET STRING, |
| 2594 | subkey [1] EncryptionKey OPTIONAL, |
| 2595 | in_cred [2] KERB-CRED, |
| 2596 | t [3] TGS-REP, |
| 2597 | } |
| 2598 | */ |
| 2599 | |
| 2600 | typedef struct KERB_TGS_REP_IN { |
| 2601 | heim_octet_string cache; |
| 2602 | EncryptionKey *subkey; |
| 2603 | KERB_CRED in_cred; |
| 2604 | TGS_REP t; |
| 2605 | } KERB_TGS_REP_IN; |
| 2606 | |
| 2607 | /* |
| 2608 | KERB-TGS-REP-OUT ::= SEQUENCE { |
| 2609 | cache [0] OCTET STRING, |
| 2610 | cred [1] KERB-CRED, |
| 2611 | subkey [2] EncryptionKey, |
| 2612 | } |
| 2613 | */ |
| 2614 | |
| 2615 | typedef struct KERB_TGS_REP_OUT { |
| 2616 | heim_octet_string cache; |
| 2617 | KERB_CRED cred; |
| 2618 | EncryptionKey subkey; |
| 2619 | } KERB_TGS_REP_OUT; |
| 2620 | |
| 2621 | /* |
| 2622 | KERB-ARMOR-SERVICE-REPLY ::= SEQUENCE { |
| 2623 | armor [0] KrbFastArmor, |
| 2624 | armor-key [1] EncryptionKey, |
| 2625 | } |
| 2626 | */ |
| 2627 | |
| 2628 | typedef struct KERB_ARMOR_SERVICE_REPLY { |
| 2629 | KrbFastArmor armor; |
| 2630 | EncryptionKey armor_key; |
| 2631 | } KERB_ARMOR_SERVICE_REPLY; |
| 2632 | |
| 2633 | ASN1EXP int ASN1CALL decode_KERB_ARMOR_SERVICE_REPLY(const unsigned char *, size_t, KERB_ARMOR_SERVICE_REPLY *, size_t *); |
| 2634 | ASN1EXP int ASN1CALL encode_KERB_ARMOR_SERVICE_REPLY(unsigned char *, size_t, const KERB_ARMOR_SERVICE_REPLY *, size_t *); |
| 2635 | ASN1EXP size_t ASN1CALL length_KERB_ARMOR_SERVICE_REPLY(const KERB_ARMOR_SERVICE_REPLY *); |
| 2636 | ASN1EXP int ASN1CALL copy_KERB_ARMOR_SERVICE_REPLY (const KERB_ARMOR_SERVICE_REPLY *, KERB_ARMOR_SERVICE_REPLY *); |
| 2637 | ASN1EXP void ASN1CALL free_KERB_ARMOR_SERVICE_REPLY (KERB_ARMOR_SERVICE_REPLY *); |
| 2638 | |
| 2639 | |
| 2640 | #endif /* __krb5_asn1_h__ */ |
| 2641 | |