Make it compile on DEC. smimetk_branch
authorchrisk%netscape.com
Tue, 13 Jun 2000 20:43:57 +0000
branchsmimetk_branch
changeset 363 be432b736b56ac6e92594786e7016cf09af70bb3
parent 360 a2900e842b0ee950e69aec220a45bdd6305ee341
child 364 3dd51ced498a01123dfd434c1a645677b9f433c6
push idunknown
push userunknown
push dateunknown
Make it compile on DEC. Seems like the DEC compiler does not like static forward declarations...
security/nss/lib/smime/cmsasn1.c
--- a/security/nss/lib/smime/cmsasn1.c
+++ b/security/nss/lib/smime/cmsasn1.c
@@ -137,21 +137,38 @@ const SEC_ASN1Template NSSCMSSignedDataT
     { 0 }
 };
 
 const SEC_ASN1Template NSS_PointerToCMSSignedDataTemplate[] = {
     { SEC_ASN1_POINTER, 0, NSSCMSSignedDataTemplate }
 };
 
 /* -----------------------------------------------------------------------------
+ * signeridentifier
+ */
+
+static const SEC_ASN1Template NSSCMSSignerIdentifierTemplate[] = {
+    { SEC_ASN1_CHOICE,
+	  offsetof(NSSCMSSignerIdentifier,identifierType), NULL,
+	  sizeof(NSSCMSSignerIdentifier) },
+    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
+	  offsetof(NSSCMSSignerIdentifier,id.subjectKeyID),
+	  SEC_PointerToOctetStringTemplate,
+	  NSSCMSRecipientID_SubjectKeyID },
+    { SEC_ASN1_POINTER,
+	  offsetof(NSSCMSSignerIdentifier,id.issuerAndSN),
+	  CERT_IssuerAndSNTemplate,
+	  NSSCMSRecipientID_IssuerSN },
+    { 0 }
+};
+
+/* -----------------------------------------------------------------------------
  * signerinfo
  */
 
-static const SEC_ASN1Template NSSCMSSignerIdentifierTemplate[];
-
 const SEC_ASN1Template NSSCMSSignerInfoTemplate[] = {
     { SEC_ASN1_SEQUENCE,
 	  0, NULL, sizeof(NSSCMSSignerInfo) },
     { SEC_ASN1_INTEGER,
 	  offsetof(NSSCMSSignerInfo,version) },
     { SEC_ASN1_INLINE,
 	  offsetof(NSSCMSSignerInfo,signerIdentifier),
 	  NSSCMSSignerIdentifierTemplate },
@@ -168,38 +185,31 @@ const SEC_ASN1Template NSSCMSSignerInfoT
 	  offsetof(NSSCMSSignerInfo,encDigest) },
     { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
 	  offsetof(NSSCMSSignerInfo,unAuthAttr),
 	  nss_cms_set_of_attribute_template },
     { 0 }
 };
 
 /* -----------------------------------------------------------------------------
- * signeridentifier
+ * ENVELOPED DATA
  */
-static const SEC_ASN1Template NSSCMSSignerIdentifierTemplate[] = {
-    { SEC_ASN1_CHOICE,
-	  offsetof(NSSCMSSignerIdentifier,identifierType), NULL,
-	  sizeof(NSSCMSSignerIdentifier) },
-    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
-	  offsetof(NSSCMSSignerIdentifier,id.subjectKeyID),
-	  SEC_PointerToOctetStringTemplate,
-	  NSSCMSRecipientID_SubjectKeyID },
-    { SEC_ASN1_POINTER,
-	  offsetof(NSSCMSSignerIdentifier,id.issuerAndSN),
-	  CERT_IssuerAndSNTemplate,
-	  NSSCMSRecipientID_IssuerSN },
+
+static const SEC_ASN1Template NSSCMSOriginatorInfoTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+	  0, NULL, sizeof(NSSCMSOriginatorInfo) },
+    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
+	  offsetof(NSSCMSOriginatorInfo,rawCerts),
+	  SEC_SetOfAnyTemplate },
+    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
+	  offsetof(NSSCMSOriginatorInfo,crls),
+	  CERT_SetOfSignedCrlTemplate },
     { 0 }
 };
 
