Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

927 lines
28 KiB

  1. #ifndef _KRB5_Module_H_
  2. #define _KRB5_Module_H_
  3. #include "msber.h"
  4. #ifdef __cplusplus
  5. extern "C" {
  6. #endif
  7. typedef struct KERB_KDC_REQUEST_BODY_encryption_type_s * PKERB_KDC_REQUEST_BODY_encryption_type;
  8. typedef struct KERB_PRINCIPAL_NAME_name_string_s * PKERB_PRINCIPAL_NAME_name_string;
  9. typedef struct PKERB_HOST_ADDRESSES_s * PPKERB_HOST_ADDRESSES;
  10. typedef struct PKERB_AUTHORIZATION_DATA_s * PPKERB_AUTHORIZATION_DATA;
  11. typedef struct PKERB_LAST_REQUEST_s * PPKERB_LAST_REQUEST;
  12. typedef struct PKERB_TICKET_EXTENSIONS_s * PPKERB_TICKET_EXTENSIONS;
  13. typedef struct PKERB_PREAUTH_DATA_LIST_s * PPKERB_PREAUTH_DATA_LIST;
  14. typedef struct PKERB_ETYPE_INFO_s * PPKERB_ETYPE_INFO;
  15. typedef struct TYPED_DATA_s * PTYPED_DATA;
  16. typedef struct KERB_KDC_ISSUED_AUTH_DATA_elements_s * PKERB_KDC_ISSUED_AUTH_DATA_elements;
  17. typedef struct KERB_PA_PK_AS_REQ2_trusted_certifiers_s * PKERB_PA_PK_AS_REQ2_trusted_certifiers;
  18. typedef struct KERB_PA_PK_AS_REQ2_user_certs_s * PKERB_PA_PK_AS_REQ2_user_certs;
  19. typedef struct KERB_PA_PK_AS_REP2_kdc_cert_s * PKERB_PA_PK_AS_REP2_kdc_cert;
  20. typedef struct KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data_s * PKERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data;
  21. typedef struct KERB_KDC_REPLY_preauth_data_s * PKERB_KDC_REPLY_preauth_data;
  22. typedef struct KERB_KDC_REQUEST_preauth_data_s * PKERB_KDC_REQUEST_preauth_data;
  23. typedef struct KERB_PA_PK_AS_REQ_trusted_certifiers_s * PKERB_PA_PK_AS_REQ_trusted_certifiers;
  24. typedef struct KERB_ENCRYPTED_CRED_ticket_info_s * PKERB_ENCRYPTED_CRED_ticket_info;
  25. typedef struct KERB_CRED_tickets_s * PKERB_CRED_tickets;
  26. typedef struct KERB_KDC_REQUEST_BODY_additional_tickets_s * PKERB_KDC_REQUEST_BODY_additional_tickets;
  27. typedef ASN1ztcharstring_t KERB_PRINCIPAL_NAME_name_string_Seq;
  28. typedef ASN1int32_t KERB_KDC_REQUEST_BODY_encryption_type_Seq;
  29. typedef ASN1ztcharstring_t KERB_REALM;
  30. typedef PPKERB_AUTHORIZATION_DATA PKERB_AUTHORIZATION_DATA_LIST;
  31. #define PKERB_AUTHORIZATION_DATA_LIST_PDU 0
  32. #define SIZE_KRB5_Module_PDU_0 sizeof(PKERB_AUTHORIZATION_DATA_LIST)
  33. typedef ASN1bitstring_t KERB_KDC_OPTIONS;
  34. typedef ASN1generalizedtime_t KERB_TIME;
  35. typedef ASN1intx_t KERB_SEQUENCE_NUMBER_LARGE;
  36. typedef ASN1uint32_t KERB_SEQUENCE_NUMBER;
  37. typedef ASN1bitstring_t KERB_TICKET_FLAGS;
  38. typedef ASN1bitstring_t KERB_AP_OPTIONS;
  39. typedef ASN1open_t NOCOPYANY;
  40. typedef ASN1int32_t KERB_CERTIFICATE_SERIAL_NUMBER;
  41. typedef PPKERB_AUTHORIZATION_DATA PKERB_IF_RELEVANT_AUTH_DATA;
  42. #define PKERB_IF_RELEVANT_AUTH_DATA_PDU 1
  43. #define SIZE_KRB5_Module_PDU_1 sizeof(PKERB_IF_RELEVANT_AUTH_DATA)
  44. typedef struct KERB_KDC_REQUEST_BODY_encryption_type_s {
  45. PKERB_KDC_REQUEST_BODY_encryption_type next;
  46. KERB_KDC_REQUEST_BODY_encryption_type_Seq value;
  47. } KERB_KDC_REQUEST_BODY_encryption_type_Element, *KERB_KDC_REQUEST_BODY_encryption_type;
  48. typedef struct PKERB_TICKET_EXTENSIONS_Seq {
  49. ASN1int32_t te_type;
  50. ASN1octetstring_t te_data;
  51. } PKERB_TICKET_EXTENSIONS_Seq;
  52. typedef struct KERB_PRINCIPAL_NAME_name_string_s {
  53. PKERB_PRINCIPAL_NAME_name_string next;
  54. KERB_PRINCIPAL_NAME_name_string_Seq value;
  55. } KERB_PRINCIPAL_NAME_name_string_Element, *KERB_PRINCIPAL_NAME_name_string;
  56. typedef struct PKERB_LAST_REQUEST_Seq {
  57. ASN1int32_t last_request_type;
  58. KERB_TIME last_request_value;
  59. } PKERB_LAST_REQUEST_Seq;
  60. typedef struct PKERB_AUTHORIZATION_DATA_Seq {
  61. ASN1int32_t auth_data_type;
  62. ASN1octetstring_t auth_data;
  63. } PKERB_AUTHORIZATION_DATA_Seq;
  64. typedef struct PKERB_HOST_ADDRESSES_Seq {
  65. ASN1int32_t address_type;
  66. ASN1octetstring_t address;
  67. } PKERB_HOST_ADDRESSES_Seq;
  68. typedef struct KERB_HOST_ADDRESS {
  69. ASN1int32_t addr_type;
  70. ASN1octetstring_t address;
  71. } KERB_HOST_ADDRESS;
  72. typedef struct PKERB_HOST_ADDRESSES_s {
  73. PPKERB_HOST_ADDRESSES next;
  74. PKERB_HOST_ADDRESSES_Seq value;
  75. } PKERB_HOST_ADDRESSES_Element, *PKERB_HOST_ADDRESSES;
  76. typedef struct PKERB_AUTHORIZATION_DATA_s {
  77. PPKERB_AUTHORIZATION_DATA next;
  78. PKERB_AUTHORIZATION_DATA_Seq value;
  79. } PKERB_AUTHORIZATION_DATA_Element, *PKERB_AUTHORIZATION_DATA;
  80. typedef struct PKERB_LAST_REQUEST_s {
  81. PPKERB_LAST_REQUEST next;
  82. PKERB_LAST_REQUEST_Seq value;
  83. } PKERB_LAST_REQUEST_Element, *PKERB_LAST_REQUEST;
  84. typedef struct KERB_PRINCIPAL_NAME {
  85. ASN1int32_t name_type;
  86. PKERB_PRINCIPAL_NAME_name_string name_string;
  87. } KERB_PRINCIPAL_NAME;
  88. typedef struct PKERB_TICKET_EXTENSIONS_s {
  89. PPKERB_TICKET_EXTENSIONS next;
  90. PKERB_TICKET_EXTENSIONS_Seq value;
  91. } PKERB_TICKET_EXTENSIONS_Element, *PKERB_TICKET_EXTENSIONS;
  92. typedef struct KERB_TRANSITED_ENCODING {
  93. ASN1int32_t transited_type;
  94. ASN1octetstring_t contents;
  95. } KERB_TRANSITED_ENCODING;
  96. typedef struct KERB_PA_DATA {
  97. ASN1int32_t preauth_data_type;
  98. ASN1octetstring_t preauth_data;
  99. } KERB_PA_DATA;
  100. typedef struct PKERB_PREAUTH_DATA_LIST_s {
  101. PPKERB_PREAUTH_DATA_LIST next;
  102. KERB_PA_DATA value;
  103. } PKERB_PREAUTH_DATA_LIST_Element, *PKERB_PREAUTH_DATA_LIST;
  104. #define PKERB_PREAUTH_DATA_LIST_PDU 2
  105. #define SIZE_KRB5_Module_PDU_2 sizeof(PKERB_PREAUTH_DATA_LIST_Element)
  106. typedef struct KERB_SAFE_BODY {
  107. union {
  108. ASN1uint16_t bit_mask;
  109. ASN1octet_t o[1];
  110. };
  111. ASN1octetstring_t user_data;
  112. # define KERB_SAFE_BODY_timestamp_present 0x80
  113. KERB_TIME timestamp;
  114. # define KERB_SAFE_BODY_usec_present 0x40
  115. ASN1int32_t usec;
  116. # define KERB_SAFE_BODY_sequence_number_present 0x20
  117. KERB_SEQUENCE_NUMBER sequence_number;
  118. KERB_HOST_ADDRESS sender_address;
  119. # define KERB_SAFE_BODY_recipient_address_present 0x10
  120. KERB_HOST_ADDRESS recipient_address;
  121. } KERB_SAFE_BODY;
  122. typedef struct KERB_ENCRYPTED_PRIV {
  123. union {
  124. ASN1uint16_t bit_mask;
  125. ASN1octet_t o[1];
  126. };
  127. ASN1octetstring_t user_data;
  128. # define KERB_ENCRYPTED_PRIV_timestamp_present 0x80
  129. KERB_TIME timestamp;
  130. # define KERB_ENCRYPTED_PRIV_usec_present 0x40
  131. ASN1int32_t usec;
  132. # define KERB_ENCRYPTED_PRIV_sequence_number_present 0x20
  133. KERB_SEQUENCE_NUMBER sequence_number;
  134. KERB_HOST_ADDRESS sender_address;
  135. # define KERB_ENCRYPTED_PRIV_recipient_address_present 0x10
  136. KERB_HOST_ADDRESS recipient_address;
  137. } KERB_ENCRYPTED_PRIV;
  138. #define KERB_ENCRYPTED_PRIV_PDU 3
  139. #define SIZE_KRB5_Module_PDU_3 sizeof(KERB_ENCRYPTED_PRIV)
  140. typedef struct KERB_ENCRYPTED_CRED {
  141. union {
  142. ASN1uint16_t bit_mask;
  143. ASN1octet_t o[1];
  144. };
  145. PKERB_ENCRYPTED_CRED_ticket_info ticket_info;
  146. # define nonce_present 0x80
  147. ASN1int32_t nonce;
  148. # define KERB_ENCRYPTED_CRED_timestamp_present 0x40
  149. KERB_TIME timestamp;
  150. # define KERB_ENCRYPTED_CRED_usec_present 0x20
  151. ASN1int32_t usec;
  152. # define sender_address_present 0x10
  153. KERB_HOST_ADDRESS sender_address;
  154. # define KERB_ENCRYPTED_CRED_recipient_address_present 0x8
  155. KERB_HOST_ADDRESS recipient_address;
  156. } KERB_ENCRYPTED_CRED;
  157. #define KERB_ENCRYPTED_CRED_PDU 4
  158. #define SIZE_KRB5_Module_PDU_4 sizeof(KERB_ENCRYPTED_CRED)
  159. typedef struct KERB_ERROR {
  160. union {
  161. ASN1uint16_t bit_mask;
  162. ASN1octet_t o[1];
  163. };
  164. ASN1int32_t version;
  165. ASN1int32_t message_type;
  166. # define client_time_present 0x80
  167. KERB_TIME client_time;
  168. # define client_usec_present 0x40
  169. ASN1int32_t client_usec;
  170. KERB_TIME server_time;
  171. ASN1int32_t server_usec;
  172. ASN1int32_t error_code;
  173. # define client_realm_present 0x20
  174. KERB_REALM client_realm;
  175. # define KERB_ERROR_client_name_present 0x10
  176. KERB_PRINCIPAL_NAME client_name;
  177. KERB_REALM realm;
  178. KERB_PRINCIPAL_NAME server_name;
  179. # define error_text_present 0x8
  180. ASN1charstring_t error_text;
  181. # define error_data_present 0x4
  182. ASN1octetstring_t error_data;
  183. } KERB_ERROR;
  184. #define KERB_ERROR_PDU 5
  185. #define SIZE_KRB5_Module_PDU_5 sizeof(KERB_ERROR)
  186. typedef struct KERB_ENCRYPTED_DATA {
  187. union {
  188. ASN1uint16_t bit_mask;
  189. ASN1octet_t o[1];
  190. };
  191. ASN1int32_t encryption_type;
  192. # define version_present 0x80
  193. ASN1int32_t version;
  194. ASN1octetstring_t cipher_text;
  195. } KERB_ENCRYPTED_DATA;
  196. #define KERB_ENCRYPTED_DATA_PDU 6
  197. #define SIZE_KRB5_Module_PDU_6 sizeof(KERB_ENCRYPTED_DATA)
  198. typedef struct KERB_ENCRYPTION_KEY {
  199. ASN1int32_t keytype;
  200. ASN1octetstring_t keyvalue;
  201. } KERB_ENCRYPTION_KEY;
  202. #define KERB_ENCRYPTION_KEY_PDU 7
  203. #define SIZE_KRB5_Module_PDU_7 sizeof(KERB_ENCRYPTION_KEY)
  204. typedef struct KERB_CHECKSUM {
  205. ASN1int32_t checksum_type;
  206. ASN1octetstring_t checksum;
  207. } KERB_CHECKSUM;
  208. #define KERB_CHECKSUM_PDU 8
  209. #define SIZE_KRB5_Module_PDU_8 sizeof(KERB_CHECKSUM)
  210. typedef struct KERB_ENCRYPTED_TIMESTAMP {
  211. union {
  212. ASN1uint16_t bit_mask;
  213. ASN1octet_t o[1];
  214. };
  215. KERB_TIME timestamp;
  216. # define KERB_ENCRYPTED_TIMESTAMP_usec_present 0x80
  217. ASN1int32_t usec;
  218. } KERB_ENCRYPTED_TIMESTAMP;
  219. #define KERB_ENCRYPTED_TIMESTAMP_PDU 9
  220. #define SIZE_KRB5_Module_PDU_9 sizeof(KERB_ENCRYPTED_TIMESTAMP)
  221. typedef struct KERB_SALTED_ENCRYPTED_TIMESTAMP {
  222. union {
  223. ASN1uint16_t bit_mask;
  224. ASN1octet_t o[1];
  225. };
  226. KERB_TIME timestamp;
  227. # define KERB_SALTED_ENCRYPTED_TIMESTAMP_usec_present 0x80
  228. ASN1int32_t usec;
  229. ASN1octetstring_t salt;
  230. } KERB_SALTED_ENCRYPTED_TIMESTAMP;
  231. #define KERB_SALTED_ENCRYPTED_TIMESTAMP_PDU 10
  232. #define SIZE_KRB5_Module_PDU_10 sizeof(KERB_SALTED_ENCRYPTED_TIMESTAMP)
  233. typedef struct KERB_ETYPE_INFO_ENTRY {
  234. union {
  235. ASN1uint16_t bit_mask;
  236. ASN1octet_t o[1];
  237. };
  238. ASN1int32_t encryption_type;
  239. # define salt_present 0x80
  240. ASN1octetstring_t salt;
  241. } KERB_ETYPE_INFO_ENTRY;
  242. typedef struct PKERB_ETYPE_INFO_s {
  243. PPKERB_ETYPE_INFO next;
  244. KERB_ETYPE_INFO_ENTRY value;
  245. } PKERB_ETYPE_INFO_Element, *PKERB_ETYPE_INFO;
  246. #define PKERB_ETYPE_INFO_PDU 11
  247. #define SIZE_KRB5_Module_PDU_11 sizeof(PKERB_ETYPE_INFO_Element)
  248. typedef struct KERB_TGT_REQUEST {
  249. union {
  250. ASN1uint16_t bit_mask;
  251. ASN1octet_t o[1];
  252. };
  253. ASN1int32_t version;
  254. ASN1int32_t message_type;
  255. # define KERB_TGT_REQUEST_server_name_present 0x80
  256. KERB_PRINCIPAL_NAME server_name;
  257. # define server_realm_present 0x40
  258. KERB_REALM server_realm;
  259. } KERB_TGT_REQUEST;
  260. #define KERB_TGT_REQUEST_PDU 12
  261. #define SIZE_KRB5_Module_PDU_12 sizeof(KERB_TGT_REQUEST)
  262. typedef struct KERB_PKCS_SIGNATURE {
  263. ASN1int32_t encryption_type;
  264. ASN1octetstring_t signature;
  265. } KERB_PKCS_SIGNATURE;
  266. #define KERB_PKCS_SIGNATURE_PDU 13
  267. #define SIZE_KRB5_Module_PDU_13 sizeof(KERB_PKCS_SIGNATURE)
  268. typedef struct KERB_ALGORITHM_IDENTIFIER {
  269. union {
  270. ASN1uint16_t bit_mask;
  271. ASN1octet_t o[1];
  272. };
  273. ASN1objectidentifier_t algorithm;
  274. # define parameters_present 0x80
  275. NOCOPYANY parameters;
  276. } KERB_ALGORITHM_IDENTIFIER;
  277. typedef struct KERB_SIGNATURE {
  278. KERB_ALGORITHM_IDENTIFIER signature_algorithm;
  279. ASN1bitstring_t pkcs_signature;
  280. } KERB_SIGNATURE;
  281. typedef struct KERB_PA_PK_AS_REP {
  282. ASN1choice_t choice;
  283. union {
  284. # define dh_signed_data_chosen 1
  285. ASN1octetstring_t dh_signed_data;
  286. # define key_package_chosen 2
  287. ASN1octetstring_t key_package;
  288. } u;
  289. } KERB_PA_PK_AS_REP;
  290. #define KERB_PA_PK_AS_REP_PDU 14
  291. #define SIZE_KRB5_Module_PDU_14 sizeof(KERB_PA_PK_AS_REP)
  292. typedef struct KERB_ENVELOPED_KEY_PACKAGE {
  293. ASN1choice_t choice;
  294. union {
  295. # define encrypted_data_chosen 1
  296. KERB_ENCRYPTED_DATA encrypted_data;
  297. # define pkinit_enveloped_data_chosen 2
  298. ASN1octetstring_t pkinit_enveloped_data;
  299. } u;
  300. } KERB_ENVELOPED_KEY_PACKAGE;
  301. typedef struct KERB_REPLY_KEY_PACKAGE2 {
  302. union {
  303. ASN1uint16_t bit_mask;
  304. ASN1octet_t o[1];
  305. };
  306. KERB_ENCRYPTION_KEY reply_key;
  307. ASN1int32_t nonce;
  308. # define subject_public_key_present 0x80
  309. ASN1bitstring_t subject_public_key;
  310. } KERB_REPLY_KEY_PACKAGE2;
  311. #define KERB_REPLY_KEY_PACKAGE2_PDU 15
  312. #define SIZE_KRB5_Module_PDU_15 sizeof(KERB_REPLY_KEY_PACKAGE2)
  313. typedef struct KERB_REPLY_KEY_PACKAGE {
  314. KERB_ENCRYPTION_KEY reply_key;
  315. ASN1int32_t nonce;
  316. } KERB_REPLY_KEY_PACKAGE;
  317. #define KERB_REPLY_KEY_PACKAGE_PDU 16
  318. #define SIZE_KRB5_Module_PDU_16 sizeof(KERB_REPLY_KEY_PACKAGE)
  319. typedef struct KERB_KDC_DH_KEY_INFO {
  320. ASN1int32_t nonce;
  321. ASN1bitstring_t subject_public_key;
  322. } KERB_KDC_DH_KEY_INFO;
  323. #define KERB_KDC_DH_KEY_INFO_PDU 17
  324. #define SIZE_KRB5_Module_PDU_17 sizeof(KERB_KDC_DH_KEY_INFO)
  325. typedef struct KERB_PA_PK_AS_REQ {
  326. union {
  327. ASN1uint16_t bit_mask;
  328. ASN1octet_t o[1];
  329. };
  330. ASN1octetstring_t signed_auth_pack;
  331. # define KERB_PA_PK_AS_REQ_trusted_certifiers_present 0x80
  332. PKERB_PA_PK_AS_REQ_trusted_certifiers trusted_certifiers;
  333. # define KERB_PA_PK_AS_REQ_kdc_cert_present 0x40
  334. ASN1octetstring_t kdc_cert;
  335. # define encryption_cert_present 0x20
  336. ASN1octetstring_t encryption_cert;
  337. } KERB_PA_PK_AS_REQ;
  338. #define KERB_PA_PK_AS_REQ_PDU 18
  339. #define SIZE_KRB5_Module_PDU_18 sizeof(KERB_PA_PK_AS_REQ)
  340. typedef struct KERB_KERBEROS_NAME {
  341. KERB_REALM realm;
  342. KERB_PRINCIPAL_NAME principal_name;
  343. } KERB_KERBEROS_NAME;
  344. typedef struct KERB_PK_AUTHENTICATOR {
  345. KERB_PRINCIPAL_NAME kdc_name;
  346. KERB_REALM kdc_realm;
  347. ASN1int32_t cusec;
  348. KERB_TIME client_time;
  349. ASN1int32_t nonce;
  350. } KERB_PK_AUTHENTICATOR;
  351. typedef struct KERB_SUBJECT_PUBLIC_KEY_INFO {
  352. KERB_ALGORITHM_IDENTIFIER algorithm;
  353. ASN1bitstring_t subjectPublicKey;
  354. } KERB_SUBJECT_PUBLIC_KEY_INFO;
  355. typedef struct KERB_DH_PARAMTER {
  356. union {
  357. ASN1uint16_t bit_mask;
  358. ASN1octet_t o[1];
  359. };
  360. ASN1int32_t prime;
  361. ASN1int32_t base;
  362. # define private_value_length_present 0x80
  363. ASN1int32_t private_value_length;
  364. } KERB_DH_PARAMTER;
  365. #define KERB_DH_PARAMTER_PDU 19
  366. #define SIZE_KRB5_Module_PDU_19 sizeof(KERB_DH_PARAMTER)
  367. typedef struct KERB_CERTIFICATE {
  368. ASN1int32_t cert_type;
  369. ASN1octetstring_t cert_data;
  370. } KERB_CERTIFICATE;
  371. typedef struct KERB_TYPED_DATA {
  372. ASN1int32_t data_type;
  373. ASN1octetstring_t data_value;
  374. } KERB_TYPED_DATA;
  375. typedef struct KERB_KDC_ISSUED_AUTH_DATA {
  376. KERB_SIGNATURE checksum;
  377. PKERB_KDC_ISSUED_AUTH_DATA_elements elements;
  378. } KERB_KDC_ISSUED_AUTH_DATA;
  379. #define KERB_KDC_ISSUED_AUTH_DATA_PDU 20
  380. #define SIZE_KRB5_Module_PDU_20 sizeof(KERB_KDC_ISSUED_AUTH_DATA)
  381. typedef struct KERB_PA_SERV_REFERRAL {
  382. union {
  383. ASN1uint16_t bit_mask;
  384. ASN1octet_t o[1];
  385. };
  386. # define referred_server_name_present 0x80
  387. KERB_PRINCIPAL_NAME referred_server_name;
  388. KERB_REALM referred_server_realm;
  389. } KERB_PA_SERV_REFERRAL;
  390. #define KERB_PA_SERV_REFERRAL_PDU 21
  391. #define SIZE_KRB5_Module_PDU_21 sizeof(KERB_PA_SERV_REFERRAL)
  392. typedef struct KERB_PA_PAC_REQUEST {
  393. ASN1bool_t include_pac;
  394. } KERB_PA_PAC_REQUEST;
  395. #define KERB_PA_PAC_REQUEST_PDU 22
  396. #define SIZE_KRB5_Module_PDU_22 sizeof(KERB_PA_PAC_REQUEST)
  397. typedef struct KERB_CHANGE_PASSWORD_DATA {
  398. union {
  399. ASN1uint16_t bit_mask;
  400. ASN1octet_t o[1];
  401. };
  402. ASN1octetstring_t new_password;
  403. # define target_name_present 0x80
  404. KERB_PRINCIPAL_NAME target_name;
  405. # define target_realm_present 0x40
  406. KERB_REALM target_realm;
  407. } KERB_CHANGE_PASSWORD_DATA;
  408. #define KERB_CHANGE_PASSWORD_DATA_PDU 23
  409. #define SIZE_KRB5_Module_PDU_23 sizeof(KERB_CHANGE_PASSWORD_DATA)
  410. typedef struct KERB_ERROR_METHOD_DATA {
  411. union {
  412. ASN1uint16_t bit_mask;
  413. ASN1octet_t o[1];
  414. };
  415. ASN1int32_t data_type;
  416. # define data_value_present 0x80
  417. ASN1octetstring_t data_value;
  418. } KERB_ERROR_METHOD_DATA;
  419. #define KERB_ERROR_METHOD_DATA_PDU 24
  420. #define SIZE_KRB5_Module_PDU_24 sizeof(KERB_ERROR_METHOD_DATA)
  421. typedef struct KERB_EXT_ERROR {
  422. ASN1int32_t status;
  423. ASN1int32_t klininfo;
  424. ASN1int32_t flags;
  425. } KERB_EXT_ERROR;
  426. #define KERB_EXT_ERROR_PDU 25
  427. #define SIZE_KRB5_Module_PDU_25 sizeof(KERB_EXT_ERROR)
  428. typedef struct TYPED_DATA_s {
  429. PTYPED_DATA next;
  430. KERB_TYPED_DATA value;
  431. } TYPED_DATA_Element, *TYPED_DATA;
  432. #define TYPED_DATA_PDU 26
  433. #define SIZE_KRB5_Module_PDU_26 sizeof(TYPED_DATA_Element)
  434. typedef struct KERB_PA_FOR_USER {
  435. KERB_REALM client_realm;
  436. KERB_PRINCIPAL_NAME client_name;
  437. } KERB_PA_FOR_USER;
  438. #define KERB_PA_FOR_USER_PDU 27
  439. #define SIZE_KRB5_Module_PDU_27 sizeof(KERB_PA_FOR_USER)
  440. typedef struct KERB_KDC_ISSUED_AUTH_DATA_elements_s {
  441. PKERB_KDC_ISSUED_AUTH_DATA_elements next;
  442. KERB_PA_DATA value;
  443. } KERB_KDC_ISSUED_AUTH_DATA_elements_Element, *KERB_KDC_ISSUED_AUTH_DATA_elements;
  444. typedef struct KERB_PA_PK_AS_REQ2_trusted_certifiers_s {
  445. PKERB_PA_PK_AS_REQ2_trusted_certifiers next;
  446. KERB_PRINCIPAL_NAME value;
  447. } KERB_PA_PK_AS_REQ2_trusted_certifiers_Element, *KERB_PA_PK_AS_REQ2_trusted_certifiers;
  448. typedef struct KERB_PA_PK_AS_REQ2_user_certs_s {
  449. PKERB_PA_PK_AS_REQ2_user_certs next;
  450. KERB_CERTIFICATE value;
  451. } KERB_PA_PK_AS_REQ2_user_certs_Element, *KERB_PA_PK_AS_REQ2_user_certs;
  452. typedef struct KERB_PA_PK_AS_REP2_kdc_cert_s {
  453. PKERB_PA_PK_AS_REP2_kdc_cert next;
  454. KERB_CERTIFICATE value;
  455. } KERB_PA_PK_AS_REP2_kdc_cert_Element, *KERB_PA_PK_AS_REP2_kdc_cert;
  456. typedef struct KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data_s {
  457. PKERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data next;
  458. KERB_PA_DATA value;
  459. } KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data_Element, *KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data;
  460. typedef struct KERB_KDC_REPLY_preauth_data_s {
  461. PKERB_KDC_REPLY_preauth_data next;
  462. KERB_PA_DATA value;
  463. } KERB_KDC_REPLY_preauth_data_Element, *KERB_KDC_REPLY_preauth_data;
  464. typedef struct KERB_KDC_REQUEST_preauth_data_s {
  465. PKERB_KDC_REQUEST_preauth_data next;
  466. KERB_PA_DATA value;
  467. } KERB_KDC_REQUEST_preauth_data_Element, *KERB_KDC_REQUEST_preauth_data;
  468. typedef struct KERB_TICKET {
  469. union {
  470. ASN1uint16_t bit_mask;
  471. ASN1octet_t o[1];
  472. };
  473. ASN1int32_t ticket_version;
  474. KERB_REALM realm;
  475. KERB_PRINCIPAL_NAME server_name;
  476. KERB_ENCRYPTED_DATA encrypted_part;
  477. # define ticket_extensions_present 0x80
  478. PPKERB_TICKET_EXTENSIONS ticket_extensions;
  479. } KERB_TICKET;
  480. #define KERB_TICKET_PDU 28
  481. #define SIZE_KRB5_Module_PDU_28 sizeof(KERB_TICKET)
  482. typedef struct KERB_ENCRYPTED_TICKET {
  483. union {
  484. ASN1uint16_t bit_mask;
  485. ASN1octet_t o[1];
  486. };
  487. KERB_TICKET_FLAGS flags;
  488. KERB_ENCRYPTION_KEY key;
  489. KERB_REALM client_realm;
  490. KERB_PRINCIPAL_NAME client_name;
  491. KERB_TRANSITED_ENCODING transited;
  492. KERB_TIME authtime;
  493. # define KERB_ENCRYPTED_TICKET_starttime_present 0x80
  494. KERB_TIME starttime;
  495. KERB_TIME endtime;
  496. # define KERB_ENCRYPTED_TICKET_renew_until_present 0x40
  497. KERB_TIME renew_until;
  498. # define KERB_ENCRYPTED_TICKET_client_addresses_present 0x20
  499. PPKERB_HOST_ADDRESSES client_addresses;
  500. # define KERB_ENCRYPTED_TICKET_authorization_data_present 0x10
  501. PPKERB_AUTHORIZATION_DATA authorization_data;
  502. } KERB_ENCRYPTED_TICKET;
  503. #define KERB_ENCRYPTED_TICKET_PDU 29
  504. #define SIZE_KRB5_Module_PDU_29 sizeof(KERB_ENCRYPTED_TICKET)
  505. typedef struct KERB_AUTHENTICATOR {
  506. union {
  507. ASN1uint16_t bit_mask;
  508. ASN1octet_t o[1];
  509. };
  510. ASN1int32_t authenticator_version;
  511. KERB_REALM client_realm;
  512. KERB_PRINCIPAL_NAME client_name;
  513. # define checksum_present 0x80
  514. KERB_CHECKSUM checksum;
  515. ASN1int32_t client_usec;
  516. KERB_TIME client_time;
  517. # define KERB_AUTHENTICATOR_subkey_present 0x40
  518. KERB_ENCRYPTION_KEY subkey;
  519. # define KERB_AUTHENTICATOR_sequence_number_present 0x20
  520. KERB_SEQUENCE_NUMBER_LARGE sequence_number;
  521. # define KERB_AUTHENTICATOR_authorization_data_present 0x10
  522. PPKERB_AUTHORIZATION_DATA authorization_data;
  523. } KERB_AUTHENTICATOR;
  524. #define KERB_AUTHENTICATOR_PDU 30
  525. #define SIZE_KRB5_Module_PDU_30 sizeof(KERB_AUTHENTICATOR)
  526. typedef struct KERB_KDC_REQUEST_BODY {
  527. union {
  528. ASN1uint16_t bit_mask;
  529. ASN1octet_t o[1];
  530. };
  531. KERB_KDC_OPTIONS kdc_options;
  532. # define KERB_KDC_REQUEST_BODY_client_name_present 0x80
  533. KERB_PRINCIPAL_NAME client_name;
  534. KERB_REALM realm;
  535. # define KERB_KDC_REQUEST_BODY_server_name_present 0x40
  536. KERB_PRINCIPAL_NAME server_name;
  537. # define KERB_KDC_REQUEST_BODY_starttime_present 0x20
  538. KERB_TIME starttime;
  539. KERB_TIME endtime;
  540. # define KERB_KDC_REQUEST_BODY_renew_until_present 0x10
  541. KERB_TIME renew_until;
  542. ASN1int32_t nonce;
  543. PKERB_KDC_REQUEST_BODY_encryption_type encryption_type;
  544. # define addresses_present 0x8
  545. PPKERB_HOST_ADDRESSES addresses;
  546. # define enc_authorization_data_present 0x4
  547. KERB_ENCRYPTED_DATA enc_authorization_data;
  548. # define additional_tickets_present 0x2
  549. PKERB_KDC_REQUEST_BODY_additional_tickets additional_tickets;
  550. } KERB_KDC_REQUEST_BODY;
  551. typedef struct KERB_KDC_REPLY {
  552. union {
  553. ASN1uint16_t bit_mask;
  554. ASN1octet_t o[1];
  555. };
  556. ASN1int32_t version;
  557. ASN1int32_t message_type;
  558. # define KERB_KDC_REPLY_preauth_data_present 0x80
  559. PKERB_KDC_REPLY_preauth_data preauth_data;
  560. KERB_REALM client_realm;
  561. KERB_PRINCIPAL_NAME client_name;
  562. KERB_TICKET ticket;
  563. KERB_ENCRYPTED_DATA encrypted_part;
  564. } KERB_KDC_REPLY;
  565. typedef struct KERB_ENCRYPTED_KDC_REPLY {
  566. union {
  567. ASN1uint16_t bit_mask;
  568. ASN1octet_t o[1];
  569. };
  570. KERB_ENCRYPTION_KEY session_key;
  571. PPKERB_LAST_REQUEST last_request;
  572. ASN1int32_t nonce;
  573. # define key_expiration_present 0x80
  574. KERB_TIME key_expiration;
  575. KERB_TICKET_FLAGS flags;
  576. KERB_TIME authtime;
  577. # define KERB_ENCRYPTED_KDC_REPLY_starttime_present 0x40
  578. KERB_TIME starttime;
  579. KERB_TIME endtime;
  580. # define KERB_ENCRYPTED_KDC_REPLY_renew_until_present 0x20
  581. KERB_TIME renew_until;
  582. KERB_REALM server_realm;
  583. KERB_PRINCIPAL_NAME server_name;
  584. # define KERB_ENCRYPTED_KDC_REPLY_client_addresses_present 0x10
  585. PPKERB_HOST_ADDRESSES client_addresses;
  586. # define encrypted_pa_data_present 0x8
  587. PKERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data encrypted_pa_data;
  588. } KERB_ENCRYPTED_KDC_REPLY;
  589. typedef struct KERB_AP_REQUEST {
  590. ASN1int32_t version;
  591. ASN1int32_t message_type;
  592. KERB_AP_OPTIONS ap_options;
  593. KERB_TICKET ticket;
  594. KERB_ENCRYPTED_DATA authenticator;
  595. } KERB_AP_REQUEST;
  596. #define KERB_AP_REQUEST_PDU 31
  597. #define SIZE_KRB5_Module_PDU_31 sizeof(KERB_AP_REQUEST)
  598. typedef struct KERB_AP_REPLY {
  599. ASN1int32_t version;
  600. ASN1int32_t message_type;
  601. KERB_ENCRYPTED_DATA encrypted_part;
  602. } KERB_AP_REPLY;
  603. #define KERB_AP_REPLY_PDU 32
  604. #define SIZE_KRB5_Module_PDU_32 sizeof(KERB_AP_REPLY)
  605. typedef struct KERB_ENCRYPTED_AP_REPLY {
  606. union {
  607. ASN1uint16_t bit_mask;
  608. ASN1octet_t o[1];
  609. };
  610. KERB_TIME client_time;
  611. ASN1int32_t client_usec;
  612. # define KERB_ENCRYPTED_AP_REPLY_subkey_present 0x80
  613. KERB_ENCRYPTION_KEY subkey;
  614. # define KERB_ENCRYPTED_AP_REPLY_sequence_number_present 0x40
  615. KERB_SEQUENCE_NUMBER sequence_number;
  616. } KERB_ENCRYPTED_AP_REPLY;
  617. #define KERB_ENCRYPTED_AP_REPLY_PDU 33
  618. #define SIZE_KRB5_Module_PDU_33 sizeof(KERB_ENCRYPTED_AP_REPLY)
  619. typedef struct KERB_SAFE_MESSAGE {
  620. ASN1int32_t version;
  621. ASN1int32_t message_type;
  622. KERB_SAFE_BODY safe_body;
  623. KERB_CHECKSUM checksum;
  624. } KERB_SAFE_MESSAGE;
  625. #define KERB_SAFE_MESSAGE_PDU 34
  626. #define SIZE_KRB5_Module_PDU_34 sizeof(KERB_SAFE_MESSAGE)
  627. typedef struct KERB_PRIV_MESSAGE {
  628. ASN1int32_t version;
  629. ASN1int32_t message_type;
  630. KERB_ENCRYPTED_DATA encrypted_part;
  631. } KERB_PRIV_MESSAGE;
  632. #define KERB_PRIV_MESSAGE_PDU 35
  633. #define SIZE_KRB5_Module_PDU_35 sizeof(KERB_PRIV_MESSAGE)
  634. typedef struct KERB_CRED {
  635. ASN1int32_t version;
  636. ASN1int32_t message_type;
  637. PKERB_CRED_tickets tickets;
  638. KERB_ENCRYPTED_DATA encrypted_part;
  639. } KERB_CRED;
  640. #define KERB_CRED_PDU 36
  641. #define SIZE_KRB5_Module_PDU_36 sizeof(KERB_CRED)
  642. typedef struct KERB_CRED_INFO {
  643. union {
  644. ASN1uint16_t bit_mask;
  645. ASN1octet_t o[2];
  646. };
  647. KERB_ENCRYPTION_KEY key;
  648. # define principal_realm_present 0x80
  649. KERB_REALM principal_realm;
  650. # define principal_name_present 0x40
  651. KERB_PRINCIPAL_NAME principal_name;
  652. # define flags_present 0x20
  653. KERB_TICKET_FLAGS flags;
  654. # define authtime_present 0x10
  655. KERB_TIME authtime;
  656. # define KERB_CRED_INFO_starttime_present 0x8
  657. KERB_TIME starttime;
  658. # define endtime_present 0x4
  659. KERB_TIME endtime;
  660. # define KERB_CRED_INFO_renew_until_present 0x2
  661. KERB_TIME renew_until;
  662. # define service_realm_present 0x1
  663. KERB_REALM service_realm;
  664. # define service_name_present 0x8000
  665. KERB_PRINCIPAL_NAME service_name;
  666. # define KERB_CRED_INFO_client_addresses_present 0x4000
  667. PPKERB_HOST_ADDRESSES client_addresses;
  668. } KERB_CRED_INFO;
  669. typedef struct KERB_TGT_REPLY {
  670. ASN1int32_t version;
  671. ASN1int32_t message_type;
  672. KERB_TICKET ticket;
  673. } KERB_TGT_REPLY;
  674. #define KERB_TGT_REPLY_PDU 37
  675. #define SIZE_KRB5_Module_PDU_37 sizeof(KERB_TGT_REPLY)
  676. typedef struct KERB_SIGNED_REPLY_KEY_PACKAGE {
  677. KERB_REPLY_KEY_PACKAGE2 reply_key_package;
  678. KERB_SIGNATURE reply_key_signature;
  679. } KERB_SIGNED_REPLY_KEY_PACKAGE;
  680. #define KERB_SIGNED_REPLY_KEY_PACKAGE_PDU 38
  681. #define SIZE_KRB5_Module_PDU_38 sizeof(KERB_SIGNED_REPLY_KEY_PACKAGE)
  682. typedef struct KERB_SIGNED_KDC_PUBLIC_VALUE {
  683. KERB_SUBJECT_PUBLIC_KEY_INFO kdc_public_value;
  684. KERB_SIGNATURE kdc_public_value_sig;
  685. } KERB_SIGNED_KDC_PUBLIC_VALUE;
  686. typedef struct KERB_TRUSTED_CAS {
  687. ASN1choice_t choice;
  688. union {
  689. # define principal_name_chosen 1
  690. KERB_KERBEROS_NAME principal_name;
  691. # define ca_name_chosen 2
  692. ASN1octetstring_t ca_name;
  693. # define issuer_and_serial_chosen 3
  694. ASN1octetstring_t issuer_and_serial;
  695. } u;
  696. } KERB_TRUSTED_CAS;
  697. typedef struct KERB_AUTH_PACKAGE {
  698. union {
  699. ASN1uint16_t bit_mask;
  700. ASN1octet_t o[1];
  701. };
  702. KERB_PK_AUTHENTICATOR pk_authenticator;
  703. # define client_public_value_present 0x80
  704. KERB_SUBJECT_PUBLIC_KEY_INFO client_public_value;
  705. } KERB_AUTH_PACKAGE;
  706. #define KERB_AUTH_PACKAGE_PDU 39
  707. #define SIZE_KRB5_Module_PDU_39 sizeof(KERB_AUTH_PACKAGE)
  708. typedef struct KERB_PA_PK_AS_REQ_trusted_certifiers_s {
  709. PKERB_PA_PK_AS_REQ_trusted_certifiers next;
  710. KERB_TRUSTED_CAS value;
  711. } KERB_PA_PK_AS_REQ_trusted_certifiers_Element, *KERB_PA_PK_AS_REQ_trusted_certifiers;
  712. typedef struct KERB_ENCRYPTED_CRED_ticket_info_s {
  713. PKERB_ENCRYPTED_CRED_ticket_info next;
  714. KERB_CRED_INFO value;
  715. } KERB_ENCRYPTED_CRED_ticket_info_Element, *KERB_ENCRYPTED_CRED_ticket_info;
  716. typedef struct KERB_CRED_tickets_s {
  717. PKERB_CRED_tickets next;
  718. KERB_TICKET value;
  719. } KERB_CRED_tickets_Element, *KERB_CRED_tickets;
  720. typedef struct KERB_KDC_REQUEST_BODY_additional_tickets_s {
  721. PKERB_KDC_REQUEST_BODY_additional_tickets next;
  722. KERB_TICKET value;
  723. } KERB_KDC_REQUEST_BODY_additional_tickets_Element, *KERB_KDC_REQUEST_BODY_additional_tickets;
  724. typedef struct KERB_KDC_REQUEST {
  725. union {
  726. ASN1uint16_t bit_mask;
  727. ASN1octet_t o[1];
  728. };
  729. ASN1int32_t version;
  730. ASN1int32_t message_type;
  731. # define KERB_KDC_REQUEST_preauth_data_present 0x80
  732. PKERB_KDC_REQUEST_preauth_data preauth_data;
  733. KERB_KDC_REQUEST_BODY request_body;
  734. } KERB_KDC_REQUEST;
  735. typedef KERB_KDC_REQUEST_BODY KERB_MARSHALLED_REQUEST_BODY;
  736. #define KERB_MARSHALLED_REQUEST_BODY_PDU 40
  737. #define SIZE_KRB5_Module_PDU_40 sizeof(KERB_MARSHALLED_REQUEST_BODY)
  738. typedef KERB_KDC_REPLY KERB_AS_REPLY;
  739. #define KERB_AS_REPLY_PDU 41
  740. #define SIZE_KRB5_Module_PDU_41 sizeof(KERB_AS_REPLY)
  741. typedef KERB_KDC_REPLY KERB_TGS_REPLY;
  742. #define KERB_TGS_REPLY_PDU 42
  743. #define SIZE_KRB5_Module_PDU_42 sizeof(KERB_TGS_REPLY)
  744. typedef KERB_ENCRYPTED_KDC_REPLY KERB_ENCRYPTED_AS_REPLY;
  745. #define KERB_ENCRYPTED_AS_REPLY_PDU 43
  746. #define SIZE_KRB5_Module_PDU_43 sizeof(KERB_ENCRYPTED_AS_REPLY)
  747. typedef KERB_ENCRYPTED_KDC_REPLY KERB_ENCRYPTED_TGS_REPLY;
  748. #define KERB_ENCRYPTED_TGS_REPLY_PDU 44
  749. #define SIZE_KRB5_Module_PDU_44 sizeof(KERB_ENCRYPTED_TGS_REPLY)
  750. typedef struct KERB_PA_PK_AS_REP2 {
  751. union {
  752. ASN1uint16_t bit_mask;
  753. ASN1octet_t o[1];
  754. };
  755. # define key_package_present 0x80
  756. KERB_ENCRYPTED_DATA key_package;
  757. KERB_ENVELOPED_KEY_PACKAGE temp_key_package;
  758. # define signed_kdc_public_value_present 0x40
  759. KERB_SIGNED_KDC_PUBLIC_VALUE signed_kdc_public_value;
  760. # define KERB_PA_PK_AS_REP2_kdc_cert_present 0x20
  761. PKERB_PA_PK_AS_REP2_kdc_cert kdc_cert;
  762. } KERB_PA_PK_AS_REP2;
  763. #define KERB_PA_PK_AS_REP2_PDU 45
  764. #define SIZE_KRB5_Module_PDU_45 sizeof(KERB_PA_PK_AS_REP2)
  765. typedef struct KERB_SIGNED_AUTH_PACKAGE {
  766. KERB_AUTH_PACKAGE auth_package;
  767. KERB_SIGNATURE auth_package_signature;
  768. } KERB_SIGNED_AUTH_PACKAGE;
  769. typedef KERB_KDC_REQUEST KERB_AS_REQUEST;
  770. #define KERB_AS_REQUEST_PDU 46
  771. #define SIZE_KRB5_Module_PDU_46 sizeof(KERB_AS_REQUEST)
  772. typedef KERB_KDC_REQUEST KERB_TGS_REQUEST;
  773. #define KERB_TGS_REQUEST_PDU 47
  774. #define SIZE_KRB5_Module_PDU_47 sizeof(KERB_TGS_REQUEST)
  775. typedef struct KERB_PA_PK_AS_REQ2 {
  776. union {
  777. ASN1uint16_t bit_mask;
  778. ASN1octet_t o[1];
  779. };
  780. KERB_SIGNED_AUTH_PACKAGE signed_auth_pack;
  781. # define user_certs_present 0x80
  782. PKERB_PA_PK_AS_REQ2_user_certs user_certs;
  783. # define KERB_PA_PK_AS_REQ2_trusted_certifiers_present 0x40
  784. PKERB_PA_PK_AS_REQ2_trusted_certifiers trusted_certifiers;
  785. # define serial_number_present 0x20
  786. KERB_CERTIFICATE_SERIAL_NUMBER serial_number;
  787. } KERB_PA_PK_AS_REQ2;
  788. #define KERB_PA_PK_AS_REQ2_PDU 48
  789. #define SIZE_KRB5_Module_PDU_48 sizeof(KERB_PA_PK_AS_REQ2)
  790. extern ASN1module_t KRB5_Module;
  791. extern void ASN1CALL KRB5_Module_Startup(void);
  792. extern void ASN1CALL KRB5_Module_Cleanup(void);
  793. /* Prototypes of element functions for SEQUENCE OF and SET OF constructs */
  794. #ifdef __cplusplus
  795. } /* extern "C" */
  796. #endif
  797. #endif /* _KRB5_Module_H_ */