cms_local.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. /*
  2. * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef OSSL_CRYPTO_CMS_LOCAL_H
  10. # define OSSL_CRYPTO_CMS_LOCAL_H
  11. # include <openssl/x509.h>
  12. /*
  13. * Cryptographic message syntax (CMS) structures: taken from RFC3852
  14. */
  15. /* Forward references */
  16. typedef struct CMS_IssuerAndSerialNumber_st CMS_IssuerAndSerialNumber;
  17. typedef struct CMS_EncapsulatedContentInfo_st CMS_EncapsulatedContentInfo;
  18. typedef struct CMS_SignerIdentifier_st CMS_SignerIdentifier;
  19. typedef struct CMS_OtherRevocationInfoFormat_st CMS_OtherRevocationInfoFormat;
  20. typedef struct CMS_OriginatorInfo_st CMS_OriginatorInfo;
  21. typedef struct CMS_EncryptedContentInfo_st CMS_EncryptedContentInfo;
  22. typedef struct CMS_DigestedData_st CMS_DigestedData;
  23. typedef struct CMS_EncryptedData_st CMS_EncryptedData;
  24. typedef struct CMS_AuthenticatedData_st CMS_AuthenticatedData;
  25. typedef struct CMS_AuthEnvelopedData_st CMS_AuthEnvelopedData;
  26. typedef struct CMS_CompressedData_st CMS_CompressedData;
  27. typedef struct CMS_OtherCertificateFormat_st CMS_OtherCertificateFormat;
  28. typedef struct CMS_KeyTransRecipientInfo_st CMS_KeyTransRecipientInfo;
  29. typedef struct CMS_OriginatorPublicKey_st CMS_OriginatorPublicKey;
  30. typedef struct CMS_OriginatorIdentifierOrKey_st CMS_OriginatorIdentifierOrKey;
  31. typedef struct CMS_KeyAgreeRecipientInfo_st CMS_KeyAgreeRecipientInfo;
  32. typedef struct CMS_RecipientKeyIdentifier_st CMS_RecipientKeyIdentifier;
  33. typedef struct CMS_KeyAgreeRecipientIdentifier_st
  34. CMS_KeyAgreeRecipientIdentifier;
  35. typedef struct CMS_KEKIdentifier_st CMS_KEKIdentifier;
  36. typedef struct CMS_KEKRecipientInfo_st CMS_KEKRecipientInfo;
  37. typedef struct CMS_PasswordRecipientInfo_st CMS_PasswordRecipientInfo;
  38. typedef struct CMS_OtherRecipientInfo_st CMS_OtherRecipientInfo;
  39. typedef struct CMS_ReceiptsFrom_st CMS_ReceiptsFrom;
  40. typedef struct CMS_CTX_st CMS_CTX;
  41. struct CMS_CTX_st {
  42. OSSL_LIB_CTX *libctx;
  43. char *propq;
  44. };
  45. struct CMS_ContentInfo_st {
  46. ASN1_OBJECT *contentType;
  47. union {
  48. ASN1_OCTET_STRING *data;
  49. CMS_SignedData *signedData;
  50. CMS_EnvelopedData *envelopedData;
  51. CMS_DigestedData *digestedData;
  52. CMS_EncryptedData *encryptedData;
  53. CMS_AuthEnvelopedData *authEnvelopedData;
  54. CMS_AuthenticatedData *authenticatedData;
  55. CMS_CompressedData *compressedData;
  56. ASN1_TYPE *other;
  57. /* Other types ... */
  58. void *otherData;
  59. } d;
  60. CMS_CTX ctx;
  61. };
  62. DEFINE_STACK_OF(CMS_CertificateChoices)
  63. struct CMS_SignedData_st {
  64. int32_t version;
  65. STACK_OF(X509_ALGOR) *digestAlgorithms;
  66. CMS_EncapsulatedContentInfo *encapContentInfo;
  67. STACK_OF(CMS_CertificateChoices) *certificates;
  68. STACK_OF(CMS_RevocationInfoChoice) *crls;
  69. STACK_OF(CMS_SignerInfo) *signerInfos;
  70. };
  71. struct CMS_EncapsulatedContentInfo_st {
  72. ASN1_OBJECT *eContentType;
  73. ASN1_OCTET_STRING *eContent;
  74. /* Set to 1 if incomplete structure only part set up */
  75. int partial;
  76. };
  77. struct CMS_SignerInfo_st {
  78. int32_t version;
  79. CMS_SignerIdentifier *sid;
  80. X509_ALGOR *digestAlgorithm;
  81. STACK_OF(X509_ATTRIBUTE) *signedAttrs;
  82. X509_ALGOR *signatureAlgorithm;
  83. ASN1_OCTET_STRING *signature;
  84. STACK_OF(X509_ATTRIBUTE) *unsignedAttrs;
  85. /* Signing certificate and key */
  86. X509 *signer;
  87. EVP_PKEY *pkey;
  88. /* Digest and public key context for alternative parameters */
  89. EVP_MD_CTX *mctx;
  90. EVP_PKEY_CTX *pctx;
  91. const CMS_CTX *cms_ctx;
  92. };
  93. struct CMS_SignerIdentifier_st {
  94. int type;
  95. union {
  96. CMS_IssuerAndSerialNumber *issuerAndSerialNumber;
  97. ASN1_OCTET_STRING *subjectKeyIdentifier;
  98. } d;
  99. };
  100. struct CMS_EnvelopedData_st {
  101. int32_t version;
  102. CMS_OriginatorInfo *originatorInfo;
  103. STACK_OF(CMS_RecipientInfo) *recipientInfos;
  104. CMS_EncryptedContentInfo *encryptedContentInfo;
  105. STACK_OF(X509_ATTRIBUTE) *unprotectedAttrs;
  106. };
  107. struct CMS_OriginatorInfo_st {
  108. STACK_OF(CMS_CertificateChoices) *certificates;
  109. STACK_OF(CMS_RevocationInfoChoice) *crls;
  110. };
  111. struct CMS_EncryptedContentInfo_st {
  112. ASN1_OBJECT *contentType;
  113. X509_ALGOR *contentEncryptionAlgorithm;
  114. ASN1_OCTET_STRING *encryptedContent;
  115. /* Content encryption algorithm, key and tag */
  116. const EVP_CIPHER *cipher;
  117. unsigned char *key;
  118. size_t keylen;
  119. unsigned char *tag;
  120. size_t taglen;
  121. /* Set to 1 if we are debugging decrypt and don't fake keys for MMA */
  122. int debug;
  123. /* Set to 1 if we have no cert and need extra safety measures for MMA */
  124. int havenocert;
  125. };
  126. struct CMS_RecipientInfo_st {
  127. int type;
  128. union {
  129. CMS_KeyTransRecipientInfo *ktri;
  130. CMS_KeyAgreeRecipientInfo *kari;
  131. CMS_KEKRecipientInfo *kekri;
  132. CMS_PasswordRecipientInfo *pwri;
  133. CMS_OtherRecipientInfo *ori;
  134. } d;
  135. };
  136. typedef CMS_SignerIdentifier CMS_RecipientIdentifier;
  137. struct CMS_KeyTransRecipientInfo_st {
  138. int32_t version;
  139. CMS_RecipientIdentifier *rid;
  140. X509_ALGOR *keyEncryptionAlgorithm;
  141. ASN1_OCTET_STRING *encryptedKey;
  142. /* Recipient Key and cert */
  143. X509 *recip;
  144. EVP_PKEY *pkey;
  145. /* Public key context for this operation */
  146. EVP_PKEY_CTX *pctx;
  147. const CMS_CTX *cms_ctx;
  148. };
  149. struct CMS_KeyAgreeRecipientInfo_st {
  150. int32_t version;
  151. CMS_OriginatorIdentifierOrKey *originator;
  152. ASN1_OCTET_STRING *ukm;
  153. X509_ALGOR *keyEncryptionAlgorithm;
  154. STACK_OF(CMS_RecipientEncryptedKey) *recipientEncryptedKeys;
  155. /* Public key context associated with current operation */
  156. EVP_PKEY_CTX *pctx;
  157. /* Cipher context for CEK wrapping */
  158. EVP_CIPHER_CTX *ctx;
  159. const CMS_CTX *cms_ctx;
  160. };
  161. struct CMS_OriginatorIdentifierOrKey_st {
  162. int type;
  163. union {
  164. CMS_IssuerAndSerialNumber *issuerAndSerialNumber;
  165. ASN1_OCTET_STRING *subjectKeyIdentifier;
  166. CMS_OriginatorPublicKey *originatorKey;
  167. } d;
  168. };
  169. struct CMS_OriginatorPublicKey_st {
  170. X509_ALGOR *algorithm;
  171. ASN1_BIT_STRING *publicKey;
  172. };
  173. struct CMS_RecipientEncryptedKey_st {
  174. CMS_KeyAgreeRecipientIdentifier *rid;
  175. ASN1_OCTET_STRING *encryptedKey;
  176. /* Public key associated with this recipient */
  177. EVP_PKEY *pkey;
  178. };
  179. struct CMS_KeyAgreeRecipientIdentifier_st {
  180. int type;
  181. union {
  182. CMS_IssuerAndSerialNumber *issuerAndSerialNumber;
  183. CMS_RecipientKeyIdentifier *rKeyId;
  184. } d;
  185. };
  186. struct CMS_RecipientKeyIdentifier_st {
  187. ASN1_OCTET_STRING *subjectKeyIdentifier;
  188. ASN1_GENERALIZEDTIME *date;
  189. CMS_OtherKeyAttribute *other;
  190. };
  191. struct CMS_KEKRecipientInfo_st {
  192. int32_t version;
  193. CMS_KEKIdentifier *kekid;
  194. X509_ALGOR *keyEncryptionAlgorithm;
  195. ASN1_OCTET_STRING *encryptedKey;
  196. /* Extra info: symmetric key to use */
  197. unsigned char *key;
  198. size_t keylen;
  199. const CMS_CTX *cms_ctx;
  200. };
  201. struct CMS_KEKIdentifier_st {
  202. ASN1_OCTET_STRING *keyIdentifier;
  203. ASN1_GENERALIZEDTIME *date;
  204. CMS_OtherKeyAttribute *other;
  205. };
  206. struct CMS_PasswordRecipientInfo_st {
  207. int32_t version;
  208. X509_ALGOR *keyDerivationAlgorithm;
  209. X509_ALGOR *keyEncryptionAlgorithm;
  210. ASN1_OCTET_STRING *encryptedKey;
  211. /* Extra info: password to use */
  212. unsigned char *pass;
  213. size_t passlen;
  214. const CMS_CTX *cms_ctx;
  215. };
  216. struct CMS_OtherRecipientInfo_st {
  217. ASN1_OBJECT *oriType;
  218. ASN1_TYPE *oriValue;
  219. };
  220. struct CMS_DigestedData_st {
  221. int32_t version;
  222. X509_ALGOR *digestAlgorithm;
  223. CMS_EncapsulatedContentInfo *encapContentInfo;
  224. ASN1_OCTET_STRING *digest;
  225. };
  226. struct CMS_EncryptedData_st {
  227. int32_t version;
  228. CMS_EncryptedContentInfo *encryptedContentInfo;
  229. STACK_OF(X509_ATTRIBUTE) *unprotectedAttrs;
  230. };
  231. struct CMS_AuthenticatedData_st {
  232. int32_t version;
  233. CMS_OriginatorInfo *originatorInfo;
  234. STACK_OF(CMS_RecipientInfo) *recipientInfos;
  235. X509_ALGOR *macAlgorithm;
  236. X509_ALGOR *digestAlgorithm;
  237. CMS_EncapsulatedContentInfo *encapContentInfo;
  238. STACK_OF(X509_ATTRIBUTE) *authAttrs;
  239. ASN1_OCTET_STRING *mac;
  240. STACK_OF(X509_ATTRIBUTE) *unauthAttrs;
  241. };
  242. struct CMS_AuthEnvelopedData_st {
  243. int32_t version;
  244. CMS_OriginatorInfo *originatorInfo;
  245. STACK_OF(CMS_RecipientInfo) *recipientInfos;
  246. CMS_EncryptedContentInfo *authEncryptedContentInfo;
  247. STACK_OF(X509_ATTRIBUTE) *authAttrs;
  248. ASN1_OCTET_STRING *mac;
  249. STACK_OF(X509_ATTRIBUTE) *unauthAttrs;
  250. };
  251. struct CMS_CompressedData_st {
  252. int32_t version;
  253. X509_ALGOR *compressionAlgorithm;
  254. STACK_OF(CMS_RecipientInfo) *recipientInfos;
  255. CMS_EncapsulatedContentInfo *encapContentInfo;
  256. };
  257. struct CMS_RevocationInfoChoice_st {
  258. int type;
  259. union {
  260. X509_CRL *crl;
  261. CMS_OtherRevocationInfoFormat *other;
  262. } d;
  263. };
  264. # define CMS_REVCHOICE_CRL 0
  265. # define CMS_REVCHOICE_OTHER 1
  266. struct CMS_OtherRevocationInfoFormat_st {
  267. ASN1_OBJECT *otherRevInfoFormat;
  268. ASN1_TYPE *otherRevInfo;
  269. };
  270. struct CMS_CertificateChoices {
  271. int type;
  272. union {
  273. X509 *certificate;
  274. ASN1_STRING *extendedCertificate; /* Obsolete */
  275. ASN1_STRING *v1AttrCert; /* Left encoded for now */
  276. ASN1_STRING *v2AttrCert; /* Left encoded for now */
  277. CMS_OtherCertificateFormat *other;
  278. } d;
  279. };
  280. # define CMS_CERTCHOICE_CERT 0
  281. # define CMS_CERTCHOICE_EXCERT 1
  282. # define CMS_CERTCHOICE_V1ACERT 2
  283. # define CMS_CERTCHOICE_V2ACERT 3
  284. # define CMS_CERTCHOICE_OTHER 4
  285. struct CMS_OtherCertificateFormat_st {
  286. ASN1_OBJECT *otherCertFormat;
  287. ASN1_TYPE *otherCert;
  288. };
  289. /*
  290. * This is also defined in pkcs7.h but we duplicate it to allow the CMS code
  291. * to be independent of PKCS#7
  292. */
  293. struct CMS_IssuerAndSerialNumber_st {
  294. X509_NAME *issuer;
  295. ASN1_INTEGER *serialNumber;
  296. };
  297. struct CMS_OtherKeyAttribute_st {
  298. ASN1_OBJECT *keyAttrId;
  299. ASN1_TYPE *keyAttr;
  300. };
  301. /* ESS structures */
  302. struct CMS_ReceiptRequest_st {
  303. ASN1_OCTET_STRING *signedContentIdentifier;
  304. CMS_ReceiptsFrom *receiptsFrom;
  305. STACK_OF(GENERAL_NAMES) *receiptsTo;
  306. };
  307. struct CMS_ReceiptsFrom_st {
  308. int type;
  309. union {
  310. int32_t allOrFirstTier;
  311. STACK_OF(GENERAL_NAMES) *receiptList;
  312. } d;
  313. };
  314. struct CMS_Receipt_st {
  315. int32_t version;
  316. ASN1_OBJECT *contentType;
  317. ASN1_OCTET_STRING *signedContentIdentifier;
  318. ASN1_OCTET_STRING *originatorSignatureValue;
  319. };
  320. DECLARE_ASN1_FUNCTIONS(CMS_ContentInfo)
  321. DECLARE_ASN1_ITEM(CMS_SignerInfo)
  322. DECLARE_ASN1_ITEM(CMS_EncryptedContentInfo)
  323. DECLARE_ASN1_ITEM(CMS_IssuerAndSerialNumber)
  324. DECLARE_ASN1_ITEM(CMS_Attributes_Sign)
  325. DECLARE_ASN1_ITEM(CMS_Attributes_Verify)
  326. DECLARE_ASN1_ITEM(CMS_RecipientInfo)
  327. DECLARE_ASN1_ITEM(CMS_PasswordRecipientInfo)
  328. DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_IssuerAndSerialNumber)
  329. # define CMS_SIGNERINFO_ISSUER_SERIAL 0
  330. # define CMS_SIGNERINFO_KEYIDENTIFIER 1
  331. # define CMS_RECIPINFO_ISSUER_SERIAL 0
  332. # define CMS_RECIPINFO_KEYIDENTIFIER 1
  333. # define CMS_REK_ISSUER_SERIAL 0
  334. # define CMS_REK_KEYIDENTIFIER 1
  335. # define CMS_OIK_ISSUER_SERIAL 0
  336. # define CMS_OIK_KEYIDENTIFIER 1
  337. # define CMS_OIK_PUBKEY 2
  338. BIO *ossl_cms_content_bio(CMS_ContentInfo *cms);
  339. const CMS_CTX *ossl_cms_get0_cmsctx(const CMS_ContentInfo *cms);
  340. OSSL_LIB_CTX *ossl_cms_ctx_get0_libctx(const CMS_CTX *ctx);
  341. const char *ossl_cms_ctx_get0_propq(const CMS_CTX *ctx);
  342. void ossl_cms_resolve_libctx(CMS_ContentInfo *ci);
  343. CMS_ContentInfo *ossl_cms_Data_create(OSSL_LIB_CTX *ctx, const char *propq);
  344. int ossl_cms_DataFinal(CMS_ContentInfo *cms, BIO *cmsbio,
  345. const unsigned char *precomp_md,
  346. unsigned int precomp_mdlen);
  347. CMS_ContentInfo *ossl_cms_DigestedData_create(const EVP_MD *md,
  348. OSSL_LIB_CTX *libctx,
  349. const char *propq);
  350. BIO *ossl_cms_DigestedData_init_bio(const CMS_ContentInfo *cms);
  351. int ossl_cms_DigestedData_do_final(const CMS_ContentInfo *cms,
  352. BIO *chain, int verify);
  353. BIO *ossl_cms_SignedData_init_bio(CMS_ContentInfo *cms);
  354. int ossl_cms_SignedData_final(CMS_ContentInfo *cms, BIO *chain,
  355. const unsigned char *precomp_md,
  356. unsigned int precomp_mdlen);
  357. int ossl_cms_set1_SignerIdentifier(CMS_SignerIdentifier *sid, X509 *cert,
  358. int type, const CMS_CTX *ctx);
  359. int ossl_cms_SignerIdentifier_get0_signer_id(CMS_SignerIdentifier *sid,
  360. ASN1_OCTET_STRING **keyid,
  361. X509_NAME **issuer,
  362. ASN1_INTEGER **sno);
  363. int ossl_cms_SignerIdentifier_cert_cmp(CMS_SignerIdentifier *sid, X509 *cert);
  364. CMS_ContentInfo *ossl_cms_CompressedData_create(int comp_nid,
  365. OSSL_LIB_CTX *libctx,
  366. const char *propq);
  367. BIO *ossl_cms_CompressedData_init_bio(const CMS_ContentInfo *cms);
  368. BIO *ossl_cms_DigestAlgorithm_init_bio(X509_ALGOR *digestAlgorithm,
  369. const CMS_CTX *ctx);
  370. int ossl_cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain,
  371. X509_ALGOR *mdalg);
  372. int ossl_cms_ias_cert_cmp(CMS_IssuerAndSerialNumber *ias, X509 *cert);
  373. int ossl_cms_keyid_cert_cmp(ASN1_OCTET_STRING *keyid, X509 *cert);
  374. int ossl_cms_set1_ias(CMS_IssuerAndSerialNumber **pias, X509 *cert);
  375. int ossl_cms_set1_keyid(ASN1_OCTET_STRING **pkeyid, X509 *cert);
  376. BIO *ossl_cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec,
  377. const CMS_CTX *ctx);
  378. BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms);
  379. int ossl_cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec,
  380. const EVP_CIPHER *cipher,
  381. const unsigned char *key, size_t keylen,
  382. const CMS_CTX *ctx);
  383. int ossl_cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms);
  384. int ossl_cms_msgSigDigest_add1(CMS_SignerInfo *dest, CMS_SignerInfo *src);
  385. ASN1_OCTET_STRING *ossl_cms_encode_Receipt(CMS_SignerInfo *si);
  386. BIO *ossl_cms_EnvelopedData_init_bio(CMS_ContentInfo *cms);
  387. int ossl_cms_EnvelopedData_final(CMS_ContentInfo *cms, BIO *chain);
  388. BIO *ossl_cms_AuthEnvelopedData_init_bio(CMS_ContentInfo *cms);
  389. int ossl_cms_AuthEnvelopedData_final(CMS_ContentInfo *cms, BIO *cmsbio);
  390. CMS_EnvelopedData *ossl_cms_get0_enveloped(CMS_ContentInfo *cms);
  391. CMS_AuthEnvelopedData *ossl_cms_get0_auth_enveloped(CMS_ContentInfo *cms);
  392. CMS_EncryptedContentInfo *ossl_cms_get0_env_enc_content(const CMS_ContentInfo *cms);
  393. /* RecipientInfo routines */
  394. int ossl_cms_env_asn1_ctrl(CMS_RecipientInfo *ri, int cmd);
  395. int ossl_cms_pkey_get_ri_type(EVP_PKEY *pk);
  396. int ossl_cms_pkey_is_ri_type_supported(EVP_PKEY *pk, int ri_type);
  397. void ossl_cms_RecipientInfos_set_cmsctx(CMS_ContentInfo *cms);
  398. /* KARI routines */
  399. int ossl_cms_RecipientInfo_kari_init(CMS_RecipientInfo *ri, X509 *recip,
  400. EVP_PKEY *recipPubKey, X509 *originator,
  401. EVP_PKEY *originatorPrivKey,
  402. unsigned int flags,
  403. const CMS_CTX *ctx);
  404. int ossl_cms_RecipientInfo_kari_encrypt(const CMS_ContentInfo *cms,
  405. CMS_RecipientInfo *ri);
  406. /* PWRI routines */
  407. int ossl_cms_RecipientInfo_pwri_crypt(const CMS_ContentInfo *cms,
  408. CMS_RecipientInfo *ri, int en_de);
  409. /* SignerInfo routines */
  410. int ossl_cms_si_check_attributes(const CMS_SignerInfo *si);
  411. void ossl_cms_SignerInfos_set_cmsctx(CMS_ContentInfo *cms);
  412. /* ESS routines */
  413. int ossl_cms_check_signing_certs(const CMS_SignerInfo *si,
  414. const STACK_OF(X509) *chain);
  415. int ossl_cms_dh_envelope(CMS_RecipientInfo *ri, int decrypt);
  416. int ossl_cms_ecdh_envelope(CMS_RecipientInfo *ri, int decrypt);
  417. int ossl_cms_rsa_envelope(CMS_RecipientInfo *ri, int decrypt);
  418. int ossl_cms_rsa_sign(CMS_SignerInfo *si, int verify);
  419. DECLARE_ASN1_ITEM(CMS_CertificateChoices)
  420. DECLARE_ASN1_ITEM(CMS_DigestedData)
  421. DECLARE_ASN1_ITEM(CMS_EncryptedData)
  422. DECLARE_ASN1_ITEM(CMS_EnvelopedData)
  423. DECLARE_ASN1_ITEM(CMS_AuthEnvelopedData)
  424. DECLARE_ASN1_ITEM(CMS_KEKRecipientInfo)
  425. DECLARE_ASN1_ITEM(CMS_KeyAgreeRecipientInfo)
  426. DECLARE_ASN1_ITEM(CMS_KeyTransRecipientInfo)
  427. DECLARE_ASN1_ITEM(CMS_OriginatorPublicKey)
  428. DECLARE_ASN1_ITEM(CMS_OtherKeyAttribute)
  429. DECLARE_ASN1_ITEM(CMS_Receipt)
  430. DECLARE_ASN1_ITEM(CMS_ReceiptRequest)
  431. DECLARE_ASN1_ITEM(CMS_RecipientEncryptedKey)
  432. DECLARE_ASN1_ITEM(CMS_RecipientKeyIdentifier)
  433. DECLARE_ASN1_ITEM(CMS_RevocationInfoChoice)
  434. DECLARE_ASN1_ITEM(CMS_SignedData)
  435. DECLARE_ASN1_ITEM(CMS_CompressedData)
  436. #endif