-/* -----------------------------------------------------------------------------
- * ENVELOPED DATA
- */
-
-static const SEC_ASN1Template NSSCMSOriginatorInfoTemplate[];
 const SEC_ASN1Template NSSCMSRecipientInfoTemplate[];
 
 const SEC_ASN1Template NSSCMSEnvelopedDataTemplate[] = {
     { SEC_ASN1_SEQUENCE | SEC_ASN1_MAY_STREAM,
 	  0, NULL, sizeof(NSSCMSEnvelopedData) },
     { SEC_ASN1_INTEGER,
 	  offsetof(NSSCMSEnvelopedData,version) },
     { SEC_ASN1_OPTIONAL | SEC_ASN1_POINTER | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
@@ -216,61 +226,37 @@ const SEC_ASN1Template NSSCMSEnvelopedDa
 	  nss_cms_set_of_attribute_template },
     { 0 }
 };
 
 const SEC_ASN1Template NSS_PointerToCMSEnvelopedDataTemplate[] = {
     { SEC_ASN1_POINTER, 0, NSSCMSEnvelopedDataTemplate }
 };
 
-static const SEC_ASN1Template NSSCMSOriginatorInfoTemplate[] = {
-    { SEC_ASN1_SEQUENCE,
-	  0, NULL, sizeof(NSSCMSOriginatorInfo) },
-    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
-	  offsetof(NSSCMSOriginatorInfo,rawCerts),
-	  SEC_SetOfAnyTemplate },
-    { SEC_ASN1_OPTIONAL | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
-	  offsetof(NSSCMSOriginatorInfo,crls),
-	  CERT_SetOfSignedCrlTemplate },
-    { 0 }
-};
-
 /* here come the 15 gazillion templates for all the v3 varieties of RecipientInfo */
 
 /* -----------------------------------------------------------------------------
- * recipient info
- */
-static const SEC_ASN1Template NSSCMSKeyTransRecipientInfoTemplate[];
-static const SEC_ASN1Template NSSCMSKeyAgreeRecipientInfoTemplate[];
-static const SEC_ASN1Template NSSCMSKEKRecipientInfoTemplate[];
-
-const SEC_ASN1Template NSSCMSRecipientInfoTemplate[] = {
-    { SEC_ASN1_CHOICE,
-	  offsetof(NSSCMSRecipientInfo,recipientInfoType), NULL,
-	  sizeof(NSSCMSRecipientInfo) },
-    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
-	  offsetof(NSSCMSRecipientInfo,ri.keyAgreeRecipientInfo),
-	  NSSCMSKeyAgreeRecipientInfoTemplate,
-	  NSSCMSRecipientInfoID_KeyAgree },
-    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 2,
-	  offsetof(NSSCMSRecipientInfo,ri.kekRecipientInfo),
-	  NSSCMSKEKRecipientInfoTemplate,
-	  NSSCMSRecipientInfoID_KEK },
-    { SEC_ASN1_INLINE,
-	  offsetof(NSSCMSRecipientInfo,ri.keyTransRecipientInfo),
-	  NSSCMSKeyTransRecipientInfoTemplate,
-	  NSSCMSRecipientInfoID_KeyTrans },
-    { 0 }
-};
-
-/* -----------------------------------------------------------------------------
  * key transport recipient info
  */
 
-static const SEC_ASN1Template NSSCMSRecipientIdentifierTemplate[];
+static const SEC_ASN1Template NSSCMSRecipientIdentifierTemplate[] = {
+    { SEC_ASN1_CHOICE,
+	  offsetof(NSSCMSRecipientIdentifier,identifierType), NULL,
+	  sizeof(NSSCMSRecipientIdentifier) },
+    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
+	  offsetof(NSSCMSRecipientIdentifier,id.subjectKeyID),
+	  SEC_PointerToOctetStringTemplate,
+	  NSSCMSRecipientID_SubjectKeyID },
+    { SEC_ASN1_POINTER,
+	  offsetof(NSSCMSRecipientIdentifier,id.issuerAndSN),
+	  CERT_IssuerAndSNTemplate,
+	  NSSCMSRecipientID_IssuerSN },
+    { 0 }
+};
+
 
 static const SEC_ASN1Template NSSCMSKeyTransRecipientInfoTemplate[] = {
     { SEC_ASN1_SEQUENCE,
 	  0, NULL, sizeof(NSSCMSKeyTransRecipientInfo) },
     { SEC_ASN1_INTEGER,
 	  offsetof(NSSCMSKeyTransRecipientInfo,version) },
     { SEC_ASN1_INLINE,
 	  offsetof(NSSCMSKeyTransRecipientInfo,recipientIdentifier),
@@ -278,37 +264,91 @@ static const SEC_ASN1Template NSSCMSKeyT
     { SEC_ASN1_INLINE,
 	  offsetof(NSSCMSKeyTransRecipientInfo,keyEncAlg),
 	  SECOID_AlgorithmIDTemplate },
     { SEC_ASN1_OCTET_STRING,
 	  offsetof(NSSCMSKeyTransRecipientInfo,encKey) },
     { 0 }
 };
 
-static const SEC_ASN1Template NSSCMSRecipientIdentifierTemplate[] = {
-    { SEC_ASN1_CHOICE,
-	  offsetof(NSSCMSRecipientIdentifier,identifierType), NULL,
-	  sizeof(NSSCMSRecipientIdentifier) },
-    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
-	  offsetof(NSSCMSRecipientIdentifier,id.subjectKeyID),
-	  SEC_PointerToOctetStringTemplate,
-	  NSSCMSRecipientID_SubjectKeyID },
-    { SEC_ASN1_POINTER,
-	  offsetof(NSSCMSRecipientIdentifier,id.issuerAndSN),
-	  CERT_IssuerAndSNTemplate,
-	  NSSCMSRecipientID_IssuerSN },
-    { 0 }
-};
-
 /* -----------------------------------------------------------------------------
  * key agreement recipient info
  */
 
