1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
19 extern const SEC_ASN1Template nss_cms_set_of_attribute_template
[];
21 SEC_ASN1_MKSUB(CERT_IssuerAndSNTemplate
)
22 SEC_ASN1_MKSUB(CERT_SetOfSignedCrlTemplate
)
23 SEC_ASN1_MKSUB(SECOID_AlgorithmIDTemplate
)
24 SEC_ASN1_MKSUB(SEC_BitStringTemplate
)
25 SEC_ASN1_MKSUB(SEC_OctetStringTemplate
)
26 SEC_ASN1_MKSUB(SEC_PointerToOctetStringTemplate
)
27 SEC_ASN1_MKSUB(SEC_SetOfAnyTemplate
)
29 /* -----------------------------------------------------------------------------
31 * (uses NSSCMSContentInfo)
34 /* forward declaration */
35 static const SEC_ASN1Template
*
36 nss_cms_choose_content_template(void *src_or_dest
, PRBool encoding
);
38 static const SEC_ASN1TemplateChooserPtr nss_cms_chooser
= nss_cms_choose_content_template
;
40 const SEC_ASN1Template NSSCMSMessageTemplate
[] = {
41 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
42 0, NULL
, sizeof(NSSCMSMessage
) },
44 offsetof(NSSCMSMessage
, contentInfo
.contentType
) },
45 { SEC_ASN1_OPTIONAL
| SEC_ASN1_DYNAMIC
| SEC_ASN1_MAY_STREAM
|
46 SEC_ASN1_EXPLICIT
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 0,
47 offsetof(NSSCMSMessage
, contentInfo
.content
),
52 /* -----------------------------------------------------------------------------
53 * ENCAPSULATED & ENCRYPTED CONTENTINFO
54 * (both use a NSSCMSContentInfo)
56 static const SEC_ASN1Template NSSCMSEncapsulatedContentInfoTemplate
[] = {
57 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
58 0, NULL
, sizeof(NSSCMSContentInfo
) },
60 offsetof(NSSCMSContentInfo
, contentType
) },
61 { SEC_ASN1_OPTIONAL
| SEC_ASN1_EXPLICIT
| SEC_ASN1_MAY_STREAM
|
62 SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| SEC_ASN1_XTRN
| 0,
63 offsetof(NSSCMSContentInfo
, rawContent
),
64 SEC_ASN1_SUB(SEC_PointerToOctetStringTemplate
) },
68 static const SEC_ASN1Template NSSCMSEncryptedContentInfoTemplate
[] = {
69 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
70 0, NULL
, sizeof(NSSCMSContentInfo
) },
72 offsetof(NSSCMSContentInfo
, contentType
) },
73 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
74 offsetof(NSSCMSContentInfo
, contentEncAlg
),
75 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
76 { SEC_ASN1_OPTIONAL
| SEC_ASN1_POINTER
| SEC_ASN1_MAY_STREAM
|
77 SEC_ASN1_CONTEXT_SPECIFIC
| SEC_ASN1_XTRN
| 0,
78 offsetof(NSSCMSContentInfo
, rawContent
),
79 SEC_ASN1_SUB(SEC_OctetStringTemplate
) },
83 /* -----------------------------------------------------------------------------
87 const SEC_ASN1Template NSSCMSSignerInfoTemplate
[];
89 const SEC_ASN1Template NSSCMSSignedDataTemplate
[] = {
90 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
91 0, NULL
, sizeof(NSSCMSSignedData
) },
93 offsetof(NSSCMSSignedData
, version
) },
94 { SEC_ASN1_SET_OF
| SEC_ASN1_XTRN
,
95 offsetof(NSSCMSSignedData
, digestAlgorithms
),
96 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
98 offsetof(NSSCMSSignedData
, contentInfo
),
99 NSSCMSEncapsulatedContentInfoTemplate
},
100 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
|
102 offsetof(NSSCMSSignedData
, rawCerts
),
103 SEC_ASN1_SUB(SEC_SetOfAnyTemplate
) },
104 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
|
106 offsetof(NSSCMSSignedData
, crls
),
107 SEC_ASN1_SUB(CERT_SetOfSignedCrlTemplate
) },
109 offsetof(NSSCMSSignedData
, signerInfos
),
110 NSSCMSSignerInfoTemplate
},
114 const SEC_ASN1Template NSS_PointerToCMSSignedDataTemplate
[] = {
115 { SEC_ASN1_POINTER
, 0, NSSCMSSignedDataTemplate
}
118 /* -----------------------------------------------------------------------------
122 static const SEC_ASN1Template NSSCMSSignerIdentifierTemplate
[] = {
124 offsetof(NSSCMSSignerIdentifier
, identifierType
), NULL
,
125 sizeof(NSSCMSSignerIdentifier
) },
126 { SEC_ASN1_POINTER
| SEC_ASN1_CONTEXT_SPECIFIC
| SEC_ASN1_XTRN
| 0,
127 offsetof(NSSCMSSignerIdentifier
, id
.subjectKeyID
),
128 SEC_ASN1_SUB(SEC_OctetStringTemplate
),
129 NSSCMSRecipientID_SubjectKeyID
},
130 { SEC_ASN1_POINTER
| SEC_ASN1_XTRN
,
131 offsetof(NSSCMSSignerIdentifier
, id
.issuerAndSN
),
132 SEC_ASN1_SUB(CERT_IssuerAndSNTemplate
),
133 NSSCMSRecipientID_IssuerSN
},
137 /* -----------------------------------------------------------------------------
141 const SEC_ASN1Template NSSCMSSignerInfoTemplate
[] = {
143 0, NULL
, sizeof(NSSCMSSignerInfo
) },
145 offsetof(NSSCMSSignerInfo
, version
) },
147 offsetof(NSSCMSSignerInfo
, signerIdentifier
),
148 NSSCMSSignerIdentifierTemplate
},
149 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
150 offsetof(NSSCMSSignerInfo
, digestAlg
),
151 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
152 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 0,
153 offsetof(NSSCMSSignerInfo
, authAttr
),
154 nss_cms_set_of_attribute_template
},
155 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
156 offsetof(NSSCMSSignerInfo
, digestEncAlg
),
157 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
158 { SEC_ASN1_OCTET_STRING
,
159 offsetof(NSSCMSSignerInfo
, encDigest
) },
160 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 1,
161 offsetof(NSSCMSSignerInfo
, unAuthAttr
),
162 nss_cms_set_of_attribute_template
},
166 /* -----------------------------------------------------------------------------
170 static const SEC_ASN1Template NSSCMSOriginatorInfoTemplate
[] = {
172 0, NULL
, sizeof(NSSCMSOriginatorInfo
) },
173 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
|
175 offsetof(NSSCMSOriginatorInfo
, rawCerts
),
176 SEC_ASN1_SUB(SEC_SetOfAnyTemplate
) },
177 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
|
179 offsetof(NSSCMSOriginatorInfo
, crls
),
180 SEC_ASN1_SUB(CERT_SetOfSignedCrlTemplate
) },
184 const SEC_ASN1Template NSSCMSRecipientInfoTemplate
[];
186 const SEC_ASN1Template NSSCMSEnvelopedDataTemplate
[] = {
187 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
188 0, NULL
, sizeof(NSSCMSEnvelopedData
) },
190 offsetof(NSSCMSEnvelopedData
, version
) },
191 { SEC_ASN1_OPTIONAL
| SEC_ASN1_POINTER
| SEC_ASN1_CONSTRUCTED
|
192 SEC_ASN1_CONTEXT_SPECIFIC
| 0,
193 offsetof(NSSCMSEnvelopedData
, originatorInfo
),
194 NSSCMSOriginatorInfoTemplate
},
196 offsetof(NSSCMSEnvelopedData
, recipientInfos
),
197 NSSCMSRecipientInfoTemplate
},
199 offsetof(NSSCMSEnvelopedData
, contentInfo
),
200 NSSCMSEncryptedContentInfoTemplate
},
201 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 1,
202 offsetof(NSSCMSEnvelopedData
, unprotectedAttr
),
203 nss_cms_set_of_attribute_template
},
207 const SEC_ASN1Template NSS_PointerToCMSEnvelopedDataTemplate
[] = {
208 { SEC_ASN1_POINTER
, 0, NSSCMSEnvelopedDataTemplate
}
211 /* here come the 15 gazillion templates for all the v3 varieties of RecipientInfo */
213 /* -----------------------------------------------------------------------------
214 * key transport recipient info
217 static const SEC_ASN1Template NSSCMSRecipientIdentifierTemplate
[] = {
219 offsetof(NSSCMSRecipientIdentifier
, identifierType
), NULL
,
220 sizeof(NSSCMSRecipientIdentifier
) },
221 { SEC_ASN1_POINTER
| SEC_ASN1_CONTEXT_SPECIFIC
| SEC_ASN1_XTRN
| 0,
222 offsetof(NSSCMSRecipientIdentifier
, id
.subjectKeyID
),
223 SEC_ASN1_SUB(SEC_OctetStringTemplate
),
224 NSSCMSRecipientID_SubjectKeyID
},
225 { SEC_ASN1_POINTER
| SEC_ASN1_XTRN
,
226 offsetof(NSSCMSRecipientIdentifier
, id
.issuerAndSN
),
227 SEC_ASN1_SUB(CERT_IssuerAndSNTemplate
),
228 NSSCMSRecipientID_IssuerSN
},
232 static const SEC_ASN1Template NSSCMSKeyTransRecipientInfoTemplate
[] = {
234 0, NULL
, sizeof(NSSCMSKeyTransRecipientInfo
) },
236 offsetof(NSSCMSKeyTransRecipientInfo
, version
) },
238 offsetof(NSSCMSKeyTransRecipientInfo
, recipientIdentifier
),
239 NSSCMSRecipientIdentifierTemplate
},
240 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
241 offsetof(NSSCMSKeyTransRecipientInfo
, keyEncAlg
),
242 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
243 { SEC_ASN1_OCTET_STRING
,
244 offsetof(NSSCMSKeyTransRecipientInfo
, encKey
) },
248 /* -----------------------------------------------------------------------------
249 * key agreement recipient info
252 static const SEC_ASN1Template NSSCMSOriginatorPublicKeyTemplate
[] = {
254 0, NULL
, sizeof(NSSCMSOriginatorPublicKey
) },
255 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
256 offsetof(NSSCMSOriginatorPublicKey
, algorithmIdentifier
),
257 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
258 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
259 offsetof(NSSCMSOriginatorPublicKey
, publicKey
),
260 SEC_ASN1_SUB(SEC_BitStringTemplate
) },
264 static const SEC_ASN1Template NSSCMSOriginatorIdentifierOrKeyTemplate
[] = {
266 offsetof(NSSCMSOriginatorIdentifierOrKey
, identifierType
), NULL
,
267 sizeof(NSSCMSOriginatorIdentifierOrKey
) },
268 { SEC_ASN1_POINTER
| SEC_ASN1_XTRN
,
269 offsetof(NSSCMSOriginatorIdentifierOrKey
, id
.issuerAndSN
),
270 SEC_ASN1_SUB(CERT_IssuerAndSNTemplate
),
271 NSSCMSOriginatorIDOrKey_IssuerSN
},
272 { SEC_ASN1_EXPLICIT
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
|
274 offsetof(NSSCMSOriginatorIdentifierOrKey
, id
.subjectKeyID
),
275 SEC_ASN1_SUB(SEC_PointerToOctetStringTemplate
),
276 NSSCMSOriginatorIDOrKey_SubjectKeyID
},
277 { SEC_ASN1_EXPLICIT
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 2,
278 offsetof(NSSCMSOriginatorIdentifierOrKey
, id
.originatorPublicKey
),
279 NSSCMSOriginatorPublicKeyTemplate
,
280 NSSCMSOriginatorIDOrKey_OriginatorPublicKey
},
284 const SEC_ASN1Template NSSCMSRecipientKeyIdentifierTemplate
[] = {
286 0, NULL
, sizeof(NSSCMSRecipientKeyIdentifier
) },
287 { SEC_ASN1_OCTET_STRING
,
288 offsetof(NSSCMSRecipientKeyIdentifier
, subjectKeyIdentifier
) },
289 { SEC_ASN1_OPTIONAL
| SEC_ASN1_OCTET_STRING
,
290 offsetof(NSSCMSRecipientKeyIdentifier
, date
) },
291 { SEC_ASN1_OPTIONAL
| SEC_ASN1_OCTET_STRING
,
292 offsetof(NSSCMSRecipientKeyIdentifier
, other
) },
296 static const SEC_ASN1Template NSSCMSKeyAgreeRecipientIdentifierTemplate
[] = {
298 offsetof(NSSCMSKeyAgreeRecipientIdentifier
, identifierType
), NULL
,
299 sizeof(NSSCMSKeyAgreeRecipientIdentifier
) },
300 { SEC_ASN1_POINTER
| SEC_ASN1_XTRN
,
301 offsetof(NSSCMSKeyAgreeRecipientIdentifier
, id
.issuerAndSN
),
302 SEC_ASN1_SUB(CERT_IssuerAndSNTemplate
),
303 NSSCMSKeyAgreeRecipientID_IssuerSN
},
304 { SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 0,
305 offsetof(NSSCMSKeyAgreeRecipientIdentifier
, id
.recipientKeyIdentifier
),
306 NSSCMSRecipientKeyIdentifierTemplate
,
307 NSSCMSKeyAgreeRecipientID_RKeyID
},
311 static const SEC_ASN1Template NSSCMSRecipientEncryptedKeyTemplate
[] = {
313 0, NULL
, sizeof(NSSCMSRecipientEncryptedKey
) },
315 offsetof(NSSCMSRecipientEncryptedKey
, recipientIdentifier
),
316 NSSCMSKeyAgreeRecipientIdentifierTemplate
},
317 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
318 offsetof(NSSCMSRecipientEncryptedKey
, encKey
),
319 SEC_ASN1_SUB(SEC_BitStringTemplate
) },
323 static const SEC_ASN1Template NSSCMSKeyAgreeRecipientInfoTemplate
[] = {
325 0, NULL
, sizeof(NSSCMSKeyAgreeRecipientInfo
) },
327 offsetof(NSSCMSKeyAgreeRecipientInfo
, version
) },
328 { SEC_ASN1_EXPLICIT
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 0,
329 offsetof(NSSCMSKeyAgreeRecipientInfo
, originatorIdentifierOrKey
),
330 NSSCMSOriginatorIdentifierOrKeyTemplate
},
331 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_EXPLICIT
|
332 SEC_ASN1_CONTEXT_SPECIFIC
| SEC_ASN1_XTRN
| 1,
333 offsetof(NSSCMSKeyAgreeRecipientInfo
, ukm
),
334 SEC_ASN1_SUB(SEC_OctetStringTemplate
) },
335 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
336 offsetof(NSSCMSKeyAgreeRecipientInfo
, keyEncAlg
),
337 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
338 { SEC_ASN1_SEQUENCE_OF
,
339 offsetof(NSSCMSKeyAgreeRecipientInfo
, recipientEncryptedKeys
),
340 NSSCMSRecipientEncryptedKeyTemplate
},
344 /* -----------------------------------------------------------------------------
348 static const SEC_ASN1Template NSSCMSKEKIdentifierTemplate
[] = {
350 0, NULL
, sizeof(NSSCMSKEKIdentifier
) },
351 { SEC_ASN1_OCTET_STRING
,
352 offsetof(NSSCMSKEKIdentifier
, keyIdentifier
) },
353 { SEC_ASN1_OPTIONAL
| SEC_ASN1_OCTET_STRING
,
354 offsetof(NSSCMSKEKIdentifier
, date
) },
355 { SEC_ASN1_OPTIONAL
| SEC_ASN1_OCTET_STRING
,
356 offsetof(NSSCMSKEKIdentifier
, other
) },
360 static const SEC_ASN1Template NSSCMSKEKRecipientInfoTemplate
[] = {
362 0, NULL
, sizeof(NSSCMSKEKRecipientInfo
) },
364 offsetof(NSSCMSKEKRecipientInfo
, version
) },
366 offsetof(NSSCMSKEKRecipientInfo
, kekIdentifier
),
367 NSSCMSKEKIdentifierTemplate
},
368 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
369 offsetof(NSSCMSKEKRecipientInfo
, keyEncAlg
),
370 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
371 { SEC_ASN1_OCTET_STRING
,
372 offsetof(NSSCMSKEKRecipientInfo
, encKey
) },
376 /* -----------------------------------------------------------------------------
379 const SEC_ASN1Template NSSCMSRecipientInfoTemplate
[] = {
381 offsetof(NSSCMSRecipientInfo
, recipientInfoType
), NULL
,
382 sizeof(NSSCMSRecipientInfo
) },
383 { SEC_ASN1_EXPLICIT
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 1,
384 offsetof(NSSCMSRecipientInfo
, ri
.keyAgreeRecipientInfo
),
385 NSSCMSKeyAgreeRecipientInfoTemplate
,
386 NSSCMSRecipientInfoID_KeyAgree
},
387 { SEC_ASN1_EXPLICIT
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 2,
388 offsetof(NSSCMSRecipientInfo
, ri
.kekRecipientInfo
),
389 NSSCMSKEKRecipientInfoTemplate
,
390 NSSCMSRecipientInfoID_KEK
},
392 offsetof(NSSCMSRecipientInfo
, ri
.keyTransRecipientInfo
),
393 NSSCMSKeyTransRecipientInfoTemplate
,
394 NSSCMSRecipientInfoID_KeyTrans
},
398 /* -----------------------------------------------------------------------------
402 const SEC_ASN1Template NSSCMSDigestedDataTemplate
[] = {
403 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
404 0, NULL
, sizeof(NSSCMSDigestedData
) },
406 offsetof(NSSCMSDigestedData
, version
) },
407 { SEC_ASN1_INLINE
| SEC_ASN1_XTRN
,
408 offsetof(NSSCMSDigestedData
, digestAlg
),
409 SEC_ASN1_SUB(SECOID_AlgorithmIDTemplate
) },
411 offsetof(NSSCMSDigestedData
, contentInfo
),
412 NSSCMSEncapsulatedContentInfoTemplate
},
413 { SEC_ASN1_OCTET_STRING
,
414 offsetof(NSSCMSDigestedData
, digest
) },
418 const SEC_ASN1Template NSS_PointerToCMSDigestedDataTemplate
[] = {
419 { SEC_ASN1_POINTER
, 0, NSSCMSDigestedDataTemplate
}
422 const SEC_ASN1Template NSSCMSEncryptedDataTemplate
[] = {
423 { SEC_ASN1_SEQUENCE
| SEC_ASN1_MAY_STREAM
,
424 0, NULL
, sizeof(NSSCMSEncryptedData
) },
426 offsetof(NSSCMSEncryptedData
, version
) },
428 offsetof(NSSCMSEncryptedData
, contentInfo
),
429 NSSCMSEncryptedContentInfoTemplate
},
430 { SEC_ASN1_OPTIONAL
| SEC_ASN1_CONSTRUCTED
| SEC_ASN1_CONTEXT_SPECIFIC
| 1,
431 offsetof(NSSCMSEncryptedData
, unprotectedAttr
),
432 nss_cms_set_of_attribute_template
},
436 const SEC_ASN1Template NSS_PointerToCMSEncryptedDataTemplate
[] = {
437 { SEC_ASN1_POINTER
, 0, NSSCMSEncryptedDataTemplate
}
440 const SEC_ASN1Template NSSCMSGenericWrapperDataTemplate
[] = {
442 offsetof(NSSCMSGenericWrapperData
, contentInfo
),
443 NSSCMSEncapsulatedContentInfoTemplate
},
446 SEC_ASN1_CHOOSER_IMPLEMENT(NSSCMSGenericWrapperDataTemplate
)
448 const SEC_ASN1Template NSS_PointerToCMSGenericWrapperDataTemplate
[] = {
449 { SEC_ASN1_POINTER
, 0, NSSCMSGenericWrapperDataTemplate
}
452 SEC_ASN1_CHOOSER_IMPLEMENT(NSS_PointerToCMSGenericWrapperDataTemplate
)
454 /* -----------------------------------------------------------------------------
457 static const SEC_ASN1Template
*
458 nss_cms_choose_content_template(void *src_or_dest
, PRBool encoding
)
460 const SEC_ASN1Template
*theTemplate
;
461 NSSCMSContentInfo
*cinfo
;
464 PORT_Assert(src_or_dest
!= NULL
);
465 if (src_or_dest
== NULL
)
468 cinfo
= (NSSCMSContentInfo
*)src_or_dest
;
469 type
= NSS_CMSContentInfo_GetContentTypeTag(cinfo
);
472 theTemplate
= NSS_CMSType_GetTemplate(type
);
474 case SEC_OID_PKCS7_DATA
:
475 theTemplate
= SEC_ASN1_GET(SEC_PointerToOctetStringTemplate
);
477 case SEC_OID_PKCS7_SIGNED_DATA
:
478 theTemplate
= NSS_PointerToCMSSignedDataTemplate
;
480 case SEC_OID_PKCS7_ENVELOPED_DATA
:
481 theTemplate
= NSS_PointerToCMSEnvelopedDataTemplate
;
483 case SEC_OID_PKCS7_DIGESTED_DATA
:
484 theTemplate
= NSS_PointerToCMSDigestedDataTemplate
;
486 case SEC_OID_PKCS7_ENCRYPTED_DATA
:
487 theTemplate
= NSS_PointerToCMSEncryptedDataTemplate
;