Leaked source code of windows server 2003
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.

935 lines
29 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. union {
  436. ASN1uint16_t bit_mask;
  437. ASN1octet_t o[1];
  438. };
  439. KERB_PRINCIPAL_NAME userName;
  440. KERB_REALM userRealm;
  441. KERB_CHECKSUM cksum;
  442. ASN1ztcharstring_t authentication_package;
  443. # define KERB_PA_FOR_USER_authorization_data_present 0x80
  444. ASN1octetstring_t authorization_data;
  445. } KERB_PA_FOR_USER;
  446. #define KERB_PA_FOR_USER_PDU 27
  447. #define SIZE_KRB5_Module_PDU_27 sizeof(KERB_PA_FOR_USER)
  448. typedef struct KERB_KDC_ISSUED_AUTH_DATA_elements_s {
  449. PKERB_KDC_ISSUED_AUTH_DATA_elements next;
  450. KERB_PA_DATA value;
  451. } KERB_KDC_ISSUED_AUTH_DATA_elements_Element, *KERB_KDC_ISSUED_AUTH_DATA_elements;
  452. typedef struct KERB_PA_PK_AS_REQ2_trusted_certifiers_s {
  453. PKERB_PA_PK_AS_REQ2_trusted_certifiers next;
  454. KERB_PRINCIPAL_NAME value;
  455. } KERB_PA_PK_AS_REQ2_trusted_certifiers_Element, *KERB_PA_PK_AS_REQ2_trusted_certifiers;
  456. typedef struct KERB_PA_PK_AS_REQ2_user_certs_s {
  457. PKERB_PA_PK_AS_REQ2_user_certs next;
  458. KERB_CERTIFICATE value;
  459. } KERB_PA_PK_AS_REQ2_user_certs_Element, *KERB_PA_PK_AS_REQ2_user_certs;
  460. typedef struct KERB_PA_PK_AS_REP2_kdc_cert_s {
  461. PKERB_PA_PK_AS_REP2_kdc_cert next;
  462. KERB_CERTIFICATE value;
  463. } KERB_PA_PK_AS_REP2_kdc_cert_Element, *KERB_PA_PK_AS_REP2_kdc_cert;
  464. typedef struct KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data_s {
  465. PKERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data next;
  466. KERB_PA_DATA value;
  467. } KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data_Element, *KERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data;
  468. typedef struct KERB_KDC_REPLY_preauth_data_s {
  469. PKERB_KDC_REPLY_preauth_data next;
  470. KERB_PA_DATA value;
  471. } KERB_KDC_REPLY_preauth_data_Element, *KERB_KDC_REPLY_preauth_data;
  472. typedef struct KERB_KDC_REQUEST_preauth_data_s {
  473. PKERB_KDC_REQUEST_preauth_data next;
  474. KERB_PA_DATA value;
  475. } KERB_KDC_REQUEST_preauth_data_Element, *KERB_KDC_REQUEST_preauth_data;
  476. typedef struct KERB_TICKET {
  477. union {
  478. ASN1uint16_t bit_mask;
  479. ASN1octet_t o[1];
  480. };
  481. ASN1int32_t ticket_version;
  482. KERB_REALM realm;
  483. KERB_PRINCIPAL_NAME server_name;
  484. KERB_ENCRYPTED_DATA encrypted_part;
  485. # define ticket_extensions_present 0x80
  486. PPKERB_TICKET_EXTENSIONS ticket_extensions;
  487. } KERB_TICKET;
  488. #define KERB_TICKET_PDU 28
  489. #define SIZE_KRB5_Module_PDU_28 sizeof(KERB_TICKET)
  490. typedef struct KERB_ENCRYPTED_TICKET {
  491. union {
  492. ASN1uint16_t bit_mask;
  493. ASN1octet_t o[1];
  494. };
  495. KERB_TICKET_FLAGS flags;
  496. KERB_ENCRYPTION_KEY key;
  497. KERB_REALM client_realm;
  498. KERB_PRINCIPAL_NAME client_name;
  499. KERB_TRANSITED_ENCODING transited;
  500. KERB_TIME authtime;
  501. # define KERB_ENCRYPTED_TICKET_starttime_present 0x80
  502. KERB_TIME starttime;
  503. KERB_TIME endtime;
  504. # define KERB_ENCRYPTED_TICKET_renew_until_present 0x40
  505. KERB_TIME renew_until;
  506. # define KERB_ENCRYPTED_TICKET_client_addresses_present 0x20
  507. PPKERB_HOST_ADDRESSES client_addresses;
  508. # define KERB_ENCRYPTED_TICKET_authorization_data_present 0x10
  509. PPKERB_AUTHORIZATION_DATA authorization_data;
  510. } KERB_ENCRYPTED_TICKET;
  511. #define KERB_ENCRYPTED_TICKET_PDU 29
  512. #define SIZE_KRB5_Module_PDU_29 sizeof(KERB_ENCRYPTED_TICKET)
  513. typedef struct KERB_AUTHENTICATOR {
  514. union {
  515. ASN1uint16_t bit_mask;
  516. ASN1octet_t o[1];
  517. };
  518. ASN1int32_t authenticator_version;
  519. KERB_REALM client_realm;
  520. KERB_PRINCIPAL_NAME client_name;
  521. # define checksum_present 0x80
  522. KERB_CHECKSUM checksum;
  523. ASN1int32_t client_usec;
  524. KERB_TIME client_time;
  525. # define KERB_AUTHENTICATOR_subkey_present 0x40
  526. KERB_ENCRYPTION_KEY subkey;
  527. # define KERB_AUTHENTICATOR_sequence_number_present 0x20
  528. KERB_SEQUENCE_NUMBER_LARGE sequence_number;
  529. # define KERB_AUTHENTICATOR_authorization_data_present 0x10
  530. PPKERB_AUTHORIZATION_DATA authorization_data;
  531. } KERB_AUTHENTICATOR;
  532. #define KERB_AUTHENTICATOR_PDU 30
  533. #define SIZE_KRB5_Module_PDU_30 sizeof(KERB_AUTHENTICATOR)
  534. typedef struct KERB_KDC_REQUEST_BODY {
  535. union {
  536. ASN1uint16_t bit_mask;
  537. ASN1octet_t o[1];
  538. };
  539. KERB_KDC_OPTIONS kdc_options;
  540. # define KERB_KDC_REQUEST_BODY_client_name_present 0x80
  541. KERB_PRINCIPAL_NAME client_name;
  542. KERB_REALM realm;
  543. # define KERB_KDC_REQUEST_BODY_server_name_present 0x40
  544. KERB_PRINCIPAL_NAME server_name;
  545. # define KERB_KDC_REQUEST_BODY_starttime_present 0x20
  546. KERB_TIME starttime;
  547. KERB_TIME endtime;
  548. # define KERB_KDC_REQUEST_BODY_renew_until_present 0x10
  549. KERB_TIME renew_until;
  550. ASN1int32_t nonce;
  551. PKERB_KDC_REQUEST_BODY_encryption_type encryption_type;
  552. # define addresses_present 0x8
  553. PPKERB_HOST_ADDRESSES addresses;
  554. # define enc_authorization_data_present 0x4
  555. KERB_ENCRYPTED_DATA enc_authorization_data;
  556. # define additional_tickets_present 0x2
  557. PKERB_KDC_REQUEST_BODY_additional_tickets additional_tickets;
  558. } KERB_KDC_REQUEST_BODY;
  559. typedef struct KERB_KDC_REPLY {
  560. union {
  561. ASN1uint16_t bit_mask;
  562. ASN1octet_t o[1];
  563. };
  564. ASN1int32_t version;
  565. ASN1int32_t message_type;
  566. # define KERB_KDC_REPLY_preauth_data_present 0x80
  567. PKERB_KDC_REPLY_preauth_data preauth_data;
  568. KERB_REALM client_realm;
  569. KERB_PRINCIPAL_NAME client_name;
  570. KERB_TICKET ticket;
  571. KERB_ENCRYPTED_DATA encrypted_part;
  572. } KERB_KDC_REPLY;
  573. typedef struct KERB_ENCRYPTED_KDC_REPLY {
  574. union {
  575. ASN1uint16_t bit_mask;
  576. ASN1octet_t o[1];
  577. };
  578. KERB_ENCRYPTION_KEY session_key;
  579. PPKERB_LAST_REQUEST last_request;
  580. ASN1int32_t nonce;
  581. # define key_expiration_present 0x80
  582. KERB_TIME key_expiration;
  583. KERB_TICKET_FLAGS flags;
  584. KERB_TIME authtime;
  585. # define KERB_ENCRYPTED_KDC_REPLY_starttime_present 0x40
  586. KERB_TIME starttime;
  587. KERB_TIME endtime;
  588. # define KERB_ENCRYPTED_KDC_REPLY_renew_until_present 0x20
  589. KERB_TIME renew_until;
  590. KERB_REALM server_realm;
  591. KERB_PRINCIPAL_NAME server_name;
  592. # define KERB_ENCRYPTED_KDC_REPLY_client_addresses_present 0x10
  593. PPKERB_HOST_ADDRESSES client_addresses;
  594. # define encrypted_pa_data_present 0x8
  595. PKERB_ENCRYPTED_KDC_REPLY_encrypted_pa_data encrypted_pa_data;
  596. } KERB_ENCRYPTED_KDC_REPLY;
  597. typedef struct KERB_AP_REQUEST {
  598. ASN1int32_t version;
  599. ASN1int32_t message_type;
  600. KERB_AP_OPTIONS ap_options;
  601. KERB_TICKET ticket;
  602. KERB_ENCRYPTED_DATA authenticator;
  603. } KERB_AP_REQUEST;
  604. #define KERB_AP_REQUEST_PDU 31
  605. #define SIZE_KRB5_Module_PDU_31 sizeof(KERB_AP_REQUEST)
  606. typedef struct KERB_AP_REPLY {
  607. ASN1int32_t version;
  608. ASN1int32_t message_type;
  609. KERB_ENCRYPTED_DATA encrypted_part;
  610. } KERB_AP_REPLY;
  611. #define KERB_AP_REPLY_PDU 32
  612. #define SIZE_KRB5_Module_PDU_32 sizeof(KERB_AP_REPLY)
  613. typedef struct KERB_ENCRYPTED_AP_REPLY {
  614. union {
  615. ASN1uint16_t bit_mask;
  616. ASN1octet_t o[1];
  617. };
  618. KERB_TIME client_time;
  619. ASN1int32_t client_usec;
  620. # define KERB_ENCRYPTED_AP_REPLY_subkey_present 0x80
  621. KERB_ENCRYPTION_KEY subkey;
  622. # define KERB_ENCRYPTED_AP_REPLY_sequence_number_present 0x40
  623. KERB_SEQUENCE_NUMBER sequence_number;
  624. } KERB_ENCRYPTED_AP_REPLY;
  625. #define KERB_ENCRYPTED_AP_REPLY_PDU 33
  626. #define SIZE_KRB5_Module_PDU_33 sizeof(KERB_ENCRYPTED_AP_REPLY)
  627. typedef struct KERB_SAFE_MESSAGE {
  628. ASN1int32_t version;
  629. ASN1int32_t message_type;
  630. KERB_SAFE_BODY safe_body;
  631. KERB_CHECKSUM checksum;
  632. } KERB_SAFE_MESSAGE;
  633. #define KERB_SAFE_MESSAGE_PDU 34
  634. #define SIZE_KRB5_Module_PDU_34 sizeof(KERB_SAFE_MESSAGE)
  635. typedef struct KERB_PRIV_MESSAGE {
  636. ASN1int32_t version;
  637. ASN1int32_t message_type;
  638. KERB_ENCRYPTED_DATA encrypted_part;
  639. } KERB_PRIV_MESSAGE;
  640. #define KERB_PRIV_MESSAGE_PDU 35
  641. #define SIZE_KRB5_Module_PDU_35 sizeof(KERB_PRIV_MESSAGE)
  642. typedef struct KERB_CRED {
  643. ASN1int32_t version;
  644. ASN1int32_t message_type;
  645. PKERB_CRED_tickets tickets;
  646. KERB_ENCRYPTED_DATA encrypted_part;
  647. } KERB_CRED;
  648. #define KERB_CRED_PDU 36
  649. #define SIZE_KRB5_Module_PDU_36 sizeof(KERB_CRED)
  650. typedef struct KERB_CRED_INFO {
  651. union {
  652. ASN1uint16_t bit_mask;
  653. ASN1octet_t o[2];
  654. };
  655. KERB_ENCRYPTION_KEY key;
  656. # define principal_realm_present 0x80
  657. KERB_REALM principal_realm;
  658. # define principal_name_present 0x40
  659. KERB_PRINCIPAL_NAME principal_name;
  660. # define flags_present 0x20
  661. KERB_TICKET_FLAGS flags;
  662. # define authtime_present 0x10
  663. KERB_TIME authtime;
  664. # define KERB_CRED_INFO_starttime_present 0x8
  665. KERB_TIME starttime;
  666. # define endtime_present 0x4
  667. KERB_TIME endtime;
  668. # define KERB_CRED_INFO_renew_until_present 0x2
  669. KERB_TIME renew_until;
  670. # define service_realm_present 0x1
  671. KERB_REALM service_realm;
  672. # define service_name_present 0x8000
  673. KERB_PRINCIPAL_NAME service_name;
  674. # define KERB_CRED_INFO_client_addresses_present 0x4000
  675. PPKERB_HOST_ADDRESSES client_addresses;
  676. } KERB_CRED_INFO;
  677. typedef struct KERB_TGT_REPLY {
  678. ASN1int32_t version;
  679. ASN1int32_t message_type;
  680. KERB_TICKET ticket;
  681. } KERB_TGT_REPLY;
  682. #define KERB_TGT_REPLY_PDU 37
  683. #define SIZE_KRB5_Module_PDU_37 sizeof(KERB_TGT_REPLY)
  684. typedef struct KERB_SIGNED_REPLY_KEY_PACKAGE {
  685. KERB_REPLY_KEY_PACKAGE2 reply_key_package;
  686. KERB_SIGNATURE reply_key_signature;
  687. } KERB_SIGNED_REPLY_KEY_PACKAGE;
  688. #define KERB_SIGNED_REPLY_KEY_PACKAGE_PDU 38
  689. #define SIZE_KRB5_Module_PDU_38 sizeof(KERB_SIGNED_REPLY_KEY_PACKAGE)
  690. typedef struct KERB_SIGNED_KDC_PUBLIC_VALUE {
  691. KERB_SUBJECT_PUBLIC_KEY_INFO kdc_public_value;
  692. KERB_SIGNATURE kdc_public_value_sig;
  693. } KERB_SIGNED_KDC_PUBLIC_VALUE;
  694. typedef struct KERB_TRUSTED_CAS {
  695. ASN1choice_t choice;
  696. union {
  697. # define principal_name_chosen 1
  698. KERB_KERBEROS_NAME principal_name;
  699. # define ca_name_chosen 2
  700. ASN1octetstring_t ca_name;
  701. # define issuer_and_serial_chosen 3
  702. ASN1octetstring_t issuer_and_serial;
  703. } u;
  704. } KERB_TRUSTED_CAS;
  705. typedef struct KERB_AUTH_PACKAGE {
  706. union {
  707. ASN1uint16_t bit_mask;
  708. ASN1octet_t o[1];
  709. };
  710. KERB_PK_AUTHENTICATOR pk_authenticator;
  711. # define client_public_value_present 0x80
  712. KERB_SUBJECT_PUBLIC_KEY_INFO client_public_value;
  713. } KERB_AUTH_PACKAGE;
  714. #define KERB_AUTH_PACKAGE_PDU 39
  715. #define SIZE_KRB5_Module_PDU_39 sizeof(KERB_AUTH_PACKAGE)
  716. typedef struct KERB_PA_PK_AS_REQ_trusted_certifiers_s {
  717. PKERB_PA_PK_AS_REQ_trusted_certifiers next;
  718. KERB_TRUSTED_CAS value;
  719. } KERB_PA_PK_AS_REQ_trusted_certifiers_Element, *KERB_PA_PK_AS_REQ_trusted_certifiers;
  720. typedef struct KERB_ENCRYPTED_CRED_ticket_info_s {
  721. PKERB_ENCRYPTED_CRED_ticket_info next;
  722. KERB_CRED_INFO value;
  723. } KERB_ENCRYPTED_CRED_ticket_info_Element, *KERB_ENCRYPTED_CRED_ticket_info;
  724. typedef struct KERB_CRED_tickets_s {
  725. PKERB_CRED_tickets next;
  726. KERB_TICKET value;
  727. } KERB_CRED_tickets_Element, *KERB_CRED_tickets;
  728. typedef struct KERB_KDC_REQUEST_BODY_additional_tickets_s {
  729. PKERB_KDC_REQUEST_BODY_additional_tickets next;
  730. KERB_TICKET value;
  731. } KERB_KDC_REQUEST_BODY_additional_tickets_Element, *KERB_KDC_REQUEST_BODY_additional_tickets;
  732. typedef struct KERB_KDC_REQUEST {
  733. union {
  734. ASN1uint16_t bit_mask;
  735. ASN1octet_t o[1];
  736. };
  737. ASN1int32_t version;
  738. ASN1int32_t message_type;
  739. # define KERB_KDC_REQUEST_preauth_data_present 0x80
  740. PKERB_KDC_REQUEST_preauth_data preauth_data;
  741. KERB_KDC_REQUEST_BODY request_body;
  742. } KERB_KDC_REQUEST;
  743. typedef KERB_KDC_REQUEST_BODY KERB_MARSHALLED_REQUEST_BODY;
  744. #define KERB_MARSHALLED_REQUEST_BODY_PDU 40
  745. #define SIZE_KRB5_Module_PDU_40 sizeof(KERB_MARSHALLED_REQUEST_BODY)
  746. typedef KERB_KDC_REPLY KERB_AS_REPLY;
  747. #define KERB_AS_REPLY_PDU 41
  748. #define SIZE_KRB5_Module_PDU_41 sizeof(KERB_AS_REPLY)
  749. typedef KERB_KDC_REPLY KERB_TGS_REPLY;
  750. #define KERB_TGS_REPLY_PDU 42
  751. #define SIZE_KRB5_Module_PDU_42 sizeof(KERB_TGS_REPLY)
  752. typedef KERB_ENCRYPTED_KDC_REPLY KERB_ENCRYPTED_AS_REPLY;
  753. #define KERB_ENCRYPTED_AS_REPLY_PDU 43
  754. #define SIZE_KRB5_Module_PDU_43 sizeof(KERB_ENCRYPTED_AS_REPLY)
  755. typedef KERB_ENCRYPTED_KDC_REPLY KERB_ENCRYPTED_TGS_REPLY;
  756. #define KERB_ENCRYPTED_TGS_REPLY_PDU 44
  757. #define SIZE_KRB5_Module_PDU_44 sizeof(KERB_ENCRYPTED_TGS_REPLY)
  758. typedef struct KERB_PA_PK_AS_REP2 {
  759. union {
  760. ASN1uint16_t bit_mask;
  761. ASN1octet_t o[1];
  762. };
  763. # define key_package_present 0x80
  764. KERB_ENCRYPTED_DATA key_package;
  765. KERB_ENVELOPED_KEY_PACKAGE temp_key_package;
  766. # define signed_kdc_public_value_present 0x40
  767. KERB_SIGNED_KDC_PUBLIC_VALUE signed_kdc_public_value;
  768. # define KERB_PA_PK_AS_REP2_kdc_cert_present 0x20
  769. PKERB_PA_PK_AS_REP2_kdc_cert kdc_cert;
  770. } KERB_PA_PK_AS_REP2;
  771. #define KERB_PA_PK_AS_REP2_PDU 45
  772. #define SIZE_KRB5_Module_PDU_45 sizeof(KERB_PA_PK_AS_REP2)
  773. typedef struct KERB_SIGNED_AUTH_PACKAGE {
  774. KERB_AUTH_PACKAGE auth_package;
  775. KERB_SIGNATURE auth_package_signature;
  776. } KERB_SIGNED_AUTH_PACKAGE;
  777. typedef KERB_KDC_REQUEST KERB_AS_REQUEST;
  778. #define KERB_AS_REQUEST_PDU 46
  779. #define SIZE_KRB5_Module_PDU_46 sizeof(KERB_AS_REQUEST)
  780. typedef KERB_KDC_REQUEST KERB_TGS_REQUEST;
  781. #define KERB_TGS_REQUEST_PDU 47
  782. #define SIZE_KRB5_Module_PDU_47 sizeof(KERB_TGS_REQUEST)
  783. typedef struct KERB_PA_PK_AS_REQ2 {
  784. union {
  785. ASN1uint16_t bit_mask;
  786. ASN1octet_t o[1];
  787. };
  788. KERB_SIGNED_AUTH_PACKAGE signed_auth_pack;
  789. # define user_certs_present 0x80
  790. PKERB_PA_PK_AS_REQ2_user_certs user_certs;
  791. # define KERB_PA_PK_AS_REQ2_trusted_certifiers_present 0x40
  792. PKERB_PA_PK_AS_REQ2_trusted_certifiers trusted_certifiers;
  793. # define serial_number_present 0x20
  794. KERB_CERTIFICATE_SERIAL_NUMBER serial_number;
  795. } KERB_PA_PK_AS_REQ2;
  796. #define KERB_PA_PK_AS_REQ2_PDU 48
  797. #define SIZE_KRB5_Module_PDU_48 sizeof(KERB_PA_PK_AS_REQ2)
  798. extern ASN1module_t KRB5_Module;
  799. extern void ASN1CALL KRB5_Module_Startup(void);
  800. extern void ASN1CALL KRB5_Module_Cleanup(void);
  801. /* Prototypes of element functions for SEQUENCE OF and SET OF constructs */
  802. #ifdef __cplusplus
  803. } /* extern "C" */
  804. #endif
  805. #endif /* _KRB5_Module_H_ */