-static const SEC_ASN1Template NSSCMSOriginatorIdentifierOrKeyTemplate[];
-static const SEC_ASN1Template NSSCMSRecipientEncryptedKeyTemplate[];
+static const SEC_ASN1Template NSSCMSOriginatorPublicKeyTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+	  0, NULL, sizeof(NSSCMSOriginatorPublicKey) },
+    { SEC_ASN1_INLINE,
+	  offsetof(NSSCMSOriginatorPublicKey,algorithmIdentifier),
+	  SECOID_AlgorithmIDTemplate },
+    { SEC_ASN1_INLINE,
+	  offsetof(NSSCMSOriginatorPublicKey,publicKey),
+	  SEC_BitStringTemplate },
+    { 0 }
+};
+
+
+static const SEC_ASN1Template NSSCMSOriginatorIdentifierOrKeyTemplate[] = {
+    { SEC_ASN1_CHOICE,
+	  offsetof(NSSCMSOriginatorIdentifierOrKey,identifierType), NULL,
+	  sizeof(NSSCMSOriginatorIdentifierOrKey) },
+    { SEC_ASN1_POINTER,
+	  offsetof(NSSCMSOriginatorIdentifierOrKey,id.issuerAndSN),
+	  CERT_IssuerAndSNTemplate,
+	  NSSCMSOriginatorIDOrKey_IssuerSN },
+    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
+	  offsetof(NSSCMSOriginatorIdentifierOrKey,id.subjectKeyID),
+	  SEC_PointerToOctetStringTemplate,
+	  NSSCMSOriginatorIDOrKey_SubjectKeyID },
+    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 2,
+	  offsetof(NSSCMSOriginatorIdentifierOrKey,id.originatorPublicKey),
+	  NSSCMSOriginatorPublicKeyTemplate,
+	  NSSCMSOriginatorIDOrKey_OriginatorPublicKey },
+    { 0 }
+};
+
+static const SEC_ASN1Template NSSCMSRecipientKeyIdentifierTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+	  0, NULL, sizeof(NSSCMSRecipientKeyIdentifier) },
+    { SEC_ASN1_OCTET_STRING,
+	  offsetof(NSSCMSRecipientKeyIdentifier,subjectKeyIdentifier) },
+    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
+	  offsetof(NSSCMSRecipientKeyIdentifier,date) },
+    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
+	  offsetof(NSSCMSRecipientKeyIdentifier,other) },
+    { 0 }
+};
+
+
+static const SEC_ASN1Template NSSCMSKeyAgreeRecipientIdentifierTemplate[] = {
+    { SEC_ASN1_CHOICE,
+	  offsetof(NSSCMSKeyAgreeRecipientIdentifier,identifierType), NULL,
+	  sizeof(NSSCMSKeyAgreeRecipientIdentifier) },
+    { SEC_ASN1_POINTER,
+	  offsetof(NSSCMSKeyAgreeRecipientIdentifier,id.issuerAndSN),
+	  CERT_IssuerAndSNTemplate,
+	  NSSCMSKeyAgreeRecipientID_IssuerSN },
+    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
+	  offsetof(NSSCMSKeyAgreeRecipientIdentifier,id.recipientKeyIdentifier),
+	  NSSCMSRecipientKeyIdentifierTemplate,
+	  NSSCMSKeyAgreeRecipientID_RKeyID },
+    { 0 }
+};
+
+static const SEC_ASN1Template NSSCMSRecipientEncryptedKeyTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+	  0, NULL, sizeof(NSSCMSRecipientEncryptedKey) },
+    { SEC_ASN1_INLINE,
+	  offsetof(NSSCMSRecipientEncryptedKey,recipientIdentifier),
+	  NSSCMSKeyAgreeRecipientIdentifierTemplate },
+    { SEC_ASN1_INLINE,
+	  offsetof(NSSCMSRecipientEncryptedKey,encKey),
+	  SEC_BitStringTemplate },
+    { 0 }
+};
 
 static const SEC_ASN1Template NSSCMSKeyAgreeRecipientInfoTemplate[] = {
     { SEC_ASN1_SEQUENCE,
 	  0, NULL, sizeof(NSSCMSKeyAgreeRecipientInfo) },
     { SEC_ASN1_INTEGER,
 	  offsetof(NSSCMSKeyAgreeRecipientInfo,version) },
     { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
 	  offsetof(NSSCMSKeyAgreeRecipientInfo,originatorIdentifierOrKey),
@@ -321,98 +361,31 @@ static const SEC_ASN1Template NSSCMSKeyA
 	  offsetof(NSSCMSKeyAgreeRecipientInfo,keyEncAlg),
 	  SECOID_AlgorithmIDTemplate },
     { SEC_ASN1_SEQUENCE_OF,
 	  offsetof(NSSCMSKeyAgreeRecipientInfo,recipientEncryptedKeys),
 	  NSSCMSRecipientEncryptedKeyTemplate },
     { 0 }
 };
 
