/* forward declaration */
static const SecAsn1Template *
-nss_cms_choose_content_template(void *src_or_dest, Boolean encoding, const char *buf, void *dest);
+nss_cms_choose_content_template(void *src_or_dest, Boolean encoding, const char *buf, size_t len, void *dest);
static const SecAsn1TemplateChooserPtr nss_cms_chooser
= nss_cms_choose_content_template;
{ SEC_ASN1_CHOICE,
offsetof(SecCmsRecipientIdentifier,identifierType), NULL,
sizeof(SecCmsRecipientIdentifier) },
- { SEC_ASN1_EXPLICIT | SEC_ASN1_CONSTRUCTED | SEC_ASN1_CONTEXT_SPECIFIC |
- SEC_ASN1_XTRN | 0,
- offsetof(SecCmsRecipientIdentifier,id.subjectKeyID),
- SEC_ASN1_SUB(kSecAsn1PointerToOctetStringTemplate) ,
- SecCmsRecipientIDSubjectKeyID },
+ { SEC_ASN1_POINTER | SEC_ASN1_CONTEXT_SPECIFIC | SEC_ASN1_XTRN | 0,
+ offsetof(SecCmsRecipientIdentifier,id.subjectKeyID),
+ SEC_ASN1_SUB(kSecAsn1OctetStringTemplate) ,
+ SecCmsRecipientIDSubjectKeyID },
{ SEC_ASN1_POINTER | SEC_ASN1_XTRN,
offsetof(SecCmsRecipientIdentifier,id.issuerAndSN),
SEC_ASN1_SUB(SecCmsIssuerAndSNTemplate),
const SecAsn1Template SecCmsRecipientKeyIdentifierTemplate[] = {
{ SEC_ASN1_SEQUENCE,
0, NULL, sizeof(SecCmsRecipientKeyIdentifier) },
- { SEC_ASN1_OCTET_STRING,
- offsetof(SecCmsRecipientKeyIdentifier,subjectKeyIdentifier) },
- { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
- offsetof(SecCmsRecipientKeyIdentifier,date) },
- { SEC_ASN1_OPTIONAL | SEC_ASN1_OCTET_STRING,
+ { SEC_ASN1_INLINE | SEC_ASN1_OCTET_STRING,
+ offsetof(SecCmsRecipientKeyIdentifier,subjectKeyIdentifier),
+ SEC_ASN1_SUB(kSecAsn1OctetStringTemplate) },
+ { SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL | SEC_ASN1_GENERALIZED_TIME,
+ offsetof(SecCmsRecipientKeyIdentifier,date),
+ SEC_ASN1_SUB(kSecAsn1GeneralizedTimeTemplate) },
+ { SEC_ASN1_INLINE | SEC_ASN1_OPTIONAL | SEC_ASN1_ANY,
offsetof(SecCmsRecipientKeyIdentifier,other) },
{ 0 }
};
*
*/
static const SecAsn1Template *
-nss_cms_choose_content_template(void *src_or_dest, Boolean encoding, const char *buf, void *dest)
+nss_cms_choose_content_template(void *src_or_dest, Boolean encoding, const char *buf, size_t len, void *dest)
{
const SecAsn1Template *theTemplate;
SecCmsContentInfoRef cinfo;