cms_local.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505
  1. /*
  2. * Copyright 2008-2022 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_IssuerAndSerialNumber)
  323. DECLARE_ASN1_ITEM(CMS_Attributes_Sign)
  324. DECLARE_ASN1_ITEM(CMS_Attributes_Verify)
  325. DECLARE_ASN1_ITEM(CMS_RecipientInfo)
  326. DECLARE_ASN1_ITEM(CMS_PasswordRecipientInfo)
  327. DECLARE_ASN1_ALLOC_FUNCTIONS(CMS_IssuerAndSerialNumber)
  328. # define CMS_SIGNERINFO_ISSUER_SERIAL 0
  329. # define CMS_SIGNERINFO_KEYIDENTIFIER 1
  330. # define CMS_RECIPINFO_ISSUER_SERIAL 0
  331. # define CMS_RECIPINFO_KEYIDENTIFIER 1
  332. # define CMS_REK_ISSUER_SERIAL 0
  333. # define CMS_REK_KEYIDENTIFIER 1
  334. # define CMS_OIK_ISSUER_SERIAL 0
  335. # define CMS_OIK_KEYIDENTIFIER 1
  336. # define CMS_OIK_PUBKEY 2
  337. BIO *ossl_cms_content_bio(CMS_ContentInfo *cms);
  338. const CMS_CTX *ossl_cms_get0_cmsctx(const CMS_ContentInfo *cms);
  339. OSSL_LIB_CTX *ossl_cms_ctx_get0_libctx(const CMS_CTX *ctx);
  340. const char *ossl_cms_ctx_get0_propq(const CMS_CTX *ctx);
  341. void ossl_cms_resolve_libctx(CMS_ContentInfo *ci);
  342. CMS_ContentInfo *ossl_cms_Data_create(OSSL_LIB_CTX *ctx, const char *propq);
  343. int ossl_cms_DataFinal(CMS_ContentInfo *cms, BIO *cmsbio,
  344. const unsigned char *precomp_md,
  345. unsigned int precomp_mdlen);
  346. CMS_ContentInfo *ossl_cms_DigestedData_create(const EVP_MD *md,
  347. OSSL_LIB_CTX *libctx,
  348. const char *propq);
  349. BIO *ossl_cms_DigestedData_init_bio(const CMS_ContentInfo *cms);
  350. int ossl_cms_DigestedData_do_final(const CMS_ContentInfo *cms,
  351. BIO *chain, int verify);
  352. BIO *ossl_cms_SignedData_init_bio(CMS_ContentInfo *cms);
  353. int ossl_cms_SignedData_final(CMS_ContentInfo *cms, BIO *chain,
  354. const unsigned char *precomp_md,
  355. unsigned int precomp_mdlen);
  356. int ossl_cms_set1_SignerIdentifier(CMS_SignerIdentifier *sid, X509 *cert,
  357. int type, const CMS_CTX *ctx);
  358. int ossl_cms_SignerIdentifier_get0_signer_id(CMS_SignerIdentifier *sid,
  359. ASN1_OCTET_STRING **keyid,
  360. X509_NAME **issuer,
  361. ASN1_INTEGER **sno);
  362. int ossl_cms_SignerIdentifier_cert_cmp(CMS_SignerIdentifier *sid, X509 *cert);
  363. CMS_ContentInfo *ossl_cms_CompressedData_create(int comp_nid,
  364. OSSL_LIB_CTX *libctx,
  365. const char *propq);
  366. BIO *ossl_cms_CompressedData_init_bio(const CMS_ContentInfo *cms);
  367. BIO *ossl_cms_DigestAlgorithm_init_bio(X509_ALGOR *digestAlgorithm,
  368. const CMS_CTX *ctx);
  369. int ossl_cms_DigestAlgorithm_find_ctx(EVP_MD_CTX *mctx, BIO *chain,
  370. X509_ALGOR *mdalg);
  371. int ossl_cms_ias_cert_cmp(CMS_IssuerAndSerialNumber *ias, X509 *cert);
  372. int ossl_cms_keyid_cert_cmp(ASN1_OCTET_STRING *keyid, X509 *cert);
  373. int ossl_cms_set1_ias(CMS_IssuerAndSerialNumber **pias, X509 *cert);
  374. int ossl_cms_set1_keyid(ASN1_OCTET_STRING **pkeyid, X509 *cert);
  375. BIO *ossl_cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec,
  376. const CMS_CTX *ctx);
  377. BIO *ossl_cms_EncryptedData_init_bio(const CMS_ContentInfo *cms);
  378. int ossl_cms_EncryptedContent_init(CMS_EncryptedContentInfo *ec,
  379. const EVP_CIPHER *cipher,
  380. const unsigned char *key, size_t keylen,
  381. const CMS_CTX *ctx);
  382. int ossl_cms_Receipt_verify(CMS_ContentInfo *cms, CMS_ContentInfo *req_cms);
  383. int ossl_cms_msgSigDigest_add1(CMS_SignerInfo *dest, CMS_SignerInfo *src);
  384. ASN1_OCTET_STRING *ossl_cms_encode_Receipt(CMS_SignerInfo *si);
  385. BIO *ossl_cms_EnvelopedData_init_bio(CMS_ContentInfo *cms);
  386. int ossl_cms_EnvelopedData_final(CMS_ContentInfo *cms, BIO *chain);
  387. BIO *ossl_cms_AuthEnvelopedData_init_bio(CMS_ContentInfo *cms);
  388. int ossl_cms_AuthEnvelopedData_final(CMS_ContentInfo *cms, BIO *cmsbio);
  389. CMS_EnvelopedData *ossl_cms_get0_enveloped(CMS_ContentInfo *cms);
  390. CMS_AuthEnvelopedData *ossl_cms_get0_auth_enveloped(CMS_ContentInfo *cms);
  391. CMS_EncryptedContentInfo *ossl_cms_get0_env_enc_content(const CMS_ContentInfo *cms);
  392. /* RecipientInfo routines */
  393. int ossl_cms_env_asn1_ctrl(CMS_RecipientInfo *ri, int cmd);
  394. int ossl_cms_pkey_get_ri_type(EVP_PKEY *pk);
  395. int ossl_cms_pkey_is_ri_type_supported(EVP_PKEY *pk, int ri_type);
  396. void ossl_cms_RecipientInfos_set_cmsctx(CMS_ContentInfo *cms);
  397. /* KARI routines */
  398. int ossl_cms_RecipientInfo_kari_init(CMS_RecipientInfo *ri, X509 *recip,
  399. EVP_PKEY *recipPubKey, X509 *originator,
  400. EVP_PKEY *originatorPrivKey,
  401. unsigned int flags,
  402. const CMS_CTX *ctx);
  403. int ossl_cms_RecipientInfo_kari_encrypt(const CMS_ContentInfo *cms,
  404. CMS_RecipientInfo *ri);
  405. /* PWRI routines */
  406. int ossl_cms_RecipientInfo_pwri_crypt(const CMS_ContentInfo *cms,
  407. CMS_RecipientInfo *ri, int en_de);
  408. /* SignerInfo routines */
  409. int ossl_cms_si_check_attributes(const CMS_SignerInfo *si);
  410. void ossl_cms_SignerInfos_set_cmsctx(CMS_ContentInfo *cms);
  411. /* ESS routines */
  412. int ossl_cms_check_signing_certs(const CMS_SignerInfo *si,
  413. const STACK_OF(X509) *chain);
  414. int ossl_cms_dh_envelope(CMS_RecipientInfo *ri, int decrypt);
  415. int ossl_cms_ecdh_envelope(CMS_RecipientInfo *ri, int decrypt);
  416. int ossl_cms_rsa_envelope(CMS_RecipientInfo *ri, int decrypt);
  417. int ossl_cms_rsa_sign(CMS_SignerInfo *si, int verify);
  418. DECLARE_ASN1_ITEM(CMS_CertificateChoices)
  419. DECLARE_ASN1_ITEM(CMS_DigestedData)
  420. DECLARE_ASN1_ITEM(CMS_EncryptedData)
  421. DECLARE_ASN1_ITEM(CMS_EnvelopedData)
  422. DECLARE_ASN1_ITEM(CMS_AuthEnvelopedData)
  423. DECLARE_ASN1_ITEM(CMS_KEKRecipientInfo)
  424. DECLARE_ASN1_ITEM(CMS_KeyAgreeRecipientInfo)
  425. DECLARE_ASN1_ITEM(CMS_KeyTransRecipientInfo)
  426. DECLARE_ASN1_ITEM(CMS_OriginatorPublicKey)
  427. DECLARE_ASN1_ITEM(CMS_OtherKeyAttribute)
  428. DECLARE_ASN1_ITEM(CMS_Receipt)
  429. DECLARE_ASN1_ITEM(CMS_ReceiptRequest)
  430. DECLARE_ASN1_ITEM(CMS_RecipientEncryptedKey)
  431. DECLARE_ASN1_ITEM(CMS_RecipientKeyIdentifier)
  432. DECLARE_ASN1_ITEM(CMS_RevocationInfoChoice)
  433. DECLARE_ASN1_ITEM(CMS_SignedData)
  434. DECLARE_ASN1_ITEM(CMS_CompressedData)
  435. #endif