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.

650 lines
18 KiB

  1. /* Copyright (C) Microsoft Corporation, 1996 - 1999 All rights reserved. */
  2. /* ASN.1 definitions for GlobalDirectives */
  3. #ifndef _PKCS_Module_H_
  4. #define _PKCS_Module_H_
  5. #include "msber.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. typedef ASN1open_t SignerInfosNC_Set;
  10. typedef ASN1open_t SetOfAny_Set;
  11. typedef ASN1open_t AttributeSetValueNC_Set;
  12. typedef ASN1open_t AttributeSetValue_Set;
  13. typedef ASN1objectidentifier2_t ObjectID;
  14. #define ObjectID_PDU 0
  15. #define SIZE_PKCS_Module_PDU_0 sizeof(ObjectID)
  16. typedef ASN1open_t Any;
  17. typedef ObjectID ObjectIdentifierType;
  18. #define ObjectIdentifierType_PDU 1
  19. #define SIZE_PKCS_Module_PDU_1 sizeof(ObjectIdentifierType)
  20. typedef ASN1octetstring_t OctetStringType;
  21. #define OctetStringType_PDU 2
  22. #define SIZE_PKCS_Module_PDU_2 sizeof(OctetStringType)
  23. typedef ASN1int32_t IntegerType;
  24. #define IntegerType_PDU 3
  25. #define SIZE_PKCS_Module_PDU_3 sizeof(IntegerType)
  26. typedef ASN1intx_t HugeIntegerType;
  27. #define HugeIntegerType_PDU 4
  28. #define SIZE_PKCS_Module_PDU_4 sizeof(HugeIntegerType)
  29. typedef ASN1bitstring_t BitStringType;
  30. typedef ASN1octetstring_t Digest;
  31. typedef ASN1open_t CertificateRevocationList;
  32. typedef ASN1open_t CertificateRevocationListNC;
  33. typedef HugeIntegerType CertificateSerialNumber;
  34. typedef ASN1open_t Name;
  35. typedef ASN1open_t Certificate;
  36. typedef ASN1open_t CertificateNC;
  37. typedef ASN1open_t AlgorithmIdentifierNC;
  38. typedef AlgorithmIdentifierNC DigestAlgorithmIdentifierNC;
  39. typedef ASN1open_t AttributeNC;
  40. typedef AlgorithmIdentifierNC ContentEncryptionAlgIdNC;
  41. typedef ObjectID ContentType;
  42. typedef ASN1octetstring_t Data;
  43. typedef ASN1open_t DigestAlgorithmBlob;
  44. typedef ASN1octetstring_t EncryptedDigest;
  45. typedef ASN1octetstring_t EncryptedDigestNC;
  46. typedef ASN1octetstring_t EncryptedContent;
  47. typedef OctetStringType EncryptedKey;
  48. typedef ASN1open_t CertIdentifierNC;
  49. typedef OctetStringType SubjectKeyIdentifier;
  50. typedef OctetStringType UserKeyingMaterial;
  51. typedef struct AlgorithmIdentifier {
  52. union {
  53. ASN1uint16_t bit_mask;
  54. ASN1octet_t o[1];
  55. };
  56. ObjectID algorithm;
  57. # define AlgorithmIdentifier_parameters_present 0x80
  58. ASN1open_t parameters;
  59. } AlgorithmIdentifier;
  60. #define AlgorithmIdentifier_PDU 5
  61. #define SIZE_PKCS_Module_PDU_5 sizeof(AlgorithmIdentifier)
  62. typedef struct AlgorithmIdentifierNC2 {
  63. union {
  64. ASN1uint16_t bit_mask;
  65. ASN1octet_t o[1];
  66. };
  67. ObjectID algorithm;
  68. # define AlgorithmIdentifierNC2_parameters_present 0x80
  69. ASN1open_t parameters;
  70. } AlgorithmIdentifierNC2;
  71. #define AlgorithmIdentifierNC2_PDU 6
  72. #define SIZE_PKCS_Module_PDU_6 sizeof(AlgorithmIdentifierNC2)
  73. typedef AlgorithmIdentifier DigestAlgorithmIdentifier;
  74. typedef struct AlgorithmIdentifiers {
  75. ASN1uint32_t count;
  76. struct AlgorithmIdentifier *value;
  77. } AlgorithmIdentifiers;
  78. #define AlgorithmIdentifiers_PDU 7
  79. #define SIZE_PKCS_Module_PDU_7 sizeof(AlgorithmIdentifiers)
  80. typedef struct AttributeSetValue {
  81. ASN1uint32_t count;
  82. AttributeSetValue_Set *value;
  83. } AttributeSetValue;
  84. #define AttributeSetValue_PDU 8
  85. #define SIZE_PKCS_Module_PDU_8 sizeof(AttributeSetValue)
  86. typedef struct AttributeSetValueNC {
  87. ASN1uint32_t count;
  88. AttributeSetValueNC_Set *value;
  89. } AttributeSetValueNC;
  90. #define AttributeSetValueNC_PDU 9
  91. #define SIZE_PKCS_Module_PDU_9 sizeof(AttributeSetValueNC)
  92. typedef struct SetOfAny {
  93. ASN1uint32_t count;
  94. SetOfAny_Set *value;
  95. } SetOfAny;
  96. #define SetOfAny_PDU 10
  97. #define SIZE_PKCS_Module_PDU_10 sizeof(SetOfAny)
  98. typedef struct Attribute {
  99. ObjectID attributeType;
  100. AttributeSetValue attributeValue;
  101. } Attribute;
  102. typedef struct AttributeNC2 {
  103. ObjectID attributeType;
  104. AttributeSetValueNC attributeValue;
  105. } AttributeNC2;
  106. #define AttributeNC2_PDU 11
  107. #define SIZE_PKCS_Module_PDU_11 sizeof(AttributeNC2)
  108. typedef struct Attributes {
  109. ASN1uint32_t count;
  110. struct Attribute *value;
  111. } Attributes;
  112. #define Attributes_PDU 12
  113. #define SIZE_PKCS_Module_PDU_12 sizeof(Attributes)
  114. typedef struct AttributesNC {
  115. ASN1uint32_t count;
  116. AttributeNC *value;
  117. } AttributesNC;
  118. #define AttributesNC_PDU 13
  119. #define SIZE_PKCS_Module_PDU_13 sizeof(AttributesNC)
  120. typedef struct AttributesNC2 {
  121. ASN1uint32_t count;
  122. struct AttributeNC2 *value;
  123. } AttributesNC2;
  124. #define AttributesNC2_PDU 14
  125. #define SIZE_PKCS_Module_PDU_14 sizeof(AttributesNC2)
  126. typedef struct Crls {
  127. ASN1uint32_t count;
  128. CertificateRevocationList *value;
  129. } Crls;
  130. typedef struct CrlsNC {
  131. ASN1uint32_t count;
  132. CertificateRevocationListNC *value;
  133. } CrlsNC;
  134. #define CrlsNC_PDU 15
  135. #define SIZE_PKCS_Module_PDU_15 sizeof(CrlsNC)
  136. typedef AlgorithmIdentifier ContentEncryptionAlgId;
  137. typedef AlgorithmIdentifier DigestEncryptionAlgId;
  138. typedef AlgorithmIdentifierNC2 DigestEncryptionAlgIdNC;
  139. typedef struct Certificates {
  140. ASN1uint32_t count;
  141. Certificate *value;
  142. } Certificates;
  143. typedef struct CertificatesNC {
  144. ASN1uint32_t count;
  145. CertificateNC *value;
  146. } CertificatesNC;
  147. #define CertificatesNC_PDU 16
  148. #define SIZE_PKCS_Module_PDU_16 sizeof(CertificatesNC)
  149. typedef struct IssuerAndSerialNumber {
  150. Name issuer;
  151. CertificateSerialNumber serialNumber;
  152. } IssuerAndSerialNumber;
  153. #define IssuerAndSerialNumber_PDU 17
  154. #define SIZE_PKCS_Module_PDU_17 sizeof(IssuerAndSerialNumber)
  155. typedef AlgorithmIdentifier KeyEncryptionAlgId;
  156. typedef struct ContentInfo {
  157. union {
  158. ASN1uint16_t bit_mask;
  159. ASN1octet_t o[1];
  160. };
  161. ContentType contentType;
  162. # define ContentInfo_content_present 0x80
  163. ASN1open_t content;
  164. } ContentInfo;
  165. #define ContentInfo_PDU 18
  166. #define SIZE_PKCS_Module_PDU_18 sizeof(ContentInfo)
  167. typedef struct ContentInfoNC {
  168. union {
  169. ASN1uint16_t bit_mask;
  170. ASN1octet_t o[1];
  171. };
  172. ContentType contentType;
  173. # define ContentInfoNC_content_present 0x80
  174. ASN1open_t content;
  175. } ContentInfoNC;
  176. #define ContentInfoNC_PDU 19
  177. #define SIZE_PKCS_Module_PDU_19 sizeof(ContentInfoNC)
  178. typedef struct DigestAlgorithmIdentifiers {
  179. ASN1uint32_t count;
  180. DigestAlgorithmIdentifier *value;
  181. } DigestAlgorithmIdentifiers;
  182. typedef struct DigestAlgorithmIdentifiersNC {
  183. ASN1uint32_t count;
  184. DigestAlgorithmIdentifierNC *value;
  185. } DigestAlgorithmIdentifiersNC;
  186. #define DigestAlgorithmIdentifiersNC_PDU 20
  187. #define SIZE_PKCS_Module_PDU_20 sizeof(DigestAlgorithmIdentifiersNC)
  188. typedef struct SignerInfos {
  189. ASN1uint32_t count;
  190. struct SignerInfo *value;
  191. } SignerInfos;
  192. #define SignerInfos_PDU 21
  193. #define SIZE_PKCS_Module_PDU_21 sizeof(SignerInfos)
  194. typedef struct DigestAlgorithmBlobs {
  195. ASN1uint32_t count;
  196. DigestAlgorithmBlob *value;
  197. } DigestAlgorithmBlobs;
  198. #define DigestAlgorithmBlobs_PDU 22
  199. #define SIZE_PKCS_Module_PDU_22 sizeof(DigestAlgorithmBlobs)
  200. typedef struct SignerInfosNC {
  201. ASN1uint32_t count;
  202. SignerInfosNC_Set *value;
  203. } SignerInfosNC;
  204. #define SignerInfosNC_PDU 23
  205. #define SIZE_PKCS_Module_PDU_23 sizeof(SignerInfosNC)
  206. typedef struct SignerInfoWithAABlobs {
  207. ASN1uint32_t count;
  208. struct SignerInfoWithAABlob *value;
  209. } SignerInfoWithAABlobs;
  210. #define SignerInfoWithAABlobs_PDU 24
  211. #define SIZE_PKCS_Module_PDU_24 sizeof(SignerInfoWithAABlobs)
  212. typedef struct SignerInfoWithAABlob {
  213. union {
  214. ASN1uint16_t bit_mask;
  215. ASN1octet_t o[1];
  216. };
  217. ASN1open_t version;
  218. ASN1open_t sid;
  219. ASN1open_t digestAlgorithm;
  220. ASN1open_t authenticatedAttributes;
  221. ASN1open_t digestEncryptionAlgorithm;
  222. ASN1open_t encryptedDigest;
  223. # define dummyUAAs_present 0x80
  224. AttributesNC dummyUAAs;
  225. } SignerInfoWithAABlob;
  226. #define SignerInfoWithAABlob_PDU 25
  227. #define SIZE_PKCS_Module_PDU_25 sizeof(SignerInfoWithAABlob)
  228. typedef struct SignerInfoWithAttrBlobs {
  229. union {
  230. ASN1uint16_t bit_mask;
  231. ASN1octet_t o[1];
  232. };
  233. ASN1open_t version;
  234. ASN1open_t sid;
  235. ASN1open_t digestAlgorithm;
  236. # define SignerInfoWithAttrBlobs_authAttributes_present 0x80
  237. AttributesNC authAttributes;
  238. DigestEncryptionAlgIdNC digestEncryptionAlgorithm;
  239. ASN1open_t encryptedDigest;
  240. # define SignerInfoWithAttrBlobs_unauthAttributes_present 0x40
  241. AttributesNC unauthAttributes;
  242. } SignerInfoWithAttrBlobs;
  243. #define SignerInfoWithAttrBlobs_PDU 26
  244. #define SIZE_PKCS_Module_PDU_26 sizeof(SignerInfoWithAttrBlobs)
  245. typedef struct SignerInfoWithBlobs {
  246. union {
  247. ASN1uint16_t bit_mask;
  248. ASN1octet_t o[1];
  249. };
  250. ASN1int32_t version;
  251. CertIdentifierNC sid;
  252. DigestAlgorithmIdentifierNC digestAlgorithm;
  253. # define SignerInfoWithBlobs_authAttributes_present 0x80
  254. AttributesNC2 authAttributes;
  255. DigestEncryptionAlgIdNC digestEncryptionAlgorithm;
  256. EncryptedDigestNC encryptedDigest;
  257. # define SignerInfoWithBlobs_unauthAttributes_present 0x40
  258. AttributesNC2 unauthAttributes;
  259. } SignerInfoWithBlobs;
  260. #define SignerInfoWithBlobs_PDU 27
  261. #define SIZE_PKCS_Module_PDU_27 sizeof(SignerInfoWithBlobs)
  262. typedef struct RecipientInfos {
  263. ASN1uint32_t count;
  264. struct RecipientInfo *value;
  265. } RecipientInfos;
  266. #define RecipientInfos_PDU 28
  267. #define SIZE_PKCS_Module_PDU_28 sizeof(RecipientInfos)
  268. typedef struct EncryptedContentInfo {
  269. union {
  270. ASN1uint16_t bit_mask;
  271. ASN1octet_t o[1];
  272. };
  273. ContentType contentType;
  274. ContentEncryptionAlgId contentEncryptionAlgorithm;
  275. # define encryptedContent_present 0x80
  276. EncryptedContent encryptedContent;
  277. } EncryptedContentInfo;
  278. #define EncryptedContentInfo_PDU 29
  279. #define SIZE_PKCS_Module_PDU_29 sizeof(EncryptedContentInfo)
  280. typedef struct RecipientInfo {
  281. ASN1int32_t version;
  282. IssuerAndSerialNumber issuerAndSerialNumber;
  283. KeyEncryptionAlgId keyEncryptionAlgorithm;
  284. EncryptedKey encryptedKey;
  285. } RecipientInfo;
  286. #define RecipientInfo_PDU 30
  287. #define SIZE_PKCS_Module_PDU_30 sizeof(RecipientInfo)
  288. typedef struct SignedAndEnvelopedData {
  289. union {
  290. ASN1uint16_t bit_mask;
  291. ASN1octet_t o[1];
  292. };
  293. ASN1int32_t version;
  294. RecipientInfos recipientInfos;
  295. DigestAlgorithmIdentifiers digestAlgorithms;
  296. EncryptedContentInfo encryptedContentInfo;
  297. # define SignedAndEnvelopedData_certificates_present 0x80
  298. Certificates certificates;
  299. # define SignedAndEnvelopedData_crls_present 0x40
  300. Crls crls;
  301. SignerInfos signerInfos;
  302. } SignedAndEnvelopedData;
  303. #define SignedAndEnvelopedData_PDU 31
  304. #define SIZE_PKCS_Module_PDU_31 sizeof(SignedAndEnvelopedData)
  305. typedef struct DigestedData {
  306. ASN1int32_t version;
  307. DigestAlgorithmIdentifier digestAlgorithm;
  308. ContentInfo contentInfo;
  309. Digest digest;
  310. } DigestedData;
  311. #define DigestedData_PDU 32
  312. #define SIZE_PKCS_Module_PDU_32 sizeof(DigestedData)
  313. typedef struct EncryptedData {
  314. ASN1int32_t version;
  315. EncryptedContentInfo encryptedContentInfo;
  316. } EncryptedData;
  317. #define EncryptedData_PDU 33
  318. #define SIZE_PKCS_Module_PDU_33 sizeof(EncryptedData)
  319. typedef struct CertIdentifier {
  320. ASN1choice_t choice;
  321. union {
  322. # define CertIdentifier_issuerAndSerialNumber_chosen 1
  323. IssuerAndSerialNumber issuerAndSerialNumber;
  324. # define CertIdentifier_subjectKeyIdentifier_chosen 2
  325. SubjectKeyIdentifier subjectKeyIdentifier;
  326. } u;
  327. } CertIdentifier;
  328. #define CertIdentifier_PDU 34
  329. #define SIZE_PKCS_Module_PDU_34 sizeof(CertIdentifier)
  330. typedef struct OriginatorInfo {
  331. union {
  332. ASN1uint16_t bit_mask;
  333. ASN1octet_t o[1];
  334. };
  335. # define OriginatorInfo_certificates_present 0x80
  336. Certificates certificates;
  337. # define OriginatorInfo_crls_present 0x40
  338. Crls crls;
  339. } OriginatorInfo;
  340. #define OriginatorInfo_PDU 35
  341. #define SIZE_PKCS_Module_PDU_35 sizeof(OriginatorInfo)
  342. typedef struct OriginatorInfoNC {
  343. union {
  344. ASN1uint16_t bit_mask;
  345. ASN1octet_t o[1];
  346. };
  347. # define OriginatorInfoNC_certificates_present 0x80
  348. CertificatesNC certificates;
  349. # define OriginatorInfoNC_crls_present 0x40
  350. CrlsNC crls;
  351. } OriginatorInfoNC;
  352. #define OriginatorInfoNC_PDU 36
  353. #define SIZE_PKCS_Module_PDU_36 sizeof(OriginatorInfoNC)
  354. typedef struct CmsRecipientInfos {
  355. ASN1uint32_t count;
  356. struct CmsRecipientInfo *value;
  357. } CmsRecipientInfos;
  358. #define CmsRecipientInfos_PDU 37
  359. #define SIZE_PKCS_Module_PDU_37 sizeof(CmsRecipientInfos)
  360. typedef struct KeyTransRecipientInfo {
  361. ASN1int32_t version;
  362. CertIdentifier rid;
  363. KeyEncryptionAlgId keyEncryptionAlgorithm;
  364. EncryptedKey encryptedKey;
  365. } KeyTransRecipientInfo;
  366. #define KeyTransRecipientInfo_PDU 38
  367. #define SIZE_PKCS_Module_PDU_38 sizeof(KeyTransRecipientInfo)
  368. typedef struct OriginatorPublicKey {
  369. AlgorithmIdentifier algorithm;
  370. BitStringType publicKey;
  371. } OriginatorPublicKey;
  372. typedef struct RecipientEncryptedKeys {
  373. ASN1uint32_t count;
  374. struct RecipientEncryptedKey *value;
  375. } RecipientEncryptedKeys;
  376. typedef struct OtherKeyAttribute {
  377. union {
  378. ASN1uint16_t bit_mask;
  379. ASN1octet_t o[1];
  380. };
  381. ObjectID keyAttrId;
  382. # define keyAttr_present 0x80
  383. ASN1open_t keyAttr;
  384. } OtherKeyAttribute;
  385. typedef struct MailListKeyIdentifier {
  386. union {
  387. ASN1uint16_t bit_mask;
  388. ASN1octet_t o[1];
  389. };
  390. OctetStringType kekIdentifier;
  391. # define MailListKeyIdentifier_date_present 0x80
  392. ASN1generalizedtime_t date;
  393. # define MailListKeyIdentifier_other_present 0x40
  394. OtherKeyAttribute other;
  395. } MailListKeyIdentifier;
  396. typedef struct DigestInfo {
  397. DigestAlgorithmIdentifier digestAlgorithm;
  398. Digest digest;
  399. } DigestInfo;
  400. #define DigestInfo_PDU 39
  401. #define SIZE_PKCS_Module_PDU_39 sizeof(DigestInfo)
  402. typedef struct SignedData {
  403. union {
  404. ASN1uint16_t bit_mask;
  405. ASN1octet_t o[1];
  406. };
  407. ASN1int32_t version;
  408. DigestAlgorithmIdentifiers digestAlgorithms;
  409. ContentInfo contentInfo;
  410. # define SignedData_certificates_present 0x80
  411. Certificates certificates;
  412. # define SignedData_crls_present 0x40
  413. Crls crls;
  414. SignerInfos signerInfos;
  415. } SignedData;
  416. #define SignedData_PDU 40
  417. #define SIZE_PKCS_Module_PDU_40 sizeof(SignedData)
  418. typedef struct SignerInfo {
  419. union {
  420. ASN1uint16_t bit_mask;
  421. ASN1octet_t o[1];
  422. };
  423. ASN1int32_t version;
  424. CertIdentifier sid;
  425. DigestAlgorithmIdentifier digestAlgorithm;
  426. # define authenticatedAttributes_present 0x80
  427. Attributes authenticatedAttributes;
  428. DigestEncryptionAlgId digestEncryptionAlgorithm;
  429. EncryptedDigest encryptedDigest;
  430. # define SignerInfo_unauthAttributes_present 0x40
  431. Attributes unauthAttributes;
  432. } SignerInfo;
  433. #define SignerInfo_PDU 41
  434. #define SIZE_PKCS_Module_PDU_41 sizeof(SignerInfo)
  435. typedef struct SignedDataWithBlobs {
  436. union {
  437. ASN1uint16_t bit_mask;
  438. ASN1octet_t o[1];
  439. };
  440. ASN1int32_t version;
  441. DigestAlgorithmIdentifiersNC digestAlgorithms;
  442. ContentInfoNC contentInfo;
  443. # define SignedDataWithBlobs_certificates_present 0x80
  444. CertificatesNC certificates;
  445. # define SignedDataWithBlobs_crls_present 0x40
  446. CrlsNC crls;
  447. SignerInfosNC signerInfos;
  448. } SignedDataWithBlobs;
  449. #define SignedDataWithBlobs_PDU 42
  450. #define SIZE_PKCS_Module_PDU_42 sizeof(SignedDataWithBlobs)
  451. typedef struct EnvelopedData {
  452. ASN1int32_t version;
  453. RecipientInfos recipientInfos;
  454. EncryptedContentInfo encryptedContentInfo;
  455. } EnvelopedData;
  456. #define EnvelopedData_PDU 43
  457. #define SIZE_PKCS_Module_PDU_43 sizeof(EnvelopedData)
  458. typedef struct CmsEnvelopedData {
  459. union {
  460. ASN1uint16_t bit_mask;
  461. ASN1octet_t o[1];
  462. };
  463. ASN1int32_t version;
  464. # define originatorInfo_present 0x80
  465. OriginatorInfo originatorInfo;
  466. CmsRecipientInfos recipientInfos;
  467. EncryptedContentInfo encryptedContentInfo;
  468. # define unprotectedAttrs_present 0x40
  469. Attributes unprotectedAttrs;
  470. } CmsEnvelopedData;
  471. #define CmsEnvelopedData_PDU 44
  472. #define SIZE_PKCS_Module_PDU_44 sizeof(CmsEnvelopedData)
  473. typedef struct OriginatorIdentifierOrKey {
  474. ASN1choice_t choice;
  475. union {
  476. # define OriginatorIdentifierOrKey_issuerAndSerialNumber_chosen 1
  477. IssuerAndSerialNumber issuerAndSerialNumber;
  478. # define OriginatorIdentifierOrKey_subjectKeyIdentifier_chosen 2
  479. SubjectKeyIdentifier subjectKeyIdentifier;
  480. # define originatorKey_chosen 3
  481. OriginatorPublicKey originatorKey;
  482. } u;
  483. } OriginatorIdentifierOrKey;
  484. typedef struct RecipientKeyIdentifier {
  485. union {
  486. ASN1uint16_t bit_mask;
  487. ASN1octet_t o[1];
  488. };
  489. SubjectKeyIdentifier subjectKeyIdentifier;
  490. # define RecipientKeyIdentifier_date_present 0x80
  491. ASN1generalizedtime_t date;
  492. # define RecipientKeyIdentifier_other_present 0x40
  493. OtherKeyAttribute other;
  494. } RecipientKeyIdentifier;
  495. typedef struct MailListRecipientInfo {
  496. ASN1int32_t version;
  497. MailListKeyIdentifier mlid;
  498. KeyEncryptionAlgId keyEncryptionAlgorithm;
  499. EncryptedKey encryptedKey;
  500. } MailListRecipientInfo;
  501. #define MailListRecipientInfo_PDU 45
  502. #define SIZE_PKCS_Module_PDU_45 sizeof(MailListRecipientInfo)
  503. typedef struct KeyAgreeRecipientInfo {
  504. union {
  505. ASN1uint16_t bit_mask;
  506. ASN1octet_t o[1];
  507. };
  508. ASN1int32_t version;
  509. OriginatorIdentifierOrKey originator;
  510. # define ukm_present 0x80
  511. UserKeyingMaterial ukm;
  512. KeyEncryptionAlgId keyEncryptionAlgorithm;
  513. RecipientEncryptedKeys recipientEncryptedKeys;
  514. } KeyAgreeRecipientInfo;
  515. #define KeyAgreeRecipientInfo_PDU 46
  516. #define SIZE_PKCS_Module_PDU_46 sizeof(KeyAgreeRecipientInfo)
  517. typedef struct RecipientIdentifier {
  518. ASN1choice_t choice;
  519. union {
  520. # define RecipientIdentifier_issuerAndSerialNumber_chosen 1
  521. IssuerAndSerialNumber issuerAndSerialNumber;
  522. # define rKeyId_chosen 2
  523. RecipientKeyIdentifier rKeyId;
  524. } u;
  525. } RecipientIdentifier;
  526. typedef struct CmsRecipientInfo {
  527. ASN1choice_t choice;
  528. union {
  529. # define keyTransRecipientInfo_chosen 1
  530. KeyTransRecipientInfo keyTransRecipientInfo;
  531. # define keyAgreeRecipientInfo_chosen 2
  532. KeyAgreeRecipientInfo keyAgreeRecipientInfo;
  533. # define mailListRecipientInfo_chosen 3
  534. MailListRecipientInfo mailListRecipientInfo;
  535. } u;
  536. } CmsRecipientInfo;
  537. #define CmsRecipientInfo_PDU 47
  538. #define SIZE_PKCS_Module_PDU_47 sizeof(CmsRecipientInfo)
  539. typedef struct RecipientEncryptedKey {
  540. RecipientIdentifier rid;
  541. EncryptedKey encryptedKey;
  542. } RecipientEncryptedKey;
  543. extern ASN1module_t PKCS_Module;
  544. extern void ASN1CALL PKCS_Module_Startup(void);
  545. extern void ASN1CALL PKCS_Module_Cleanup(void);
  546. /* Prototypes of element functions for SEQUENCE OF and SET OF constructs */
  547. #ifdef __cplusplus
  548. } /* extern "C" */
  549. #endif
  550. #endif /* _PKCS_Module_H_ */