-static const SEC_ASN1Template NSSCMSOriginatorPublicKeyTemplate[];
-
-static const SEC_ASN1Template NSSCMSOriginatorIdentifierOrKeyTemplate[] = {
-    { SEC_ASN1_CHOICE,
-	  offsetof(NSSCMSOriginatorIdentifierOrKey,identifierType), NULL,
-	  sizeof(NSSCMSOriginatorIdentifierOrKey) },
-    { SEC_ASN1_POINTER,
-	  offsetof(NSSCMSOriginatorIdentifierOrKey,id.issuerAndSN),
-	  CERT_IssuerAndSNTemplate,
-	  NSSCMSOriginatorIDOrKey_IssuerSN },
-    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
-	  offsetof(NSSCMSOriginatorIdentifierOrKey,id.subjectKeyID),
-	  SEC_PointerToOctetStringTemplate,
-	  NSSCMSOriginatorIDOrKey_SubjectKeyID },
-    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 2,
-	  offsetof(NSSCMSOriginatorIdentifierOrKey,id.originatorPublicKey),
-	  NSSCMSOriginatorPublicKeyTemplate,
-	  NSSCMSOriginatorIDOrKey_OriginatorPublicKey },
-    { 0 }
-};
-
-static const SEC_ASN1Template NSSCMSOriginatorPublicKeyTemplate[] = {
-    { SEC_ASN1_SEQUENCE,
-	  0, NULL, sizeof(NSSCMSOriginatorPublicKey) },
-    { SEC_ASN1_INLINE,
-	  offsetof(NSSCMSOriginatorPublicKey,algorithmIdentifier),
-	  SECOID_AlgorithmIDTemplate },
-    { SEC_ASN1_INLINE,
-	  offsetof(NSSCMSOriginatorPublicKey,publicKey),
-	  SEC_BitStringTemplate },
-    { 0 }
-};
-
-static const SEC_ASN1Template NSSCMSKeyAgreeRecipientIdentifierTemplate[];
-
-static const SEC_ASN1Template NSSCMSRecipientEncryptedKeyTemplate[] = {
-    { SEC_ASN1_SEQUENCE,
-	  0, NULL, sizeof(NSSCMSRecipientEncryptedKey) },
-    { SEC_ASN1_INLINE,
-	  offsetof(NSSCMSRecipientEncryptedKey,recipientIdentifier),
-	  NSSCMSKeyAgreeRecipientIdentifierTemplate },
-    { SEC_ASN1_INLINE,
-	  offsetof(NSSCMSRecipientEncryptedKey,encKey),
-	  SEC_BitStringTemplate },
-    { 0 }
-};
-
-static const SEC_ASN1Template NSSCMSRecipientKeyIdentifierTemplate[];
-
-static const SEC_ASN1Template NSSCMSKeyAgreeRecipientIdentifierTemplate[] = {
-    { SEC_ASN1_CHOICE,
-	  offsetof(NSSCMSKeyAgreeRecipientIdentifier,identifierType), NULL,
-	  sizeof(NSSCMSKeyAgreeRecipientIdentifier) },
-    { SEC_ASN1_POINTER,
-	  offsetof(NSSCMSKeyAgreeRecipientIdentifier,id.issuerAndSN),
-	  CERT_IssuerAndSNTemplate,
-	  NSSCMSKeyAgreeRecipientID_IssuerSN },
-    { SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 0,
-	  offsetof(NSSCMSKeyAgreeRecipientIdentifier,id.recipientKeyIdentifier),
-	  NSSCMSRecipientKeyIdentifierTemplate,
-	  NSSCMSKeyAgreeRecipientID_RKeyID },
-    { 0 }
-};
-
-static const SEC_ASN1Template NSSCMSRecipientKeyIdentifierTemplate[] = {
-    { SEC_ASN1_SEQUENCE,
-	  0, NULL, sizeof(NSSCMSRecipientKeyIdentifier) },
-    { SEC_ASN1_OCTET_STRING,
-	  offsetof(NSSCMSRecipientKeyIdentifier,subjectKeyIdentifier) },
-    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
-	  offsetof(NSSCMSRecipientKeyIdentifier,date) },
-    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
-	  offsetof(NSSCMSRecipientKeyIdentifier,other) },
-    { 0 }
-};
-
-
 /* -----------------------------------------------------------------------------
  * KEK recipient info
  */
 
-static const SEC_ASN1Template NSSCMSKEKIdentifierTemplate[];
+static const SEC_ASN1Template NSSCMSKEKIdentifierTemplate[] = {
+    { SEC_ASN1_SEQUENCE,
+	  0, NULL, sizeof(NSSCMSKEKIdentifier) },
+    { SEC_ASN1_OCTET_STRING,
+	  offsetof(NSSCMSKEKIdentifier,keyIdentifier) },
+    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
+	  offsetof(NSSCMSKEKIdentifier,date) },
+    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
+	  offsetof(NSSCMSKEKIdentifier,other) },
+    { 0 }
+};
 
 static const SEC_ASN1Template NSSCMSKEKRecipientInfoTemplate[] = {
     { SEC_ASN1_SEQUENCE,
 	  0, NULL, sizeof(NSSCMSKEKRecipientInfo) },
     { SEC_ASN1_INTEGER,
 	  offsetof(NSSCMSKEKRecipientInfo,version) },
     { SEC_ASN1_INLINE,
 	  offsetof(NSSCMSKEKRecipientInfo,kekIdentifier),
@@ -420,25 +393,35 @@ static const SEC_ASN1Template NSSCMSKEKR
     { SEC_ASN1_INLINE,
 	  offsetof(NSSCMSKEKRecipientInfo,keyEncAlg),
 	  SECOID_AlgorithmIDTemplate },
     { SEC_ASN1_OCTET_STRING,
 	  offsetof(NSSCMSKEKRecipientInfo,encKey) },
     { 0 }
 };
 
-static const SEC_ASN1Template NSSCMSKEKIdentifierTemplate[] = {
-    { SEC_ASN1_SEQUENCE,
-	  0, NULL, sizeof(NSSCMSKEKIdentifier) },
-    { SEC_ASN1_OCTET_STRING,
-	  offsetof(NSSCMSKEKIdentifier,keyIdentifier) },
-    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
-	  offsetof(NSSCMSKEKIdentifier,date) },
-    { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
-	  offsetof(NSSCMSKEKIdentifier,other) },
+/* -----------------------------------------------------------------------------
+ * recipient info
+ */
+const SEC_ASN1Template NSSCMSRecipientInfoTemplate[] = {
+    { SEC_ASN1_CHOICE,
+	  offsetof(NSSCMSRecipientInfo,recipientInfoType), NULL,
+	  sizeof(NSSCMSRecipientInfo) },
+    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 1,
+	  offsetof(NSSCMSRecipientInfo,ri.keyAgreeRecipientInfo),
+	  NSSCMSKeyAgreeRecipientInfoTemplate,
+	  NSSCMSRecipientInfoID_KeyAgree },
+    { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC | 2,
+	  offsetof(NSSCMSRecipientInfo,ri.kekRecipientInfo),
+	  NSSCMSKEKRecipientInfoTemplate,
+	  NSSCMSRecipientInfoID_KEK },
+    { SEC_ASN1_INLINE,
+	  offsetof(NSSCMSRecipientInfo,ri.keyTransRecipientInfo),
+	  NSSCMSKeyTransRecipientInfoTemplate,
+	  NSSCMSRecipientInfoID_KeyTrans },
     { 0 }
 };
 
 /* -----------------------------------------------------------------------------
  *
  */
 
 const SEC_ASN1Template NSSCMSDigestedDataTemplate[] = {