LCOV - code coverage report
Current view: top level - bin/default/third_party/heimdal/lib/asn1 - asn1_cms_asn1.c (source / functions) Hit Total Coverage
Test: coverage report for support-claim-type-attributes 6b5c566e Lines: 70 499 14.0 %
Date: 2023-11-21 12:31:41 Functions: 27 206 13.1 %

          Line data    Source code
       1             : /* Generated from /builds/AnthonyCI/samba/third_party/heimdal/lib/asn1/cms.asn1 */
       2             : /* Do not edit */
       3             : 
       4             : #if defined(_WIN32) && !defined(ASN1_LIB)
       5             : # error "ASN1_LIB must be defined"
       6             : #endif
       7             : #include <stdio.h>
       8             : #include <stdlib.h>
       9             : #include <time.h>
      10             : #include <string.h>
      11             : #include <errno.h>
      12             : #include <limits.h>
      13             : #include <krb5-types.h>
      14             : #include "cms_asn1.h"
      15             : #include "cms_asn1-priv.h"
      16             : #include <asn1_err.h>
      17             : #include <der.h>
      18             : #include <asn1-template.h>
      19             : 
      20             : #include <parse_units.h>
      21             : 
      22             : static const struct asn1_type_func asn1_extern_CertificateSerialNumber = {
      23             :         (asn1_type_encode)encode_CertificateSerialNumber,
      24             :         (asn1_type_decode)decode_CertificateSerialNumber,
      25             :         (asn1_type_length)length_CertificateSerialNumber,
      26             :         (asn1_type_copy)copy_CertificateSerialNumber,
      27             :         (asn1_type_release)free_CertificateSerialNumber,
      28             :         (asn1_type_print)print_CertificateSerialNumber,
      29             :         sizeof(CertificateSerialNumber)
      30             : };
      31             : static const struct asn1_type_func asn1_extern_AlgorithmIdentifier = {
      32             :         (asn1_type_encode)encode_AlgorithmIdentifier,
      33             :         (asn1_type_decode)decode_AlgorithmIdentifier,
      34             :         (asn1_type_length)length_AlgorithmIdentifier,
      35             :         (asn1_type_copy)copy_AlgorithmIdentifier,
      36             :         (asn1_type_release)free_AlgorithmIdentifier,
      37             :         (asn1_type_print)print_AlgorithmIdentifier,
      38             :         sizeof(AlgorithmIdentifier)
      39             : };
      40             : static const struct asn1_type_func asn1_extern_Name = {
      41             :         (asn1_type_encode)encode_Name,
      42             :         (asn1_type_decode)decode_Name,
      43             :         (asn1_type_length)length_Name,
      44             :         (asn1_type_copy)copy_Name,
      45             :         (asn1_type_release)free_Name,
      46             :         (asn1_type_print)print_Name,
      47             :         sizeof(Name)
      48             : };
      49             : static const struct asn1_type_func asn1_extern_Attribute = {
      50             :         (asn1_type_encode)encode_Attribute,
      51             :         (asn1_type_decode)decode_Attribute,
      52             :         (asn1_type_length)length_Attribute,
      53             :         (asn1_type_copy)copy_Attribute,
      54             :         (asn1_type_release)free_Attribute,
      55             :         (asn1_type_print)print_Attribute,
      56             :         sizeof(Attribute)
      57             : };
      58             : static const struct asn1_type_func asn1_extern_Certificate = {
      59             :         (asn1_type_encode)encode_Certificate,
      60             :         (asn1_type_decode)decode_Certificate,
      61             :         (asn1_type_length)length_Certificate,
      62             :         (asn1_type_copy)copy_Certificate,
      63             :         (asn1_type_release)free_Certificate,
      64             :         (asn1_type_print)print_Certificate,
      65             :         sizeof(Certificate)
      66             : };
      67             : static const struct asn1_type_func asn1_extern_SubjectKeyIdentifier = {
      68             :         (asn1_type_encode)encode_SubjectKeyIdentifier,
      69             :         (asn1_type_decode)decode_SubjectKeyIdentifier,
      70             :         (asn1_type_length)length_SubjectKeyIdentifier,
      71             :         (asn1_type_copy)copy_SubjectKeyIdentifier,
      72             :         (asn1_type_release)free_SubjectKeyIdentifier,
      73             :         (asn1_type_print)print_SubjectKeyIdentifier,
      74             :         sizeof(SubjectKeyIdentifier)
      75             : };
      76             : static const struct asn1_type_func asn1_extern_HEIM_ANY = {
      77             :         (asn1_type_encode)encode_HEIM_ANY,
      78             :         (asn1_type_decode)decode_HEIM_ANY,
      79             :         (asn1_type_length)length_HEIM_ANY,
      80             :         (asn1_type_copy)copy_HEIM_ANY,
      81             :         (asn1_type_release)free_HEIM_ANY,
      82             :         (asn1_type_print)print_HEIM_ANY,
      83             :         sizeof(HEIM_ANY)
      84             : };
      85             : static unsigned oid_id_pkcs7_variable_num[6] =  { 1, 2, 840, 113549, 1, 7};
      86             : const heim_oid asn1_oid_id_pkcs7 = { 6, oid_id_pkcs7_variable_num };
      87             : 
      88             : static unsigned oid_id_pkcs7_data_variable_num[7] =  { 1, 2, 840, 113549, 1, 7, 1};
      89             : const heim_oid asn1_oid_id_pkcs7_data = { 7, oid_id_pkcs7_data_variable_num };
      90             : 
      91             : static unsigned oid_id_pkcs7_signedData_variable_num[7] =  { 1, 2, 840, 113549, 1, 7, 2};
      92             : const heim_oid asn1_oid_id_pkcs7_signedData = { 7, oid_id_pkcs7_signedData_variable_num };
      93             : 
      94             : static unsigned oid_id_pkcs7_envelopedData_variable_num[7] =  { 1, 2, 840, 113549, 1, 7, 3};
      95             : const heim_oid asn1_oid_id_pkcs7_envelopedData = { 7, oid_id_pkcs7_envelopedData_variable_num };
      96             : 
      97             : static unsigned oid_id_pkcs7_signedAndEnvelopedData_variable_num[7] =  { 1, 2, 840, 113549, 1, 7, 4};
      98             : const heim_oid asn1_oid_id_pkcs7_signedAndEnvelopedData = { 7, oid_id_pkcs7_signedAndEnvelopedData_variable_num };
      99             : 
     100             : static unsigned oid_id_pkcs7_digestedData_variable_num[7] =  { 1, 2, 840, 113549, 1, 7, 5};
     101             : const heim_oid asn1_oid_id_pkcs7_digestedData = { 7, oid_id_pkcs7_digestedData_variable_num };
     102             : 
     103             : static unsigned oid_id_pkcs7_encryptedData_variable_num[7] =  { 1, 2, 840, 113549, 1, 7, 6};
     104             : const heim_oid asn1_oid_id_pkcs7_encryptedData = { 7, oid_id_pkcs7_encryptedData_variable_num };
     105             : 
     106             : extern const struct asn1_template asn1_CMSVersion[];
     107             : extern const struct asn1_template asn1_CMSVersion[];
     108             : extern const struct asn1_template asn1_DigestAlgorithmIdentifier[];
     109             : extern const struct asn1_template asn1_DigestAlgorithmIdentifier[];
     110             : extern const struct asn1_template asn1_DigestAlgorithmIdentifiers[];
     111             : extern const struct asn1_template asn1_SignatureAlgorithmIdentifier[];
     112             : extern const struct asn1_template asn1_SignatureAlgorithmIdentifier[];
     113             : extern const struct asn1_template asn1_ContentType[];
     114             : extern const struct asn1_template asn1_ContentType[];
     115             : extern const struct asn1_template asn1_MessageDigest[];
     116             : extern const struct asn1_template asn1_MessageDigest[];
     117             : extern const struct asn1_template asn1_ContentInfo[];
     118             : extern const struct asn1_template asn1_EncapsulatedContentInfo[];
     119             : extern const struct asn1_template asn1_CertificateSet[];
     120             : extern const struct asn1_template asn1_CertificateList[];
     121             : extern const struct asn1_template asn1_CertificateList[];
     122             : extern const struct asn1_template asn1_CertificateRevocationLists[];
     123             : extern const struct asn1_template asn1_IssuerAndSerialNumber[];
     124             : extern const struct asn1_template asn1_CMSIdentifier[];
     125             : extern const struct asn1_template asn1_SignerIdentifier[];
     126             : extern const struct asn1_template asn1_SignerIdentifier[];
     127             : extern const struct asn1_template asn1_RecipientIdentifier[];
     128             : extern const struct asn1_template asn1_RecipientIdentifier[];
     129             : extern const struct asn1_template asn1_CMSAttributes[];
     130             : extern const struct asn1_template asn1_SignatureValue[];
     131             : extern const struct asn1_template asn1_SignatureValue[];
     132             : extern const struct asn1_template asn1_SignerInfo[];
     133             : extern const struct asn1_template asn1_SignerInfos[];
     134             : extern const struct asn1_template asn1_SignedData[];
     135             : extern const struct asn1_template asn1_OriginatorInfo[];
     136             : extern const struct asn1_template asn1_KeyEncryptionAlgorithmIdentifier[];
     137             : extern const struct asn1_template asn1_KeyEncryptionAlgorithmIdentifier[];
     138             : extern const struct asn1_template asn1_ContentEncryptionAlgorithmIdentifier[];
     139             : extern const struct asn1_template asn1_ContentEncryptionAlgorithmIdentifier[];
     140             : extern const struct asn1_template asn1_EncryptedKey[];
     141             : extern const struct asn1_template asn1_EncryptedKey[];
     142             : extern const struct asn1_template asn1_KeyTransRecipientInfo[];
     143             : extern const struct asn1_template asn1_RecipientInfo[];
     144             : extern const struct asn1_template asn1_RecipientInfo[];
     145             : extern const struct asn1_template asn1_RecipientInfos[];
     146             : extern const struct asn1_template asn1_EncryptedContent[];
     147             : extern const struct asn1_template asn1_EncryptedContent[];
     148             : extern const struct asn1_template asn1_EncryptedContentInfo[];
     149             : extern const struct asn1_template asn1_UnprotectedAttributes[];
     150             : extern const struct asn1_template asn1_CMSEncryptedData[];
     151             : extern const struct asn1_template asn1_EnvelopedData[];
     152             : extern const struct asn1_template asn1_CMSRC2CBCParameter[];
     153             : extern const struct asn1_template asn1_CMSCBCParameter[];
     154             : extern const struct asn1_template asn1_CMSCBCParameter[];
     155             : /* template_members: CMSVersion exp exp */
     156             : const struct asn1_template asn1_CMSVersion_enum_names[] = {
     157             : /* 0 */ { 0, 0, ((void *)(uintptr_t)5) },
     158             : /* 1 */ { A1_OP_NAME, 0, "cMSVersion-v0" },
     159             : /* 2 */ { A1_OP_NAME, 1, "cMSVersion-v1" },
     160             : /* 3 */ { A1_OP_NAME, 2, "cMSVersion-v2" },
     161             : /* 4 */ { A1_OP_NAME, 3, "cMSVersion-v3" },
     162             : /* 5 */ { A1_OP_NAME, 4, "cMSVersion-v4" }
     163             : };
     164             : /* generate_template_type: CMSVersion_tag__0 */
     165             : const struct asn1_template asn1_CMSVersion_tag__0[] = {
     166             : /* 0 */ { 0, sizeof(int), ((void *)(uintptr_t)1) },
     167             : /* 1 */ { A1_PARSE_T(A1T_IMEMBER), 0, asn1_CMSVersion_enum_names }
     168             : };
     169             : /* generate_template_type: CMSVersion */
     170             : const struct asn1_template asn1_CMSVersion[] = {
     171             : /* 0 */ { 0, sizeof(CMSVersion), ((void *)(uintptr_t)1) },
     172             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer), 0, asn1_CMSVersion_tag__0 }
     173             : };
     174             : 
     175             : int ASN1CALL
     176           0 : decode_CMSVersion(const unsigned char *p, size_t len, CMSVersion *data, size_t *size)
     177             : {
     178           0 :     memset(data, 0, sizeof(*data));
     179           0 :     return _asn1_decode_top(asn1_CMSVersion, 0|A1_PF_ALLOW_BER, p, len, data, size);
     180             : }
     181             : 
     182             : 
     183             : int ASN1CALL
     184           0 : encode_CMSVersion(unsigned char *p, size_t len, const CMSVersion *data, size_t *size)
     185             : {
     186           0 :     return _asn1_encode(asn1_CMSVersion, p, len, data, size);
     187             : }
     188             : 
     189             : 
     190             : size_t ASN1CALL
     191           0 : length_CMSVersion(const CMSVersion *data)
     192             : {
     193           0 :     return _asn1_length(asn1_CMSVersion, data);
     194             : }
     195             : 
     196             : 
     197             : void ASN1CALL
     198           0 : free_CMSVersion(CMSVersion *data)
     199             : {
     200           0 :     _asn1_free_top(asn1_CMSVersion, data);
     201           0 : }
     202             : 
     203             : 
     204             : int ASN1CALL
     205           0 : copy_CMSVersion(const CMSVersion *from, CMSVersion *to)
     206             : {
     207           0 :     return _asn1_copy_top(asn1_CMSVersion, from, to);
     208             : }
     209             : 
     210             : 
     211             : char * ASN1CALL
     212           0 : print_CMSVersion(const CMSVersion *data, int flags)
     213             : {
     214           0 :     return _asn1_print_top(asn1_CMSVersion, flags, data);
     215             : }
     216             : 
     217             : /* generate_template_type: DigestAlgorithmIdentifier */
     218             : const struct asn1_template asn1_DigestAlgorithmIdentifier[] = {
     219             : /* 0 */ { 0, sizeof(DigestAlgorithmIdentifier), ((void *)(uintptr_t)1) },
     220             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_AlgorithmIdentifier}
     221             : };
     222             : 
     223             : int ASN1CALL
     224           0 : decode_DigestAlgorithmIdentifier(const unsigned char *p, size_t len, DigestAlgorithmIdentifier *data, size_t *size)
     225             : {
     226           0 :     memset(data, 0, sizeof(*data));
     227           0 :     return _asn1_decode_top(asn1_DigestAlgorithmIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
     228             : }
     229             : 
     230             : 
     231             : int ASN1CALL
     232           0 : encode_DigestAlgorithmIdentifier(unsigned char *p, size_t len, const DigestAlgorithmIdentifier *data, size_t *size)
     233             : {
     234           0 :     return _asn1_encode(asn1_DigestAlgorithmIdentifier, p, len, data, size);
     235             : }
     236             : 
     237             : 
     238             : size_t ASN1CALL
     239           0 : length_DigestAlgorithmIdentifier(const DigestAlgorithmIdentifier *data)
     240             : {
     241           0 :     return _asn1_length(asn1_DigestAlgorithmIdentifier, data);
     242             : }
     243             : 
     244             : 
     245             : void ASN1CALL
     246           0 : free_DigestAlgorithmIdentifier(DigestAlgorithmIdentifier *data)
     247             : {
     248           0 :     _asn1_free_top(asn1_DigestAlgorithmIdentifier, data);
     249           0 : }
     250             : 
     251             : 
     252             : int ASN1CALL
     253          61 : copy_DigestAlgorithmIdentifier(const DigestAlgorithmIdentifier *from, DigestAlgorithmIdentifier *to)
     254             : {
     255          61 :     return _asn1_copy_top(asn1_DigestAlgorithmIdentifier, from, to);
     256             : }
     257             : 
     258             : 
     259             : char * ASN1CALL
     260           0 : print_DigestAlgorithmIdentifier(const DigestAlgorithmIdentifier *data, int flags)
     261             : {
     262           0 :     return _asn1_print_top(asn1_DigestAlgorithmIdentifier, flags, data);
     263             : }
     264             : 
     265             : /* template_members: DigestAlgorithmIdentifiers exp exp */
     266             : /* generate_template_type: DigestAlgorithmIdentifier_seofTstruct_0 */
     267             : const struct asn1_template asn1_DigestAlgorithmIdentifier_seofTstruct_0[] = {
     268             : /* 0 */ { 0, sizeof(DigestAlgorithmIdentifier), ((void *)(uintptr_t)1) },
     269             : /* 1 */ { A1_OP_TYPE , 0, asn1_DigestAlgorithmIdentifier }
     270             : };
     271             : /* generate_template_type: DigestAlgorithmIdentifiers_tag__1 */
     272             : const struct asn1_template asn1_DigestAlgorithmIdentifiers_tag__1[] = {
     273             : /* 0 */ { 0, sizeof(DigestAlgorithmIdentifier), ((void *)(uintptr_t)1) },
     274             : /* 1 */ { A1_OP_SETOF, 0, asn1_DigestAlgorithmIdentifier_seofTstruct_0 }
     275             : };
     276             : /* generate_template_type: DigestAlgorithmIdentifiers */
     277             : const struct asn1_template asn1_DigestAlgorithmIdentifiers[] = {
     278             : /* 0 */ { 0, sizeof(DigestAlgorithmIdentifiers), ((void *)(uintptr_t)1) },
     279             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_DigestAlgorithmIdentifiers_tag__1 }
     280             : };
     281             : 
     282             : int ASN1CALL
     283           0 : decode_DigestAlgorithmIdentifiers(const unsigned char *p, size_t len, DigestAlgorithmIdentifiers *data, size_t *size)
     284             : {
     285           0 :     memset(data, 0, sizeof(*data));
     286           0 :     return _asn1_decode_top(asn1_DigestAlgorithmIdentifiers, 0|A1_PF_ALLOW_BER, p, len, data, size);
     287             : }
     288             : 
     289             : 
     290             : int ASN1CALL
     291           0 : encode_DigestAlgorithmIdentifiers(unsigned char *p, size_t len, const DigestAlgorithmIdentifiers *data, size_t *size)
     292             : {
     293           0 :     return _asn1_encode(asn1_DigestAlgorithmIdentifiers, p, len, data, size);
     294             : }
     295             : 
     296             : 
     297             : size_t ASN1CALL
     298           0 : length_DigestAlgorithmIdentifiers(const DigestAlgorithmIdentifiers *data)
     299             : {
     300           0 :     return _asn1_length(asn1_DigestAlgorithmIdentifiers, data);
     301             : }
     302             : 
     303             : 
     304             : void ASN1CALL
     305           0 : free_DigestAlgorithmIdentifiers(DigestAlgorithmIdentifiers *data)
     306             : {
     307           0 :     _asn1_free_top(asn1_DigestAlgorithmIdentifiers, data);
     308           0 : }
     309             : 
     310             : 
     311             : int ASN1CALL
     312           0 : copy_DigestAlgorithmIdentifiers(const DigestAlgorithmIdentifiers *from, DigestAlgorithmIdentifiers *to)
     313             : {
     314           0 :     return _asn1_copy_top(asn1_DigestAlgorithmIdentifiers, from, to);
     315             : }
     316             : 
     317             : 
     318             : char * ASN1CALL
     319           0 : print_DigestAlgorithmIdentifiers(const DigestAlgorithmIdentifiers *data, int flags)
     320             : {
     321           0 :     return _asn1_print_top(asn1_DigestAlgorithmIdentifiers, flags, data);
     322             : }
     323             : 
     324             : int ASN1CALL
     325          61 : add_DigestAlgorithmIdentifiers(DigestAlgorithmIdentifiers *data, const DigestAlgorithmIdentifier *element)
     326             : {
     327           0 : int ret;
     328           0 : void *ptr;
     329             : 
     330          61 : ptr = realloc(data->val, 
     331          61 :         (data->len + 1) * sizeof(data->val[0]));
     332          61 : if (ptr == NULL) return ENOMEM;
     333          61 : data->val = ptr;
     334             : 
     335          61 : ret = copy_DigestAlgorithmIdentifier(element, &data->val[data->len]);
     336          61 : if (ret) return ret;
     337          61 : data->len++;
     338          61 : return 0;
     339             : }
     340             : 
     341             : int ASN1CALL
     342           0 : remove_DigestAlgorithmIdentifiers(DigestAlgorithmIdentifiers *data, unsigned int element)
     343             : {
     344           0 : void *ptr;
     345             : 
     346           0 : if (data->len == 0 || element >= data->len)
     347           0 :         return ASN1_OVERRUN;
     348           0 : free_DigestAlgorithmIdentifier(&data->val[element]);
     349           0 : data->len--;
     350           0 : if (element < data->len)
     351           0 :         memmove(&data->val[element], &data->val[element + 1], 
     352           0 :                 sizeof(data->val[0]) * (data->len - element));
     353           0 : ptr = realloc(data->val, data->len * sizeof(data->val[0]));
     354           0 : if (ptr != NULL || data->len == 0) data->val = ptr;
     355           0 : return 0;
     356             : }
     357             : 
     358             : /* generate_template_type: SignatureAlgorithmIdentifier */
     359             : const struct asn1_template asn1_SignatureAlgorithmIdentifier[] = {
     360             : /* 0 */ { 0, sizeof(SignatureAlgorithmIdentifier), ((void *)(uintptr_t)1) },
     361             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_AlgorithmIdentifier}
     362             : };
     363             : 
     364             : int ASN1CALL
     365           0 : decode_SignatureAlgorithmIdentifier(const unsigned char *p, size_t len, SignatureAlgorithmIdentifier *data, size_t *size)
     366             : {
     367           0 :     memset(data, 0, sizeof(*data));
     368           0 :     return _asn1_decode_top(asn1_SignatureAlgorithmIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
     369             : }
     370             : 
     371             : 
     372             : int ASN1CALL
     373           0 : encode_SignatureAlgorithmIdentifier(unsigned char *p, size_t len, const SignatureAlgorithmIdentifier *data, size_t *size)
     374             : {
     375           0 :     return _asn1_encode(asn1_SignatureAlgorithmIdentifier, p, len, data, size);
     376             : }
     377             : 
     378             : 
     379             : size_t ASN1CALL
     380           0 : length_SignatureAlgorithmIdentifier(const SignatureAlgorithmIdentifier *data)
     381             : {
     382           0 :     return _asn1_length(asn1_SignatureAlgorithmIdentifier, data);
     383             : }
     384             : 
     385             : 
     386             : void ASN1CALL
     387           0 : free_SignatureAlgorithmIdentifier(SignatureAlgorithmIdentifier *data)
     388             : {
     389           0 :     _asn1_free_top(asn1_SignatureAlgorithmIdentifier, data);
     390           0 : }
     391             : 
     392             : 
     393             : int ASN1CALL
     394           0 : copy_SignatureAlgorithmIdentifier(const SignatureAlgorithmIdentifier *from, SignatureAlgorithmIdentifier *to)
     395             : {
     396           0 :     return _asn1_copy_top(asn1_SignatureAlgorithmIdentifier, from, to);
     397             : }
     398             : 
     399             : 
     400             : char * ASN1CALL
     401           0 : print_SignatureAlgorithmIdentifier(const SignatureAlgorithmIdentifier *data, int flags)
     402             : {
     403           0 :     return _asn1_print_top(asn1_SignatureAlgorithmIdentifier, flags, data);
     404             : }
     405             : 
     406             : /* template_members: ContentType exp exp */
     407             : /* generate_template_type: ContentType_tag__2 */
     408             : const struct asn1_template asn1_ContentType_tag__2[] = {
     409             : /* 0 */ { 0, sizeof(heim_oid), ((void *)(uintptr_t)1) },
     410             : /* 1 */ { A1_PARSE_T(A1T_OID), 0, NULL }
     411             : };
     412             : /* generate_template_type: ContentType */
     413             : const struct asn1_template asn1_ContentType[] = {
     414             : /* 0 */ { 0, sizeof(ContentType), ((void *)(uintptr_t)1) },
     415             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OID), 0, asn1_ContentType_tag__2 }
     416             : };
     417             : 
     418             : int ASN1CALL
     419          28 : decode_ContentType(const unsigned char *p, size_t len, ContentType *data, size_t *size)
     420             : {
     421          28 :     memset(data, 0, sizeof(*data));
     422          28 :     return _asn1_decode_top(asn1_ContentType, 0|A1_PF_ALLOW_BER, p, len, data, size);
     423             : }
     424             : 
     425             : 
     426             : int ASN1CALL
     427          57 : encode_ContentType(unsigned char *p, size_t len, const ContentType *data, size_t *size)
     428             : {
     429          57 :     return _asn1_encode(asn1_ContentType, p, len, data, size);
     430             : }
     431             : 
     432             : 
     433             : size_t ASN1CALL
     434          57 : length_ContentType(const ContentType *data)
     435             : {
     436          57 :     return _asn1_length(asn1_ContentType, data);
     437             : }
     438             : 
     439             : 
     440             : void ASN1CALL
     441           0 : free_ContentType(ContentType *data)
     442             : {
     443           0 :     _asn1_free_top(asn1_ContentType, data);
     444           0 : }
     445             : 
     446             : 
     447             : int ASN1CALL
     448           0 : copy_ContentType(const ContentType *from, ContentType *to)
     449             : {
     450           0 :     return _asn1_copy_top(asn1_ContentType, from, to);
     451             : }
     452             : 
     453             : 
     454             : char * ASN1CALL
     455           0 : print_ContentType(const ContentType *data, int flags)
     456             : {
     457           0 :     return _asn1_print_top(asn1_ContentType, flags, data);
     458             : }
     459             : 
     460             : /* template_members: MessageDigest exp exp */
     461             : /* generate_template_type: MessageDigest_tag__3 */
     462             : const struct asn1_template asn1_MessageDigest_tag__3[] = {
     463             : /* 0 */ { 0, sizeof(heim_octet_string), ((void *)(uintptr_t)1) },
     464             : /* 1 */ { A1_PARSE_T(A1T_OCTET_STRING), 0, NULL }
     465             : };
     466             : /* generate_template_type: MessageDigest */
     467             : const struct asn1_template asn1_MessageDigest[] = {
     468             : /* 0 */ { 0, sizeof(MessageDigest), ((void *)(uintptr_t)1) },
     469             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_MessageDigest_tag__3 }
     470             : };
     471             : 
     472             : int ASN1CALL
     473          28 : decode_MessageDigest(const unsigned char *p, size_t len, MessageDigest *data, size_t *size)
     474             : {
     475          28 :     memset(data, 0, sizeof(*data));
     476          28 :     return _asn1_decode_top(asn1_MessageDigest, 0|A1_PF_ALLOW_BER, p, len, data, size);
     477             : }
     478             : 
     479             : 
     480             : int ASN1CALL
     481          57 : encode_MessageDigest(unsigned char *p, size_t len, const MessageDigest *data, size_t *size)
     482             : {
     483          57 :     return _asn1_encode(asn1_MessageDigest, p, len, data, size);
     484             : }
     485             : 
     486             : 
     487             : size_t ASN1CALL
     488          57 : length_MessageDigest(const MessageDigest *data)
     489             : {
     490          57 :     return _asn1_length(asn1_MessageDigest, data);
     491             : }
     492             : 
     493             : 
     494             : void ASN1CALL
     495           0 : free_MessageDigest(MessageDigest *data)
     496             : {
     497           0 :     _asn1_free_top(asn1_MessageDigest, data);
     498           0 : }
     499             : 
     500             : 
     501             : int ASN1CALL
     502           0 : copy_MessageDigest(const MessageDigest *from, MessageDigest *to)
     503             : {
     504           0 :     return _asn1_copy_top(asn1_MessageDigest, from, to);
     505             : }
     506             : 
     507             : 
     508             : char * ASN1CALL
     509           0 : print_MessageDigest(const MessageDigest *data, int flags)
     510             : {
     511           0 :     return _asn1_print_top(asn1_MessageDigest, flags, data);
     512             : }
     513             : 
     514             : /* template_members: ContentInfo exp exp */
     515             : /* tsequence: members isstruct: 1 */
     516             : /* template_members: ContentInfo exp exp */
     517             : /* generate_template_type: ContentInfo_tag_content_5 */
     518             : const struct asn1_template asn1_ContentInfo_tag_content_5[] = {
     519             : /* 0 */ { 0, sizeof(HEIM_ANY), ((void *)(uintptr_t)1) },
     520             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_HEIM_ANY}
     521             : };
     522             : /* generate_template_type: ContentInfo_tag__4 */
     523             : const struct asn1_template asn1_ContentInfo_tag__4[] = {
     524             : /* 0 */ { 0, sizeof(struct ContentInfo), ((void *)(uintptr_t)5) },
     525             : /* 1 */ { A1_OP_TYPE , offsetof(struct ContentInfo, contentType), asn1_ContentType },
     526             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL, offsetof(struct ContentInfo, content), asn1_ContentInfo_tag_content_5 },
     527             : /* 3 */ { A1_OP_NAME, 0, "ContentInfo" },
     528             : /* 4 */ { A1_OP_NAME, 0, "contentType" },
     529             : /* 5 */ { A1_OP_NAME, 0, "content" }
     530             : };
     531             : /* generate_template_type: ContentInfo */
     532             : const struct asn1_template asn1_ContentInfo[] = {
     533             : /* 0 */ { 0, sizeof(ContentInfo), ((void *)(uintptr_t)1) },
     534             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_ContentInfo_tag__4 }
     535             : };
     536             : 
     537             : int ASN1CALL
     538          70 : decode_ContentInfo(const unsigned char *p, size_t len, ContentInfo *data, size_t *size)
     539             : {
     540          70 :     memset(data, 0, sizeof(*data));
     541          70 :     return _asn1_decode_top(asn1_ContentInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
     542             : }
     543             : 
     544             : 
     545             : int ASN1CALL
     546         169 : encode_ContentInfo(unsigned char *p, size_t len, const ContentInfo *data, size_t *size)
     547             : {
     548         169 :     return _asn1_encode(asn1_ContentInfo, p, len, data, size);
     549             : }
     550             : 
     551             : 
     552             : size_t ASN1CALL
     553         169 : length_ContentInfo(const ContentInfo *data)
     554             : {
     555         169 :     return _asn1_length(asn1_ContentInfo, data);
     556             : }
     557             : 
     558             : 
     559             : void ASN1CALL
     560         363 : free_ContentInfo(ContentInfo *data)
     561             : {
     562         363 :     _asn1_free_top(asn1_ContentInfo, data);
     563         363 : }
     564             : 
     565             : 
     566             : int ASN1CALL
     567           0 : copy_ContentInfo(const ContentInfo *from, ContentInfo *to)
     568             : {
     569           0 :     return _asn1_copy_top(asn1_ContentInfo, from, to);
     570             : }
     571             : 
     572             : 
     573             : char * ASN1CALL
     574           0 : print_ContentInfo(const ContentInfo *data, int flags)
     575             : {
     576           0 :     return _asn1_print_top(asn1_ContentInfo, flags, data);
     577             : }
     578             : 
     579             : /* template_members: EncapsulatedContentInfo exp exp */
     580             : /* tsequence: members isstruct: 1 */
     581             : /* template_members: EncapsulatedContentInfo exp exp */
     582             : /* template_members: heim_octet_string exp exp */
     583             : /* generate_template_type: heim_octet_string_tag_eContent_8 */
     584             : /* generate_template_type: EncapsulatedContentInfo_tag_eContent_7 */
     585             : const struct asn1_template asn1_EncapsulatedContentInfo_tag_eContent_7[] = {
     586             : /* 0 */ { 0, sizeof(heim_octet_string), ((void *)(uintptr_t)1) },
     587             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_MessageDigest_tag__3 }
     588             : };
     589             : /* generate_template_type: EncapsulatedContentInfo_tag__6 */
     590             : const struct asn1_template asn1_EncapsulatedContentInfo_tag__6[] = {
     591             : /* 0 */ { 0, sizeof(struct EncapsulatedContentInfo), ((void *)(uintptr_t)5) },
     592             : /* 1 */ { A1_OP_TYPE , offsetof(struct EncapsulatedContentInfo, eContentType), asn1_ContentType },
     593             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL, offsetof(struct EncapsulatedContentInfo, eContent), asn1_EncapsulatedContentInfo_tag_eContent_7 },
     594             : /* 3 */ { A1_OP_NAME, 0, "EncapsulatedContentInfo" },
     595             : /* 4 */ { A1_OP_NAME, 0, "eContentType" },
     596             : /* 5 */ { A1_OP_NAME, 0, "eContent" }
     597             : };
     598             : /* generate_template_type: EncapsulatedContentInfo */
     599             : const struct asn1_template asn1_EncapsulatedContentInfo[] = {
     600             : /* 0 */ { 0, sizeof(EncapsulatedContentInfo), ((void *)(uintptr_t)1) },
     601             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_EncapsulatedContentInfo_tag__6 }
     602             : };
     603             : 
     604             : int ASN1CALL
     605           0 : decode_EncapsulatedContentInfo(const unsigned char *p, size_t len, EncapsulatedContentInfo *data, size_t *size)
     606             : {
     607           0 :     memset(data, 0, sizeof(*data));
     608           0 :     return _asn1_decode_top(asn1_EncapsulatedContentInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
     609             : }
     610             : 
     611             : 
     612             : int ASN1CALL
     613           0 : encode_EncapsulatedContentInfo(unsigned char *p, size_t len, const EncapsulatedContentInfo *data, size_t *size)
     614             : {
     615           0 :     return _asn1_encode(asn1_EncapsulatedContentInfo, p, len, data, size);
     616             : }
     617             : 
     618             : 
     619             : size_t ASN1CALL
     620           0 : length_EncapsulatedContentInfo(const EncapsulatedContentInfo *data)
     621             : {
     622           0 :     return _asn1_length(asn1_EncapsulatedContentInfo, data);
     623             : }
     624             : 
     625             : 
     626             : void ASN1CALL
     627           0 : free_EncapsulatedContentInfo(EncapsulatedContentInfo *data)
     628             : {
     629           0 :     _asn1_free_top(asn1_EncapsulatedContentInfo, data);
     630           0 : }
     631             : 
     632             : 
     633             : int ASN1CALL
     634           0 : copy_EncapsulatedContentInfo(const EncapsulatedContentInfo *from, EncapsulatedContentInfo *to)
     635             : {
     636           0 :     return _asn1_copy_top(asn1_EncapsulatedContentInfo, from, to);
     637             : }
     638             : 
     639             : 
     640             : char * ASN1CALL
     641           0 : print_EncapsulatedContentInfo(const EncapsulatedContentInfo *data, int flags)
     642             : {
     643           0 :     return _asn1_print_top(asn1_EncapsulatedContentInfo, flags, data);
     644             : }
     645             : 
     646             : /* template_members: CertificateSet exp exp */
     647             : /* generate_template_type: HEIM_ANY_seofTstruct_1 */
     648             : /* generate_template_type: CertificateSet_tag__9 */
     649             : const struct asn1_template asn1_CertificateSet_tag__9[] = {
     650             : /* 0 */ { 0, sizeof(HEIM_ANY), ((void *)(uintptr_t)1) },
     651             : /* 1 */ { A1_OP_SETOF, 0, asn1_ContentInfo_tag_content_5 }
     652             : };
     653             : /* generate_template_type: CertificateSet */
     654             : const struct asn1_template asn1_CertificateSet[] = {
     655             : /* 0 */ { 0, sizeof(CertificateSet), ((void *)(uintptr_t)1) },
     656             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_CertificateSet_tag__9 }
     657             : };
     658             : 
     659             : int ASN1CALL
     660           0 : decode_CertificateSet(const unsigned char *p, size_t len, CertificateSet *data, size_t *size)
     661             : {
     662           0 :     memset(data, 0, sizeof(*data));
     663           0 :     return _asn1_decode_top(asn1_CertificateSet, 0|A1_PF_ALLOW_BER, p, len, data, size);
     664             : }
     665             : 
     666             : 
     667             : int ASN1CALL
     668           0 : encode_CertificateSet(unsigned char *p, size_t len, const CertificateSet *data, size_t *size)
     669             : {
     670           0 :     return _asn1_encode(asn1_CertificateSet, p, len, data, size);
     671             : }
     672             : 
     673             : 
     674             : size_t ASN1CALL
     675           0 : length_CertificateSet(const CertificateSet *data)
     676             : {
     677           0 :     return _asn1_length(asn1_CertificateSet, data);
     678             : }
     679             : 
     680             : 
     681             : void ASN1CALL
     682           0 : free_CertificateSet(CertificateSet *data)
     683             : {
     684           0 :     _asn1_free_top(asn1_CertificateSet, data);
     685           0 : }
     686             : 
     687             : 
     688             : int ASN1CALL
     689           0 : copy_CertificateSet(const CertificateSet *from, CertificateSet *to)
     690             : {
     691           0 :     return _asn1_copy_top(asn1_CertificateSet, from, to);
     692             : }
     693             : 
     694             : 
     695             : char * ASN1CALL
     696           0 : print_CertificateSet(const CertificateSet *data, int flags)
     697             : {
     698           0 :     return _asn1_print_top(asn1_CertificateSet, flags, data);
     699             : }
     700             : 
     701             : /* generate_template_type: CertificateList */
     702             : const struct asn1_template asn1_CertificateList[] = {
     703             : /* 0 */ { 0, sizeof(CertificateList), ((void *)(uintptr_t)1) },
     704             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_Certificate}
     705             : };
     706             : 
     707             : int ASN1CALL
     708           0 : decode_CertificateList(const unsigned char *p, size_t len, CertificateList *data, size_t *size)
     709             : {
     710           0 :     memset(data, 0, sizeof(*data));
     711           0 :     return _asn1_decode_top(asn1_CertificateList, 0|A1_PF_ALLOW_BER, p, len, data, size);
     712             : }
     713             : 
     714             : 
     715             : int ASN1CALL
     716           0 : encode_CertificateList(unsigned char *p, size_t len, const CertificateList *data, size_t *size)
     717             : {
     718           0 :     return _asn1_encode(asn1_CertificateList, p, len, data, size);
     719             : }
     720             : 
     721             : 
     722             : size_t ASN1CALL
     723           0 : length_CertificateList(const CertificateList *data)
     724             : {
     725           0 :     return _asn1_length(asn1_CertificateList, data);
     726             : }
     727             : 
     728             : 
     729             : void ASN1CALL
     730           0 : free_CertificateList(CertificateList *data)
     731             : {
     732           0 :     _asn1_free_top(asn1_CertificateList, data);
     733           0 : }
     734             : 
     735             : 
     736             : int ASN1CALL
     737           0 : copy_CertificateList(const CertificateList *from, CertificateList *to)
     738             : {
     739           0 :     return _asn1_copy_top(asn1_CertificateList, from, to);
     740             : }
     741             : 
     742             : 
     743             : char * ASN1CALL
     744           0 : print_CertificateList(const CertificateList *data, int flags)
     745             : {
     746           0 :     return _asn1_print_top(asn1_CertificateList, flags, data);
     747             : }
     748             : 
     749             : /* template_members: CertificateRevocationLists exp exp */
     750             : /* generate_template_type: CertificateList_seofTstruct_2 */
     751             : const struct asn1_template asn1_CertificateList_seofTstruct_2[] = {
     752             : /* 0 */ { 0, sizeof(CertificateList), ((void *)(uintptr_t)1) },
     753             : /* 1 */ { A1_OP_TYPE , 0, asn1_CertificateList }
     754             : };
     755             : /* generate_template_type: CertificateRevocationLists_tag__10 */
     756             : const struct asn1_template asn1_CertificateRevocationLists_tag__10[] = {
     757             : /* 0 */ { 0, sizeof(CertificateList), ((void *)(uintptr_t)1) },
     758             : /* 1 */ { A1_OP_SETOF, 0, asn1_CertificateList_seofTstruct_2 }
     759             : };
     760             : /* generate_template_type: CertificateRevocationLists */
     761             : const struct asn1_template asn1_CertificateRevocationLists[] = {
     762             : /* 0 */ { 0, sizeof(CertificateRevocationLists), ((void *)(uintptr_t)1) },
     763             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_CertificateRevocationLists_tag__10 }
     764             : };
     765             : 
     766             : int ASN1CALL
     767           0 : decode_CertificateRevocationLists(const unsigned char *p, size_t len, CertificateRevocationLists *data, size_t *size)
     768             : {
     769           0 :     memset(data, 0, sizeof(*data));
     770           0 :     return _asn1_decode_top(asn1_CertificateRevocationLists, 0|A1_PF_ALLOW_BER, p, len, data, size);
     771             : }
     772             : 
     773             : 
     774             : int ASN1CALL
     775           0 : encode_CertificateRevocationLists(unsigned char *p, size_t len, const CertificateRevocationLists *data, size_t *size)
     776             : {
     777           0 :     return _asn1_encode(asn1_CertificateRevocationLists, p, len, data, size);
     778             : }
     779             : 
     780             : 
     781             : size_t ASN1CALL
     782           0 : length_CertificateRevocationLists(const CertificateRevocationLists *data)
     783             : {
     784           0 :     return _asn1_length(asn1_CertificateRevocationLists, data);
     785             : }
     786             : 
     787             : 
     788             : void ASN1CALL
     789           0 : free_CertificateRevocationLists(CertificateRevocationLists *data)
     790             : {
     791           0 :     _asn1_free_top(asn1_CertificateRevocationLists, data);
     792           0 : }
     793             : 
     794             : 
     795             : int ASN1CALL
     796           0 : copy_CertificateRevocationLists(const CertificateRevocationLists *from, CertificateRevocationLists *to)
     797             : {
     798           0 :     return _asn1_copy_top(asn1_CertificateRevocationLists, from, to);
     799             : }
     800             : 
     801             : 
     802             : char * ASN1CALL
     803           0 : print_CertificateRevocationLists(const CertificateRevocationLists *data, int flags)
     804             : {
     805           0 :     return _asn1_print_top(asn1_CertificateRevocationLists, flags, data);
     806             : }
     807             : 
     808             : /* template_members: IssuerAndSerialNumber exp exp */
     809             : /* tsequence: members isstruct: 1 */
     810             : /* generate_template_type: IssuerAndSerialNumber_tag__11 */
     811             : const struct asn1_template asn1_IssuerAndSerialNumber_tag__11[] = {
     812             : /* 0 */ { 0, sizeof(struct IssuerAndSerialNumber), ((void *)(uintptr_t)5) },
     813             : /* 1 */ { A1_OP_TYPE_EXTERN , offsetof(struct IssuerAndSerialNumber, issuer), &asn1_extern_Name},
     814             : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct IssuerAndSerialNumber, serialNumber), &asn1_extern_CertificateSerialNumber},
     815             : /* 3 */ { A1_OP_NAME, 0, "IssuerAndSerialNumber" },
     816             : /* 4 */ { A1_OP_NAME, 0, "issuer" },
     817             : /* 5 */ { A1_OP_NAME, 0, "serialNumber" }
     818             : };
     819             : /* generate_template_type: IssuerAndSerialNumber */
     820             : const struct asn1_template asn1_IssuerAndSerialNumber[] = {
     821             : /* 0 */ { 0, sizeof(IssuerAndSerialNumber), ((void *)(uintptr_t)1) },
     822             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_IssuerAndSerialNumber_tag__11 }
     823             : };
     824             : 
     825             : int ASN1CALL
     826          15 : decode_IssuerAndSerialNumber(const unsigned char *p, size_t len, IssuerAndSerialNumber *data, size_t *size)
     827             : {
     828          15 :     memset(data, 0, sizeof(*data));
     829          15 :     return _asn1_decode_top(asn1_IssuerAndSerialNumber, 0|A1_PF_ALLOW_BER, p, len, data, size);
     830             : }
     831             : 
     832             : 
     833             : int ASN1CALL
     834         121 : encode_IssuerAndSerialNumber(unsigned char *p, size_t len, const IssuerAndSerialNumber *data, size_t *size)
     835             : {
     836         121 :     return _asn1_encode(asn1_IssuerAndSerialNumber, p, len, data, size);
     837             : }
     838             : 
     839             : 
     840             : size_t ASN1CALL
     841         121 : length_IssuerAndSerialNumber(const IssuerAndSerialNumber *data)
     842             : {
     843         121 :     return _asn1_length(asn1_IssuerAndSerialNumber, data);
     844             : }
     845             : 
     846             : 
     847             : void ASN1CALL
     848         136 : free_IssuerAndSerialNumber(IssuerAndSerialNumber *data)
     849             : {
     850         136 :     _asn1_free_top(asn1_IssuerAndSerialNumber, data);
     851         136 : }
     852             : 
     853             : 
     854             : int ASN1CALL
     855           0 : copy_IssuerAndSerialNumber(const IssuerAndSerialNumber *from, IssuerAndSerialNumber *to)
     856             : {
     857           0 :     return _asn1_copy_top(asn1_IssuerAndSerialNumber, from, to);
     858             : }
     859             : 
     860             : 
     861             : char * ASN1CALL
     862           0 : print_IssuerAndSerialNumber(const IssuerAndSerialNumber *data, int flags)
     863             : {
     864           0 :     return _asn1_print_top(asn1_IssuerAndSerialNumber, flags, data);
     865             : }
     866             : 
     867             : /* generate_template_type: CMSIdentifier_choice_issuerAndSerialNumber */
     868             : const struct asn1_template asn1_CMSIdentifier_choice_issuerAndSerialNumber[] = {
     869             : /* 0 */ { 0, sizeof(IssuerAndSerialNumber), ((void *)(uintptr_t)1) },
     870             : /* 1 */ { A1_OP_TYPE , 0, asn1_IssuerAndSerialNumber }
     871             : };
     872             : /* template_members: SubjectKeyIdentifier exp exp */
     873             : /* generate_template_type: SubjectKeyIdentifier_tag__12 */
     874             : const struct asn1_template asn1_SubjectKeyIdentifier_tag__12[] = {
     875             : /* 0 */ { 0, sizeof(SubjectKeyIdentifier), ((void *)(uintptr_t)1) },
     876             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_SubjectKeyIdentifier}
     877             : };
     878             : /* generate_template_type: CMSIdentifier_choice_subjectKeyIdentifier */
     879             : const struct asn1_template asn1_CMSIdentifier_choice_subjectKeyIdentifier[] = {
     880             : /* 0 */ { 0, sizeof(SubjectKeyIdentifier), ((void *)(uintptr_t)1) },
     881             : /* 1 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0), 0, asn1_SubjectKeyIdentifier_tag__12 }
     882             : };
     883             : static const struct asn1_template asn1_choice_CMSIdentifier_0[] = {
     884             : /* 0 */ { 0, offsetof(CMSIdentifier, element), ((void *)(uintptr_t)4) },
     885             : /* 1 */ { choice_CMSIdentifier_issuerAndSerialNumber, offsetof(CMSIdentifier, u.issuerAndSerialNumber), asn1_CMSIdentifier_choice_issuerAndSerialNumber },
     886             : /* 2 */ { choice_CMSIdentifier_subjectKeyIdentifier, offsetof(CMSIdentifier, u.subjectKeyIdentifier), asn1_CMSIdentifier_choice_subjectKeyIdentifier },
     887             : /* 3 */ { 0, 0, "issuerAndSerialNumber" },
     888             : /* 4 */ { 0, 0, "subjectKeyIdentifier" }
     889             : };
     890             : /* generate_template_type: CMSIdentifier */
     891             : const struct asn1_template asn1_CMSIdentifier[] = {
     892             : /* 0 */ { 0, sizeof(CMSIdentifier), ((void *)(uintptr_t)1) },
     893             : /* 1 */ { A1_OP_CHOICE, 0, asn1_choice_CMSIdentifier_0 }
     894             : };
     895             : 
     896             : int ASN1CALL
     897           0 : decode_CMSIdentifier(const unsigned char *p, size_t len, CMSIdentifier *data, size_t *size)
     898             : {
     899           0 :     memset(data, 0, sizeof(*data));
     900           0 :     return _asn1_decode_top(asn1_CMSIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
     901             : }
     902             : 
     903             : 
     904             : int ASN1CALL
     905           0 : encode_CMSIdentifier(unsigned char *p, size_t len, const CMSIdentifier *data, size_t *size)
     906             : {
     907           0 :     return _asn1_encode(asn1_CMSIdentifier, p, len, data, size);
     908             : }
     909             : 
     910             : 
     911             : size_t ASN1CALL
     912           0 : length_CMSIdentifier(const CMSIdentifier *data)
     913             : {
     914           0 :     return _asn1_length(asn1_CMSIdentifier, data);
     915             : }
     916             : 
     917             : 
     918             : void ASN1CALL
     919           0 : free_CMSIdentifier(CMSIdentifier *data)
     920             : {
     921           0 :     _asn1_free_top(asn1_CMSIdentifier, data);
     922           0 : }
     923             : 
     924             : 
     925             : int ASN1CALL
     926           0 : copy_CMSIdentifier(const CMSIdentifier *from, CMSIdentifier *to)
     927             : {
     928           0 :     return _asn1_copy_top(asn1_CMSIdentifier, from, to);
     929             : }
     930             : 
     931             : 
     932             : char * ASN1CALL
     933           0 : print_CMSIdentifier(const CMSIdentifier *data, int flags)
     934             : {
     935           0 :     return _asn1_print_top(asn1_CMSIdentifier, flags, data);
     936             : }
     937             : 
     938             : /* generate_template_type: SignerIdentifier */
     939             : const struct asn1_template asn1_SignerIdentifier[] = {
     940             : /* 0 */ { 0, sizeof(SignerIdentifier), ((void *)(uintptr_t)1) },
     941             : /* 1 */ { A1_OP_TYPE , 0, asn1_CMSIdentifier }
     942             : };
     943             : 
     944             : int ASN1CALL
     945           0 : decode_SignerIdentifier(const unsigned char *p, size_t len, SignerIdentifier *data, size_t *size)
     946             : {
     947           0 :     memset(data, 0, sizeof(*data));
     948           0 :     return _asn1_decode_top(asn1_SignerIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
     949             : }
     950             : 
     951             : 
     952             : int ASN1CALL
     953           0 : encode_SignerIdentifier(unsigned char *p, size_t len, const SignerIdentifier *data, size_t *size)
     954             : {
     955           0 :     return _asn1_encode(asn1_SignerIdentifier, p, len, data, size);
     956             : }
     957             : 
     958             : 
     959             : size_t ASN1CALL
     960           0 : length_SignerIdentifier(const SignerIdentifier *data)
     961             : {
     962           0 :     return _asn1_length(asn1_SignerIdentifier, data);
     963             : }
     964             : 
     965             : 
     966             : void ASN1CALL
     967           0 : free_SignerIdentifier(SignerIdentifier *data)
     968             : {
     969           0 :     _asn1_free_top(asn1_SignerIdentifier, data);
     970           0 : }
     971             : 
     972             : 
     973             : int ASN1CALL
     974           0 : copy_SignerIdentifier(const SignerIdentifier *from, SignerIdentifier *to)
     975             : {
     976           0 :     return _asn1_copy_top(asn1_SignerIdentifier, from, to);
     977             : }
     978             : 
     979             : 
     980             : char * ASN1CALL
     981           0 : print_SignerIdentifier(const SignerIdentifier *data, int flags)
     982             : {
     983           0 :     return _asn1_print_top(asn1_SignerIdentifier, flags, data);
     984             : }
     985             : 
     986             : /* generate_template_type: RecipientIdentifier */
     987             : const struct asn1_template asn1_RecipientIdentifier[] = {
     988             : /* 0 */ { 0, sizeof(RecipientIdentifier), ((void *)(uintptr_t)1) },
     989             : /* 1 */ { A1_OP_TYPE , 0, asn1_CMSIdentifier }
     990             : };
     991             : 
     992             : int ASN1CALL
     993           0 : decode_RecipientIdentifier(const unsigned char *p, size_t len, RecipientIdentifier *data, size_t *size)
     994             : {
     995           0 :     memset(data, 0, sizeof(*data));
     996           0 :     return _asn1_decode_top(asn1_RecipientIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
     997             : }
     998             : 
     999             : 
    1000             : int ASN1CALL
    1001           0 : encode_RecipientIdentifier(unsigned char *p, size_t len, const RecipientIdentifier *data, size_t *size)
    1002             : {
    1003           0 :     return _asn1_encode(asn1_RecipientIdentifier, p, len, data, size);
    1004             : }
    1005             : 
    1006             : 
    1007             : size_t ASN1CALL
    1008           0 : length_RecipientIdentifier(const RecipientIdentifier *data)
    1009             : {
    1010           0 :     return _asn1_length(asn1_RecipientIdentifier, data);
    1011             : }
    1012             : 
    1013             : 
    1014             : void ASN1CALL
    1015           0 : free_RecipientIdentifier(RecipientIdentifier *data)
    1016             : {
    1017           0 :     _asn1_free_top(asn1_RecipientIdentifier, data);
    1018           0 : }
    1019             : 
    1020             : 
    1021             : int ASN1CALL
    1022           0 : copy_RecipientIdentifier(const RecipientIdentifier *from, RecipientIdentifier *to)
    1023             : {
    1024           0 :     return _asn1_copy_top(asn1_RecipientIdentifier, from, to);
    1025             : }
    1026             : 
    1027             : 
    1028             : char * ASN1CALL
    1029           0 : print_RecipientIdentifier(const RecipientIdentifier *data, int flags)
    1030             : {
    1031           0 :     return _asn1_print_top(asn1_RecipientIdentifier, flags, data);
    1032             : }
    1033             : 
    1034             : /* template_members: CMSAttributes exp exp */
    1035             : /* generate_template_type: Attribute_seofTstruct_3 */
    1036             : const struct asn1_template asn1_Attribute_seofTstruct_3[] = {
    1037             : /* 0 */ { 0, sizeof(Attribute), ((void *)(uintptr_t)1) },
    1038             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_Attribute}
    1039             : };
    1040             : /* generate_template_type: CMSAttributes_tag__13 */
    1041             : const struct asn1_template asn1_CMSAttributes_tag__13[] = {
    1042             : /* 0 */ { 0, sizeof(Attribute), ((void *)(uintptr_t)1) },
    1043             : /* 1 */ { A1_OP_SETOF, 0, asn1_Attribute_seofTstruct_3 }
    1044             : };
    1045             : /* generate_template_type: CMSAttributes */
    1046             : const struct asn1_template asn1_CMSAttributes[] = {
    1047             : /* 0 */ { 0, sizeof(CMSAttributes), ((void *)(uintptr_t)1) },
    1048             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_CMSAttributes_tag__13 }
    1049             : };
    1050             : 
    1051             : int ASN1CALL
    1052           0 : decode_CMSAttributes(const unsigned char *p, size_t len, CMSAttributes *data, size_t *size)
    1053             : {
    1054           0 :     memset(data, 0, sizeof(*data));
    1055           0 :     return _asn1_decode_top(asn1_CMSAttributes, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1056             : }
    1057             : 
    1058             : 
    1059             : int ASN1CALL
    1060          85 : encode_CMSAttributes(unsigned char *p, size_t len, const CMSAttributes *data, size_t *size)
    1061             : {
    1062          85 :     return _asn1_encode(asn1_CMSAttributes, p, len, data, size);
    1063             : }
    1064             : 
    1065             : 
    1066             : size_t ASN1CALL
    1067          85 : length_CMSAttributes(const CMSAttributes *data)
    1068             : {
    1069          85 :     return _asn1_length(asn1_CMSAttributes, data);
    1070             : }
    1071             : 
    1072             : 
    1073             : void ASN1CALL
    1074           0 : free_CMSAttributes(CMSAttributes *data)
    1075             : {
    1076           0 :     _asn1_free_top(asn1_CMSAttributes, data);
    1077           0 : }
    1078             : 
    1079             : 
    1080             : int ASN1CALL
    1081           0 : copy_CMSAttributes(const CMSAttributes *from, CMSAttributes *to)
    1082             : {
    1083           0 :     return _asn1_copy_top(asn1_CMSAttributes, from, to);
    1084             : }
    1085             : 
    1086             : 
    1087             : char * ASN1CALL
    1088           0 : print_CMSAttributes(const CMSAttributes *data, int flags)
    1089             : {
    1090           0 :     return _asn1_print_top(asn1_CMSAttributes, flags, data);
    1091             : }
    1092             : 
    1093             : /* template_members: SignatureValue exp exp */
    1094             : /* generate_template_type: SignatureValue_tag__14 */
    1095             : /* generate_template_type: SignatureValue */
    1096             : const struct asn1_template asn1_SignatureValue[] = {
    1097             : /* 0 */ { 0, sizeof(SignatureValue), ((void *)(uintptr_t)1) },
    1098             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_MessageDigest_tag__3 }
    1099             : };
    1100             : 
    1101             : int ASN1CALL
    1102           0 : decode_SignatureValue(const unsigned char *p, size_t len, SignatureValue *data, size_t *size)
    1103             : {
    1104           0 :     memset(data, 0, sizeof(*data));
    1105           0 :     return _asn1_decode_top(asn1_SignatureValue, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1106             : }
    1107             : 
    1108             : 
    1109             : int ASN1CALL
    1110           0 : encode_SignatureValue(unsigned char *p, size_t len, const SignatureValue *data, size_t *size)
    1111             : {
    1112           0 :     return _asn1_encode(asn1_SignatureValue, p, len, data, size);
    1113             : }
    1114             : 
    1115             : 
    1116             : size_t ASN1CALL
    1117           0 : length_SignatureValue(const SignatureValue *data)
    1118             : {
    1119           0 :     return _asn1_length(asn1_SignatureValue, data);
    1120             : }
    1121             : 
    1122             : 
    1123             : void ASN1CALL
    1124           0 : free_SignatureValue(SignatureValue *data)
    1125             : {
    1126           0 :     _asn1_free_top(asn1_SignatureValue, data);
    1127           0 : }
    1128             : 
    1129             : 
    1130             : int ASN1CALL
    1131           0 : copy_SignatureValue(const SignatureValue *from, SignatureValue *to)
    1132             : {
    1133           0 :     return _asn1_copy_top(asn1_SignatureValue, from, to);
    1134             : }
    1135             : 
    1136             : 
    1137             : char * ASN1CALL
    1138           0 : print_SignatureValue(const SignatureValue *data, int flags)
    1139             : {
    1140           0 :     return _asn1_print_top(asn1_SignatureValue, flags, data);
    1141             : }
    1142             : 
    1143             : /* template_members: SignerInfo exp exp */
    1144             : /* tsequence: members isstruct: 1 */
    1145             : /* template_members: SignerInfo exp imp */
    1146             : /* generate_template_type: SignerInfo_tag_signedAttrs_16 */
    1147             : const struct asn1_template asn1_SignerInfo_tag_signedAttrs_16[] = {
    1148             : /* 0 */ { 0, sizeof(CMSAttributes), ((void *)(uintptr_t)1) },
    1149             : /* 1 */ { A1_OP_TYPE , 0, asn1_CMSAttributes }
    1150             : };
    1151             : /* template_members: SignerInfo exp imp */
    1152             : /* generate_template_type: SignerInfo_tag_unsignedAttrs_17 */
    1153             : /* generate_template_type: SignerInfo_tag__15 */
    1154             : const struct asn1_template asn1_SignerInfo_tag__15[] = {
    1155             : /* 0 */ { 0, sizeof(struct SignerInfo), ((void *)(uintptr_t)15) },
    1156             : /* 1 */ { A1_OP_TYPE , offsetof(struct SignerInfo, version), asn1_CMSVersion },
    1157             : /* 2 */ { A1_OP_TYPE , offsetof(struct SignerInfo, sid), asn1_SignerIdentifier },
    1158             : /* 3 */ { A1_OP_TYPE , offsetof(struct SignerInfo, digestAlgorithm), asn1_DigestAlgorithmIdentifier },
    1159             : /* 4 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct SignerInfo, signedAttrs), asn1_SignerInfo_tag_signedAttrs_16 },
    1160             : /* 5 */ { A1_OP_TYPE , offsetof(struct SignerInfo, signatureAlgorithm), asn1_SignatureAlgorithmIdentifier },
    1161             : /* 6 */ { A1_OP_TYPE , offsetof(struct SignerInfo, signature), asn1_SignatureValue },
    1162             : /* 7 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,1)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct SignerInfo, unsignedAttrs), asn1_SignerInfo_tag_signedAttrs_16 },
    1163             : /* 8 */ { A1_OP_NAME, 0, "SignerInfo" },
    1164             : /* 9 */ { A1_OP_NAME, 0, "version" },
    1165             : /* 10 */ { A1_OP_NAME, 0, "sid" },
    1166             : /* 11 */ { A1_OP_NAME, 0, "digestAlgorithm" },
    1167             : /* 12 */ { A1_OP_NAME, 0, "signedAttrs" },
    1168             : /* 13 */ { A1_OP_NAME, 0, "signatureAlgorithm" },
    1169             : /* 14 */ { A1_OP_NAME, 0, "signature" },
    1170             : /* 15 */ { A1_OP_NAME, 0, "unsignedAttrs" }
    1171             : };
    1172             : /* generate_template_type: SignerInfo */
    1173             : const struct asn1_template asn1_SignerInfo[] = {
    1174             : /* 0 */ { 0, sizeof(SignerInfo), ((void *)(uintptr_t)1) },
    1175             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_SignerInfo_tag__15 }
    1176             : };
    1177             : 
    1178             : int ASN1CALL
    1179           0 : decode_SignerInfo(const unsigned char *p, size_t len, SignerInfo *data, size_t *size)
    1180             : {
    1181           0 :     memset(data, 0, sizeof(*data));
    1182           0 :     return _asn1_decode_top(asn1_SignerInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1183             : }
    1184             : 
    1185             : 
    1186             : int ASN1CALL
    1187           0 : encode_SignerInfo(unsigned char *p, size_t len, const SignerInfo *data, size_t *size)
    1188             : {
    1189           0 :     return _asn1_encode(asn1_SignerInfo, p, len, data, size);
    1190             : }
    1191             : 
    1192             : 
    1193             : size_t ASN1CALL
    1194           0 : length_SignerInfo(const SignerInfo *data)
    1195             : {
    1196           0 :     return _asn1_length(asn1_SignerInfo, data);
    1197             : }
    1198             : 
    1199             : 
    1200             : void ASN1CALL
    1201           0 : free_SignerInfo(SignerInfo *data)
    1202             : {
    1203           0 :     _asn1_free_top(asn1_SignerInfo, data);
    1204           0 : }
    1205             : 
    1206             : 
    1207             : int ASN1CALL
    1208           0 : copy_SignerInfo(const SignerInfo *from, SignerInfo *to)
    1209             : {
    1210           0 :     return _asn1_copy_top(asn1_SignerInfo, from, to);
    1211             : }
    1212             : 
    1213             : 
    1214             : char * ASN1CALL
    1215           0 : print_SignerInfo(const SignerInfo *data, int flags)
    1216             : {
    1217           0 :     return _asn1_print_top(asn1_SignerInfo, flags, data);
    1218             : }
    1219             : 
    1220             : /* template_members: SignerInfos exp exp */
    1221             : /* generate_template_type: SignerInfo_seofTstruct_4 */
    1222             : const struct asn1_template asn1_SignerInfo_seofTstruct_4[] = {
    1223             : /* 0 */ { 0, sizeof(SignerInfo), ((void *)(uintptr_t)1) },
    1224             : /* 1 */ { A1_OP_TYPE , 0, asn1_SignerInfo }
    1225             : };
    1226             : /* generate_template_type: SignerInfos_tag__18 */
    1227             : const struct asn1_template asn1_SignerInfos_tag__18[] = {
    1228             : /* 0 */ { 0, sizeof(SignerInfo), ((void *)(uintptr_t)1) },
    1229             : /* 1 */ { A1_OP_SETOF, 0, asn1_SignerInfo_seofTstruct_4 }
    1230             : };
    1231             : /* generate_template_type: SignerInfos */
    1232             : const struct asn1_template asn1_SignerInfos[] = {
    1233             : /* 0 */ { 0, sizeof(SignerInfos), ((void *)(uintptr_t)1) },
    1234             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_SignerInfos_tag__18 }
    1235             : };
    1236             : 
    1237             : int ASN1CALL
    1238           0 : decode_SignerInfos(const unsigned char *p, size_t len, SignerInfos *data, size_t *size)
    1239             : {
    1240           0 :     memset(data, 0, sizeof(*data));
    1241           0 :     return _asn1_decode_top(asn1_SignerInfos, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1242             : }
    1243             : 
    1244             : 
    1245             : int ASN1CALL
    1246           0 : encode_SignerInfos(unsigned char *p, size_t len, const SignerInfos *data, size_t *size)
    1247             : {
    1248           0 :     return _asn1_encode(asn1_SignerInfos, p, len, data, size);
    1249             : }
    1250             : 
    1251             : 
    1252             : size_t ASN1CALL
    1253           0 : length_SignerInfos(const SignerInfos *data)
    1254             : {
    1255           0 :     return _asn1_length(asn1_SignerInfos, data);
    1256             : }
    1257             : 
    1258             : 
    1259             : void ASN1CALL
    1260           0 : free_SignerInfos(SignerInfos *data)
    1261             : {
    1262           0 :     _asn1_free_top(asn1_SignerInfos, data);
    1263           0 : }
    1264             : 
    1265             : 
    1266             : int ASN1CALL
    1267           0 : copy_SignerInfos(const SignerInfos *from, SignerInfos *to)
    1268             : {
    1269           0 :     return _asn1_copy_top(asn1_SignerInfos, from, to);
    1270             : }
    1271             : 
    1272             : 
    1273             : char * ASN1CALL
    1274           0 : print_SignerInfos(const SignerInfos *data, int flags)
    1275             : {
    1276           0 :     return _asn1_print_top(asn1_SignerInfos, flags, data);
    1277             : }
    1278             : 
    1279             : /* template_members: SignedData exp exp */
    1280             : /* tsequence: members isstruct: 1 */
    1281             : /* template_members: SignedData exp imp */
    1282             : /* generate_template_type: SignedData_tag_certificates_20 */
    1283             : const struct asn1_template asn1_SignedData_tag_certificates_20[] = {
    1284             : /* 0 */ { 0, sizeof(CertificateSet), ((void *)(uintptr_t)1) },
    1285             : /* 1 */ { A1_OP_TYPE , 0, asn1_CertificateSet }
    1286             : };
    1287             : /* template_members: SignedData exp imp */
    1288             : /* generate_template_type: SignedData_tag_crls_21 */
    1289             : const struct asn1_template asn1_SignedData_tag_crls_21[] = {
    1290             : /* 0 */ { 0, sizeof(CertificateRevocationLists), ((void *)(uintptr_t)1) },
    1291             : /* 1 */ { A1_OP_TYPE , 0, asn1_CertificateRevocationLists }
    1292             : };
    1293             : /* generate_template_type: SignedData_tag__19 */
    1294             : const struct asn1_template asn1_SignedData_tag__19[] = {
    1295             : /* 0 */ { 0, sizeof(struct SignedData), ((void *)(uintptr_t)13) },
    1296             : /* 1 */ { A1_OP_TYPE , offsetof(struct SignedData, version), asn1_CMSVersion },
    1297             : /* 2 */ { A1_OP_TYPE , offsetof(struct SignedData, digestAlgorithms), asn1_DigestAlgorithmIdentifiers },
    1298             : /* 3 */ { A1_OP_TYPE , offsetof(struct SignedData, encapContentInfo), asn1_EncapsulatedContentInfo },
    1299             : /* 4 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct SignedData, certificates), asn1_SignedData_tag_certificates_20 },
    1300             : /* 5 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,1)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct SignedData, crls), asn1_SignedData_tag_crls_21 },
    1301             : /* 6 */ { A1_OP_TYPE , offsetof(struct SignedData, signerInfos), asn1_SignerInfos },
    1302             : /* 7 */ { A1_OP_NAME, 0, "SignedData" },
    1303             : /* 8 */ { A1_OP_NAME, 0, "version" },
    1304             : /* 9 */ { A1_OP_NAME, 0, "digestAlgorithms" },
    1305             : /* 10 */ { A1_OP_NAME, 0, "encapContentInfo" },
    1306             : /* 11 */ { A1_OP_NAME, 0, "certificates" },
    1307             : /* 12 */ { A1_OP_NAME, 0, "crls" },
    1308             : /* 13 */ { A1_OP_NAME, 0, "signerInfos" }
    1309             : };
    1310             : /* generate_template_type: SignedData */
    1311             : const struct asn1_template asn1_SignedData[] = {
    1312             : /* 0 */ { 0, sizeof(SignedData), ((void *)(uintptr_t)1) },
    1313             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_SignedData_tag__19 }
    1314             : };
    1315             : 
    1316             : int ASN1CALL
    1317          70 : decode_SignedData(const unsigned char *p, size_t len, SignedData *data, size_t *size)
    1318             : {
    1319          70 :     memset(data, 0, sizeof(*data));
    1320          70 :     return _asn1_decode_top(asn1_SignedData, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1321             : }
    1322             : 
    1323             : 
    1324             : int ASN1CALL
    1325         165 : encode_SignedData(unsigned char *p, size_t len, const SignedData *data, size_t *size)
    1326             : {
    1327         165 :     return _asn1_encode(asn1_SignedData, p, len, data, size);
    1328             : }
    1329             : 
    1330             : 
    1331             : size_t ASN1CALL
    1332         165 : length_SignedData(const SignedData *data)
    1333             : {
    1334         165 :     return _asn1_length(asn1_SignedData, data);
    1335             : }
    1336             : 
    1337             : 
    1338             : void ASN1CALL
    1339         235 : free_SignedData(SignedData *data)
    1340             : {
    1341         235 :     _asn1_free_top(asn1_SignedData, data);
    1342         235 : }
    1343             : 
    1344             : 
    1345             : int ASN1CALL
    1346           0 : copy_SignedData(const SignedData *from, SignedData *to)
    1347             : {
    1348           0 :     return _asn1_copy_top(asn1_SignedData, from, to);
    1349             : }
    1350             : 
    1351             : 
    1352             : char * ASN1CALL
    1353           0 : print_SignedData(const SignedData *data, int flags)
    1354             : {
    1355           0 :     return _asn1_print_top(asn1_SignedData, flags, data);
    1356             : }
    1357             : 
    1358             : /* template_members: OriginatorInfo exp exp */
    1359             : /* tsequence: members isstruct: 1 */
    1360             : /* template_members: OriginatorInfo exp imp */
    1361             : /* generate_template_type: OriginatorInfo_tag_certs_23 */
    1362             : /* template_members: OriginatorInfo exp imp */
    1363             : /* generate_template_type: OriginatorInfo_tag_crls_24 */
    1364             : /* generate_template_type: OriginatorInfo_tag__22 */
    1365             : const struct asn1_template asn1_OriginatorInfo_tag__22[] = {
    1366             : /* 0 */ { 0, sizeof(struct OriginatorInfo), ((void *)(uintptr_t)5) },
    1367             : /* 1 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct OriginatorInfo, certs), asn1_SignedData_tag_certificates_20 },
    1368             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,1)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct OriginatorInfo, crls), asn1_SignedData_tag_crls_21 },
    1369             : /* 3 */ { A1_OP_NAME, 0, "OriginatorInfo" },
    1370             : /* 4 */ { A1_OP_NAME, 0, "certs" },
    1371             : /* 5 */ { A1_OP_NAME, 0, "crls" }
    1372             : };
    1373             : /* generate_template_type: OriginatorInfo */
    1374             : const struct asn1_template asn1_OriginatorInfo[] = {
    1375             : /* 0 */ { 0, sizeof(OriginatorInfo), ((void *)(uintptr_t)1) },
    1376             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_OriginatorInfo_tag__22 }
    1377             : };
    1378             : 
    1379             : int ASN1CALL
    1380           0 : decode_OriginatorInfo(const unsigned char *p, size_t len, OriginatorInfo *data, size_t *size)
    1381             : {
    1382           0 :     memset(data, 0, sizeof(*data));
    1383           0 :     return _asn1_decode_top(asn1_OriginatorInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1384             : }
    1385             : 
    1386             : 
    1387             : int ASN1CALL
    1388           0 : encode_OriginatorInfo(unsigned char *p, size_t len, const OriginatorInfo *data, size_t *size)
    1389             : {
    1390           0 :     return _asn1_encode(asn1_OriginatorInfo, p, len, data, size);
    1391             : }
    1392             : 
    1393             : 
    1394             : size_t ASN1CALL
    1395           0 : length_OriginatorInfo(const OriginatorInfo *data)
    1396             : {
    1397           0 :     return _asn1_length(asn1_OriginatorInfo, data);
    1398             : }
    1399             : 
    1400             : 
    1401             : void ASN1CALL
    1402           0 : free_OriginatorInfo(OriginatorInfo *data)
    1403             : {
    1404           0 :     _asn1_free_top(asn1_OriginatorInfo, data);
    1405           0 : }
    1406             : 
    1407             : 
    1408             : int ASN1CALL
    1409           0 : copy_OriginatorInfo(const OriginatorInfo *from, OriginatorInfo *to)
    1410             : {
    1411           0 :     return _asn1_copy_top(asn1_OriginatorInfo, from, to);
    1412             : }
    1413             : 
    1414             : 
    1415             : char * ASN1CALL
    1416           0 : print_OriginatorInfo(const OriginatorInfo *data, int flags)
    1417             : {
    1418           0 :     return _asn1_print_top(asn1_OriginatorInfo, flags, data);
    1419             : }
    1420             : 
    1421             : /* generate_template_type: KeyEncryptionAlgorithmIdentifier */
    1422             : const struct asn1_template asn1_KeyEncryptionAlgorithmIdentifier[] = {
    1423             : /* 0 */ { 0, sizeof(KeyEncryptionAlgorithmIdentifier), ((void *)(uintptr_t)1) },
    1424             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_AlgorithmIdentifier}
    1425             : };
    1426             : 
    1427             : int ASN1CALL
    1428           0 : decode_KeyEncryptionAlgorithmIdentifier(const unsigned char *p, size_t len, KeyEncryptionAlgorithmIdentifier *data, size_t *size)
    1429             : {
    1430           0 :     memset(data, 0, sizeof(*data));
    1431           0 :     return _asn1_decode_top(asn1_KeyEncryptionAlgorithmIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1432             : }
    1433             : 
    1434             : 
    1435             : int ASN1CALL
    1436           0 : encode_KeyEncryptionAlgorithmIdentifier(unsigned char *p, size_t len, const KeyEncryptionAlgorithmIdentifier *data, size_t *size)
    1437             : {
    1438           0 :     return _asn1_encode(asn1_KeyEncryptionAlgorithmIdentifier, p, len, data, size);
    1439             : }
    1440             : 
    1441             : 
    1442             : size_t ASN1CALL
    1443           0 : length_KeyEncryptionAlgorithmIdentifier(const KeyEncryptionAlgorithmIdentifier *data)
    1444             : {
    1445           0 :     return _asn1_length(asn1_KeyEncryptionAlgorithmIdentifier, data);
    1446             : }
    1447             : 
    1448             : 
    1449             : void ASN1CALL
    1450           0 : free_KeyEncryptionAlgorithmIdentifier(KeyEncryptionAlgorithmIdentifier *data)
    1451             : {
    1452           0 :     _asn1_free_top(asn1_KeyEncryptionAlgorithmIdentifier, data);
    1453           0 : }
    1454             : 
    1455             : 
    1456             : int ASN1CALL
    1457           0 : copy_KeyEncryptionAlgorithmIdentifier(const KeyEncryptionAlgorithmIdentifier *from, KeyEncryptionAlgorithmIdentifier *to)
    1458             : {
    1459           0 :     return _asn1_copy_top(asn1_KeyEncryptionAlgorithmIdentifier, from, to);
    1460             : }
    1461             : 
    1462             : 
    1463             : char * ASN1CALL
    1464           0 : print_KeyEncryptionAlgorithmIdentifier(const KeyEncryptionAlgorithmIdentifier *data, int flags)
    1465             : {
    1466           0 :     return _asn1_print_top(asn1_KeyEncryptionAlgorithmIdentifier, flags, data);
    1467             : }
    1468             : 
    1469             : /* generate_template_type: ContentEncryptionAlgorithmIdentifier */
    1470             : const struct asn1_template asn1_ContentEncryptionAlgorithmIdentifier[] = {
    1471             : /* 0 */ { 0, sizeof(ContentEncryptionAlgorithmIdentifier), ((void *)(uintptr_t)1) },
    1472             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_AlgorithmIdentifier}
    1473             : };
    1474             : 
    1475             : int ASN1CALL
    1476           0 : decode_ContentEncryptionAlgorithmIdentifier(const unsigned char *p, size_t len, ContentEncryptionAlgorithmIdentifier *data, size_t *size)
    1477             : {
    1478           0 :     memset(data, 0, sizeof(*data));
    1479           0 :     return _asn1_decode_top(asn1_ContentEncryptionAlgorithmIdentifier, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1480             : }
    1481             : 
    1482             : 
    1483             : int ASN1CALL
    1484           0 : encode_ContentEncryptionAlgorithmIdentifier(unsigned char *p, size_t len, const ContentEncryptionAlgorithmIdentifier *data, size_t *size)
    1485             : {
    1486           0 :     return _asn1_encode(asn1_ContentEncryptionAlgorithmIdentifier, p, len, data, size);
    1487             : }
    1488             : 
    1489             : 
    1490             : size_t ASN1CALL
    1491           0 : length_ContentEncryptionAlgorithmIdentifier(const ContentEncryptionAlgorithmIdentifier *data)
    1492             : {
    1493           0 :     return _asn1_length(asn1_ContentEncryptionAlgorithmIdentifier, data);
    1494             : }
    1495             : 
    1496             : 
    1497             : void ASN1CALL
    1498           0 : free_ContentEncryptionAlgorithmIdentifier(ContentEncryptionAlgorithmIdentifier *data)
    1499             : {
    1500           0 :     _asn1_free_top(asn1_ContentEncryptionAlgorithmIdentifier, data);
    1501           0 : }
    1502             : 
    1503             : 
    1504             : int ASN1CALL
    1505           0 : copy_ContentEncryptionAlgorithmIdentifier(const ContentEncryptionAlgorithmIdentifier *from, ContentEncryptionAlgorithmIdentifier *to)
    1506             : {
    1507           0 :     return _asn1_copy_top(asn1_ContentEncryptionAlgorithmIdentifier, from, to);
    1508             : }
    1509             : 
    1510             : 
    1511             : char * ASN1CALL
    1512           0 : print_ContentEncryptionAlgorithmIdentifier(const ContentEncryptionAlgorithmIdentifier *data, int flags)
    1513             : {
    1514           0 :     return _asn1_print_top(asn1_ContentEncryptionAlgorithmIdentifier, flags, data);
    1515             : }
    1516             : 
    1517             : /* template_members: EncryptedKey exp exp */
    1518             : /* generate_template_type: EncryptedKey_tag__25 */
    1519             : /* generate_template_type: EncryptedKey */
    1520             : const struct asn1_template asn1_EncryptedKey[] = {
    1521             : /* 0 */ { 0, sizeof(EncryptedKey), ((void *)(uintptr_t)1) },
    1522             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_MessageDigest_tag__3 }
    1523             : };
    1524             : 
    1525             : int ASN1CALL
    1526           0 : decode_EncryptedKey(const unsigned char *p, size_t len, EncryptedKey *data, size_t *size)
    1527             : {
    1528           0 :     memset(data, 0, sizeof(*data));
    1529           0 :     return _asn1_decode_top(asn1_EncryptedKey, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1530             : }
    1531             : 
    1532             : 
    1533             : int ASN1CALL
    1534           0 : encode_EncryptedKey(unsigned char *p, size_t len, const EncryptedKey *data, size_t *size)
    1535             : {
    1536           0 :     return _asn1_encode(asn1_EncryptedKey, p, len, data, size);
    1537             : }
    1538             : 
    1539             : 
    1540             : size_t ASN1CALL
    1541           0 : length_EncryptedKey(const EncryptedKey *data)
    1542             : {
    1543           0 :     return _asn1_length(asn1_EncryptedKey, data);
    1544             : }
    1545             : 
    1546             : 
    1547             : void ASN1CALL
    1548           0 : free_EncryptedKey(EncryptedKey *data)
    1549             : {
    1550           0 :     _asn1_free_top(asn1_EncryptedKey, data);
    1551           0 : }
    1552             : 
    1553             : 
    1554             : int ASN1CALL
    1555           0 : copy_EncryptedKey(const EncryptedKey *from, EncryptedKey *to)
    1556             : {
    1557           0 :     return _asn1_copy_top(asn1_EncryptedKey, from, to);
    1558             : }
    1559             : 
    1560             : 
    1561             : char * ASN1CALL
    1562           0 : print_EncryptedKey(const EncryptedKey *data, int flags)
    1563             : {
    1564           0 :     return _asn1_print_top(asn1_EncryptedKey, flags, data);
    1565             : }
    1566             : 
    1567             : /* template_members: KeyTransRecipientInfo exp exp */
    1568             : /* tsequence: members isstruct: 1 */
    1569             : /* generate_template_type: KeyTransRecipientInfo_tag__26 */
    1570             : const struct asn1_template asn1_KeyTransRecipientInfo_tag__26[] = {
    1571             : /* 0 */ { 0, sizeof(struct KeyTransRecipientInfo), ((void *)(uintptr_t)9) },
    1572             : /* 1 */ { A1_OP_TYPE , offsetof(struct KeyTransRecipientInfo, version), asn1_CMSVersion },
    1573             : /* 2 */ { A1_OP_TYPE , offsetof(struct KeyTransRecipientInfo, rid), asn1_RecipientIdentifier },
    1574             : /* 3 */ { A1_OP_TYPE , offsetof(struct KeyTransRecipientInfo, keyEncryptionAlgorithm), asn1_KeyEncryptionAlgorithmIdentifier },
    1575             : /* 4 */ { A1_OP_TYPE , offsetof(struct KeyTransRecipientInfo, encryptedKey), asn1_EncryptedKey },
    1576             : /* 5 */ { A1_OP_NAME, 0, "KeyTransRecipientInfo" },
    1577             : /* 6 */ { A1_OP_NAME, 0, "version" },
    1578             : /* 7 */ { A1_OP_NAME, 0, "rid" },
    1579             : /* 8 */ { A1_OP_NAME, 0, "keyEncryptionAlgorithm" },
    1580             : /* 9 */ { A1_OP_NAME, 0, "encryptedKey" }
    1581             : };
    1582             : /* generate_template_type: KeyTransRecipientInfo */
    1583             : const struct asn1_template asn1_KeyTransRecipientInfo[] = {
    1584             : /* 0 */ { 0, sizeof(KeyTransRecipientInfo), ((void *)(uintptr_t)1) },
    1585             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_KeyTransRecipientInfo_tag__26 }
    1586             : };
    1587             : 
    1588             : int ASN1CALL
    1589           0 : decode_KeyTransRecipientInfo(const unsigned char *p, size_t len, KeyTransRecipientInfo *data, size_t *size)
    1590             : {
    1591           0 :     memset(data, 0, sizeof(*data));
    1592           0 :     return _asn1_decode_top(asn1_KeyTransRecipientInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1593             : }
    1594             : 
    1595             : 
    1596             : int ASN1CALL
    1597           0 : encode_KeyTransRecipientInfo(unsigned char *p, size_t len, const KeyTransRecipientInfo *data, size_t *size)
    1598             : {
    1599           0 :     return _asn1_encode(asn1_KeyTransRecipientInfo, p, len, data, size);
    1600             : }
    1601             : 
    1602             : 
    1603             : size_t ASN1CALL
    1604           0 : length_KeyTransRecipientInfo(const KeyTransRecipientInfo *data)
    1605             : {
    1606           0 :     return _asn1_length(asn1_KeyTransRecipientInfo, data);
    1607             : }
    1608             : 
    1609             : 
    1610             : void ASN1CALL
    1611           0 : free_KeyTransRecipientInfo(KeyTransRecipientInfo *data)
    1612             : {
    1613           0 :     _asn1_free_top(asn1_KeyTransRecipientInfo, data);
    1614           0 : }
    1615             : 
    1616             : 
    1617             : int ASN1CALL
    1618           0 : copy_KeyTransRecipientInfo(const KeyTransRecipientInfo *from, KeyTransRecipientInfo *to)
    1619             : {
    1620           0 :     return _asn1_copy_top(asn1_KeyTransRecipientInfo, from, to);
    1621             : }
    1622             : 
    1623             : 
    1624             : char * ASN1CALL
    1625           0 : print_KeyTransRecipientInfo(const KeyTransRecipientInfo *data, int flags)
    1626             : {
    1627           0 :     return _asn1_print_top(asn1_KeyTransRecipientInfo, flags, data);
    1628             : }
    1629             : 
    1630             : /* generate_template_type: RecipientInfo */
    1631             : const struct asn1_template asn1_RecipientInfo[] = {
    1632             : /* 0 */ { 0, sizeof(RecipientInfo), ((void *)(uintptr_t)1) },
    1633             : /* 1 */ { A1_OP_TYPE , 0, asn1_KeyTransRecipientInfo }
    1634             : };
    1635             : 
    1636             : int ASN1CALL
    1637           0 : decode_RecipientInfo(const unsigned char *p, size_t len, RecipientInfo *data, size_t *size)
    1638             : {
    1639           0 :     memset(data, 0, sizeof(*data));
    1640           0 :     return _asn1_decode_top(asn1_RecipientInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1641             : }
    1642             : 
    1643             : 
    1644             : int ASN1CALL
    1645           0 : encode_RecipientInfo(unsigned char *p, size_t len, const RecipientInfo *data, size_t *size)
    1646             : {
    1647           0 :     return _asn1_encode(asn1_RecipientInfo, p, len, data, size);
    1648             : }
    1649             : 
    1650             : 
    1651             : size_t ASN1CALL
    1652           0 : length_RecipientInfo(const RecipientInfo *data)
    1653             : {
    1654           0 :     return _asn1_length(asn1_RecipientInfo, data);
    1655             : }
    1656             : 
    1657             : 
    1658             : void ASN1CALL
    1659           0 : free_RecipientInfo(RecipientInfo *data)
    1660             : {
    1661           0 :     _asn1_free_top(asn1_RecipientInfo, data);
    1662           0 : }
    1663             : 
    1664             : 
    1665             : int ASN1CALL
    1666           0 : copy_RecipientInfo(const RecipientInfo *from, RecipientInfo *to)
    1667             : {
    1668           0 :     return _asn1_copy_top(asn1_RecipientInfo, from, to);
    1669             : }
    1670             : 
    1671             : 
    1672             : char * ASN1CALL
    1673           0 : print_RecipientInfo(const RecipientInfo *data, int flags)
    1674             : {
    1675           0 :     return _asn1_print_top(asn1_RecipientInfo, flags, data);
    1676             : }
    1677             : 
    1678             : /* template_members: RecipientInfos exp exp */
    1679             : /* generate_template_type: RecipientInfo_seofTstruct_5 */
    1680             : const struct asn1_template asn1_RecipientInfo_seofTstruct_5[] = {
    1681             : /* 0 */ { 0, sizeof(RecipientInfo), ((void *)(uintptr_t)1) },
    1682             : /* 1 */ { A1_OP_TYPE , 0, asn1_RecipientInfo }
    1683             : };
    1684             : /* generate_template_type: RecipientInfos_tag__27 */
    1685             : const struct asn1_template asn1_RecipientInfos_tag__27[] = {
    1686             : /* 0 */ { 0, sizeof(RecipientInfo), ((void *)(uintptr_t)1) },
    1687             : /* 1 */ { A1_OP_SETOF, 0, asn1_RecipientInfo_seofTstruct_5 }
    1688             : };
    1689             : /* generate_template_type: RecipientInfos */
    1690             : const struct asn1_template asn1_RecipientInfos[] = {
    1691             : /* 0 */ { 0, sizeof(RecipientInfos), ((void *)(uintptr_t)1) },
    1692             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_RecipientInfos_tag__27 }
    1693             : };
    1694             : 
    1695             : int ASN1CALL
    1696           0 : decode_RecipientInfos(const unsigned char *p, size_t len, RecipientInfos *data, size_t *size)
    1697             : {
    1698           0 :     memset(data, 0, sizeof(*data));
    1699           0 :     return _asn1_decode_top(asn1_RecipientInfos, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1700             : }
    1701             : 
    1702             : 
    1703             : int ASN1CALL
    1704           0 : encode_RecipientInfos(unsigned char *p, size_t len, const RecipientInfos *data, size_t *size)
    1705             : {
    1706           0 :     return _asn1_encode(asn1_RecipientInfos, p, len, data, size);
    1707             : }
    1708             : 
    1709             : 
    1710             : size_t ASN1CALL
    1711           0 : length_RecipientInfos(const RecipientInfos *data)
    1712             : {
    1713           0 :     return _asn1_length(asn1_RecipientInfos, data);
    1714             : }
    1715             : 
    1716             : 
    1717             : void ASN1CALL
    1718           0 : free_RecipientInfos(RecipientInfos *data)
    1719             : {
    1720           0 :     _asn1_free_top(asn1_RecipientInfos, data);
    1721           0 : }
    1722             : 
    1723             : 
    1724             : int ASN1CALL
    1725           0 : copy_RecipientInfos(const RecipientInfos *from, RecipientInfos *to)
    1726             : {
    1727           0 :     return _asn1_copy_top(asn1_RecipientInfos, from, to);
    1728             : }
    1729             : 
    1730             : 
    1731             : char * ASN1CALL
    1732           0 : print_RecipientInfos(const RecipientInfos *data, int flags)
    1733             : {
    1734           0 :     return _asn1_print_top(asn1_RecipientInfos, flags, data);
    1735             : }
    1736             : 
    1737             : /* template_members: EncryptedContent exp exp */
    1738             : /* generate_template_type: EncryptedContent_tag__28 */
    1739             : /* generate_template_type: EncryptedContent */
    1740             : const struct asn1_template asn1_EncryptedContent[] = {
    1741             : /* 0 */ { 0, sizeof(EncryptedContent), ((void *)(uintptr_t)1) },
    1742             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_MessageDigest_tag__3 }
    1743             : };
    1744             : 
    1745             : int ASN1CALL
    1746           0 : decode_EncryptedContent(const unsigned char *p, size_t len, EncryptedContent *data, size_t *size)
    1747             : {
    1748           0 :     memset(data, 0, sizeof(*data));
    1749           0 :     return _asn1_decode_top(asn1_EncryptedContent, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1750             : }
    1751             : 
    1752             : 
    1753             : int ASN1CALL
    1754           0 : encode_EncryptedContent(unsigned char *p, size_t len, const EncryptedContent *data, size_t *size)
    1755             : {
    1756           0 :     return _asn1_encode(asn1_EncryptedContent, p, len, data, size);
    1757             : }
    1758             : 
    1759             : 
    1760             : size_t ASN1CALL
    1761           0 : length_EncryptedContent(const EncryptedContent *data)
    1762             : {
    1763           0 :     return _asn1_length(asn1_EncryptedContent, data);
    1764             : }
    1765             : 
    1766             : 
    1767             : void ASN1CALL
    1768           0 : free_EncryptedContent(EncryptedContent *data)
    1769             : {
    1770           0 :     _asn1_free_top(asn1_EncryptedContent, data);
    1771           0 : }
    1772             : 
    1773             : 
    1774             : int ASN1CALL
    1775           0 : copy_EncryptedContent(const EncryptedContent *from, EncryptedContent *to)
    1776             : {
    1777           0 :     return _asn1_copy_top(asn1_EncryptedContent, from, to);
    1778             : }
    1779             : 
    1780             : 
    1781             : char * ASN1CALL
    1782           0 : print_EncryptedContent(const EncryptedContent *data, int flags)
    1783             : {
    1784           0 :     return _asn1_print_top(asn1_EncryptedContent, flags, data);
    1785             : }
    1786             : 
    1787             : /* template_members: EncryptedContentInfo exp exp */
    1788             : /* tsequence: members isstruct: 1 */
    1789             : /* template_members: EncryptedContentInfo exp imp */
    1790             : /* template_members: heim_octet_string exp exp */
    1791             : /* generate_template_type: heim_octet_string_tag_encryptedContent_31 */
    1792             : /* generate_template_type: EncryptedContentInfo_tag_encryptedContent_30 */
    1793             : /* generate_template_type: EncryptedContentInfo_tag__29 */
    1794             : const struct asn1_template asn1_EncryptedContentInfo_tag__29[] = {
    1795             : /* 0 */ { 0, sizeof(struct EncryptedContentInfo), ((void *)(uintptr_t)7) },
    1796             : /* 1 */ { A1_OP_TYPE , offsetof(struct EncryptedContentInfo, contentType), asn1_ContentType },
    1797             : /* 2 */ { A1_OP_TYPE , offsetof(struct EncryptedContentInfo, contentEncryptionAlgorithm), asn1_ContentEncryptionAlgorithmIdentifier },
    1798             : /* 3 */ { A1_TAG_T(ASN1_C_CONTEXT,PRIM,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct EncryptedContentInfo, encryptedContent), asn1_EncapsulatedContentInfo_tag_eContent_7 },
    1799             : /* 4 */ { A1_OP_NAME, 0, "EncryptedContentInfo" },
    1800             : /* 5 */ { A1_OP_NAME, 0, "contentType" },
    1801             : /* 6 */ { A1_OP_NAME, 0, "contentEncryptionAlgorithm" },
    1802             : /* 7 */ { A1_OP_NAME, 0, "encryptedContent" }
    1803             : };
    1804             : /* generate_template_type: EncryptedContentInfo */
    1805             : const struct asn1_template asn1_EncryptedContentInfo[] = {
    1806             : /* 0 */ { 0, sizeof(EncryptedContentInfo), ((void *)(uintptr_t)1) },
    1807             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_EncryptedContentInfo_tag__29 }
    1808             : };
    1809             : 
    1810             : int ASN1CALL
    1811           0 : decode_EncryptedContentInfo(const unsigned char *p, size_t len, EncryptedContentInfo *data, size_t *size)
    1812             : {
    1813           0 :     memset(data, 0, sizeof(*data));
    1814           0 :     return _asn1_decode_top(asn1_EncryptedContentInfo, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1815             : }
    1816             : 
    1817             : 
    1818             : int ASN1CALL
    1819           0 : encode_EncryptedContentInfo(unsigned char *p, size_t len, const EncryptedContentInfo *data, size_t *size)
    1820             : {
    1821           0 :     return _asn1_encode(asn1_EncryptedContentInfo, p, len, data, size);
    1822             : }
    1823             : 
    1824             : 
    1825             : size_t ASN1CALL
    1826           0 : length_EncryptedContentInfo(const EncryptedContentInfo *data)
    1827             : {
    1828           0 :     return _asn1_length(asn1_EncryptedContentInfo, data);
    1829             : }
    1830             : 
    1831             : 
    1832             : void ASN1CALL
    1833           0 : free_EncryptedContentInfo(EncryptedContentInfo *data)
    1834             : {
    1835           0 :     _asn1_free_top(asn1_EncryptedContentInfo, data);
    1836           0 : }
    1837             : 
    1838             : 
    1839             : int ASN1CALL
    1840           0 : copy_EncryptedContentInfo(const EncryptedContentInfo *from, EncryptedContentInfo *to)
    1841             : {
    1842           0 :     return _asn1_copy_top(asn1_EncryptedContentInfo, from, to);
    1843             : }
    1844             : 
    1845             : 
    1846             : char * ASN1CALL
    1847           0 : print_EncryptedContentInfo(const EncryptedContentInfo *data, int flags)
    1848             : {
    1849           0 :     return _asn1_print_top(asn1_EncryptedContentInfo, flags, data);
    1850             : }
    1851             : 
    1852             : /* template_members: UnprotectedAttributes exp exp */
    1853             : /* generate_template_type: Attribute_seofTstruct_6 */
    1854             : /* generate_template_type: UnprotectedAttributes_tag__32 */
    1855             : /* generate_template_type: UnprotectedAttributes */
    1856             : const struct asn1_template asn1_UnprotectedAttributes[] = {
    1857             : /* 0 */ { 0, sizeof(UnprotectedAttributes), ((void *)(uintptr_t)1) },
    1858             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_CMSAttributes_tag__13 }
    1859             : };
    1860             : 
    1861             : int ASN1CALL
    1862           0 : decode_UnprotectedAttributes(const unsigned char *p, size_t len, UnprotectedAttributes *data, size_t *size)
    1863             : {
    1864           0 :     memset(data, 0, sizeof(*data));
    1865           0 :     return _asn1_decode_top(asn1_UnprotectedAttributes, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1866             : }
    1867             : 
    1868             : 
    1869             : int ASN1CALL
    1870           0 : encode_UnprotectedAttributes(unsigned char *p, size_t len, const UnprotectedAttributes *data, size_t *size)
    1871             : {
    1872           0 :     return _asn1_encode(asn1_UnprotectedAttributes, p, len, data, size);
    1873             : }
    1874             : 
    1875             : 
    1876             : size_t ASN1CALL
    1877           0 : length_UnprotectedAttributes(const UnprotectedAttributes *data)
    1878             : {
    1879           0 :     return _asn1_length(asn1_UnprotectedAttributes, data);
    1880             : }
    1881             : 
    1882             : 
    1883             : void ASN1CALL
    1884           0 : free_UnprotectedAttributes(UnprotectedAttributes *data)
    1885             : {
    1886           0 :     _asn1_free_top(asn1_UnprotectedAttributes, data);
    1887           0 : }
    1888             : 
    1889             : 
    1890             : int ASN1CALL
    1891           0 : copy_UnprotectedAttributes(const UnprotectedAttributes *from, UnprotectedAttributes *to)
    1892             : {
    1893           0 :     return _asn1_copy_top(asn1_UnprotectedAttributes, from, to);
    1894             : }
    1895             : 
    1896             : 
    1897             : char * ASN1CALL
    1898           0 : print_UnprotectedAttributes(const UnprotectedAttributes *data, int flags)
    1899             : {
    1900           0 :     return _asn1_print_top(asn1_UnprotectedAttributes, flags, data);
    1901             : }
    1902             : 
    1903             : /* template_members: CMSEncryptedData exp exp */
    1904             : /* tsequence: members isstruct: 1 */
    1905             : /* template_members: CMSEncryptedData exp imp */
    1906             : /* generate_template_type: CMSEncryptedData_tag_unprotectedAttrs_34 */
    1907             : const struct asn1_template asn1_CMSEncryptedData_tag_unprotectedAttrs_34[] = {
    1908             : /* 0 */ { 0, sizeof(UnprotectedAttributes), ((void *)(uintptr_t)1) },
    1909             : /* 1 */ { A1_OP_TYPE , 0, asn1_UnprotectedAttributes }
    1910             : };
    1911             : /* generate_template_type: CMSEncryptedData_tag__33 */
    1912             : const struct asn1_template asn1_CMSEncryptedData_tag__33[] = {
    1913             : /* 0 */ { 0, sizeof(struct CMSEncryptedData), ((void *)(uintptr_t)7) },
    1914             : /* 1 */ { A1_OP_TYPE , offsetof(struct CMSEncryptedData, version), asn1_CMSVersion },
    1915             : /* 2 */ { A1_OP_TYPE , offsetof(struct CMSEncryptedData, encryptedContentInfo), asn1_EncryptedContentInfo },
    1916             : /* 3 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,1)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct CMSEncryptedData, unprotectedAttrs), asn1_CMSEncryptedData_tag_unprotectedAttrs_34 },
    1917             : /* 4 */ { A1_OP_NAME, 0, "CMSEncryptedData" },
    1918             : /* 5 */ { A1_OP_NAME, 0, "version" },
    1919             : /* 6 */ { A1_OP_NAME, 0, "encryptedContentInfo" },
    1920             : /* 7 */ { A1_OP_NAME, 0, "unprotectedAttrs" }
    1921             : };
    1922             : /* generate_template_type: CMSEncryptedData */
    1923             : const struct asn1_template asn1_CMSEncryptedData[] = {
    1924             : /* 0 */ { 0, sizeof(CMSEncryptedData), ((void *)(uintptr_t)1) },
    1925             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_CMSEncryptedData_tag__33 }
    1926             : };
    1927             : 
    1928             : int ASN1CALL
    1929           0 : decode_CMSEncryptedData(const unsigned char *p, size_t len, CMSEncryptedData *data, size_t *size)
    1930             : {
    1931           0 :     memset(data, 0, sizeof(*data));
    1932           0 :     return _asn1_decode_top(asn1_CMSEncryptedData, 0|A1_PF_ALLOW_BER, p, len, data, size);
    1933             : }
    1934             : 
    1935             : 
    1936             : int ASN1CALL
    1937           0 : encode_CMSEncryptedData(unsigned char *p, size_t len, const CMSEncryptedData *data, size_t *size)
    1938             : {
    1939           0 :     return _asn1_encode(asn1_CMSEncryptedData, p, len, data, size);
    1940             : }
    1941             : 
    1942             : 
    1943             : size_t ASN1CALL
    1944           0 : length_CMSEncryptedData(const CMSEncryptedData *data)
    1945             : {
    1946           0 :     return _asn1_length(asn1_CMSEncryptedData, data);
    1947             : }
    1948             : 
    1949             : 
    1950             : void ASN1CALL
    1951           0 : free_CMSEncryptedData(CMSEncryptedData *data)
    1952             : {
    1953           0 :     _asn1_free_top(asn1_CMSEncryptedData, data);
    1954           0 : }
    1955             : 
    1956             : 
    1957             : int ASN1CALL
    1958           0 : copy_CMSEncryptedData(const CMSEncryptedData *from, CMSEncryptedData *to)
    1959             : {
    1960           0 :     return _asn1_copy_top(asn1_CMSEncryptedData, from, to);
    1961             : }
    1962             : 
    1963             : 
    1964             : char * ASN1CALL
    1965           0 : print_CMSEncryptedData(const CMSEncryptedData *data, int flags)
    1966             : {
    1967           0 :     return _asn1_print_top(asn1_CMSEncryptedData, flags, data);
    1968             : }
    1969             : 
    1970             : /* template_members: EnvelopedData exp exp */
    1971             : /* tsequence: members isstruct: 1 */
    1972             : /* template_members: EnvelopedData exp imp */
    1973             : /* generate_template_type: EnvelopedData_tag_originatorInfo_36 */
    1974             : const struct asn1_template asn1_EnvelopedData_tag_originatorInfo_36[] = {
    1975             : /* 0 */ { 0, sizeof(OriginatorInfo), ((void *)(uintptr_t)1) },
    1976             : /* 1 */ { A1_OP_TYPE , 0, asn1_OriginatorInfo }
    1977             : };
    1978             : /* template_members: EnvelopedData exp imp */
    1979             : /* generate_template_type: EnvelopedData_tag_unprotectedAttrs_37 */
    1980             : /* generate_template_type: EnvelopedData_tag__35 */
    1981             : const struct asn1_template asn1_EnvelopedData_tag__35[] = {
    1982             : /* 0 */ { 0, sizeof(struct EnvelopedData), ((void *)(uintptr_t)11) },
    1983             : /* 1 */ { A1_OP_TYPE , offsetof(struct EnvelopedData, version), asn1_CMSVersion },
    1984             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct EnvelopedData, originatorInfo), asn1_EnvelopedData_tag_originatorInfo_36 },
    1985             : /* 3 */ { A1_OP_TYPE , offsetof(struct EnvelopedData, recipientInfos), asn1_RecipientInfos },
    1986             : /* 4 */ { A1_OP_TYPE , offsetof(struct EnvelopedData, encryptedContentInfo), asn1_EncryptedContentInfo },
    1987             : /* 5 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,1)|A1_FLAG_OPTIONAL|A1_FLAG_IMPLICIT, offsetof(struct EnvelopedData, unprotectedAttrs), asn1_CMSEncryptedData_tag_unprotectedAttrs_34 },
    1988             : /* 6 */ { A1_OP_NAME, 0, "EnvelopedData" },
    1989             : /* 7 */ { A1_OP_NAME, 0, "version" },
    1990             : /* 8 */ { A1_OP_NAME, 0, "originatorInfo" },
    1991             : /* 9 */ { A1_OP_NAME, 0, "recipientInfos" },
    1992             : /* 10 */ { A1_OP_NAME, 0, "encryptedContentInfo" },
    1993             : /* 11 */ { A1_OP_NAME, 0, "unprotectedAttrs" }
    1994             : };
    1995             : /* generate_template_type: EnvelopedData */
    1996             : const struct asn1_template asn1_EnvelopedData[] = {
    1997             : /* 0 */ { 0, sizeof(EnvelopedData), ((void *)(uintptr_t)1) },
    1998             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_EnvelopedData_tag__35 }
    1999             : };
    2000             : 
    2001             : int ASN1CALL
    2002           0 : decode_EnvelopedData(const unsigned char *p, size_t len, EnvelopedData *data, size_t *size)
    2003             : {
    2004           0 :     memset(data, 0, sizeof(*data));
    2005           0 :     return _asn1_decode_top(asn1_EnvelopedData, 0|A1_PF_ALLOW_BER, p, len, data, size);
    2006             : }
    2007             : 
    2008             : 
    2009             : int ASN1CALL
    2010          17 : encode_EnvelopedData(unsigned char *p, size_t len, const EnvelopedData *data, size_t *size)
    2011             : {
    2012          17 :     return _asn1_encode(asn1_EnvelopedData, p, len, data, size);
    2013             : }
    2014             : 
    2015             : 
    2016             : size_t ASN1CALL
    2017          17 : length_EnvelopedData(const EnvelopedData *data)
    2018             : {
    2019          17 :     return _asn1_length(asn1_EnvelopedData, data);
    2020             : }
    2021             : 
    2022             : 
    2023             : void ASN1CALL
    2024          17 : free_EnvelopedData(EnvelopedData *data)
    2025             : {
    2026          17 :     _asn1_free_top(asn1_EnvelopedData, data);
    2027          17 : }
    2028             : 
    2029             : 
    2030             : int ASN1CALL
    2031           0 : copy_EnvelopedData(const EnvelopedData *from, EnvelopedData *to)
    2032             : {
    2033           0 :     return _asn1_copy_top(asn1_EnvelopedData, from, to);
    2034             : }
    2035             : 
    2036             : 
    2037             : char * ASN1CALL
    2038           0 : print_EnvelopedData(const EnvelopedData *data, int flags)
    2039             : {
    2040           0 :     return _asn1_print_top(asn1_EnvelopedData, flags, data);
    2041             : }
    2042             : 
    2043             : /* template_members: CMSRC2CBCParameter exp exp */
    2044             : /* tsequence: members isstruct: 1 */
    2045             : /* template_members: CMSRC2CBCParameter exp exp */
    2046             : /* generate_template_type: CMSRC2CBCParameter_tag_rc2ParameterVersion_39 */
    2047             : const struct asn1_template asn1_CMSRC2CBCParameter_tag_rc2ParameterVersion_39[] = {
    2048             : /* 0 */ { 0, sizeof(unsigned), ((void *)(uintptr_t)1) },
    2049             : /* 1 */ { A1_PARSE_T(A1T_UNSIGNED), 0, NULL }
    2050             : };
    2051             : /* template_members: CMSRC2CBCParameter exp exp */
    2052             : /* generate_template_type: CMSRC2CBCParameter_tag_iv_40 */
    2053             : /* generate_template_type: CMSRC2CBCParameter_tag__38 */
    2054             : const struct asn1_template asn1_CMSRC2CBCParameter_tag__38[] = {
    2055             : /* 0 */ { 0, sizeof(struct CMSRC2CBCParameter), ((void *)(uintptr_t)5) },
    2056             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer), offsetof(struct CMSRC2CBCParameter, rc2ParameterVersion), asn1_CMSRC2CBCParameter_tag_rc2ParameterVersion_39 },
    2057             : /* 2 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct CMSRC2CBCParameter, iv), asn1_MessageDigest_tag__3 },
    2058             : /* 3 */ { A1_OP_NAME, 0, "CMSRC2CBCParameter" },
    2059             : /* 4 */ { A1_OP_NAME, 0, "rc2ParameterVersion" },
    2060             : /* 5 */ { A1_OP_NAME, 0, "iv" }
    2061             : };
    2062             : /* generate_template_type: CMSRC2CBCParameter */
    2063             : const struct asn1_template asn1_CMSRC2CBCParameter[] = {
    2064             : /* 0 */ { 0, sizeof(CMSRC2CBCParameter), ((void *)(uintptr_t)1) },
    2065             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_CMSRC2CBCParameter_tag__38 }
    2066             : };
    2067             : 
    2068             : int ASN1CALL
    2069           0 : decode_CMSRC2CBCParameter(const unsigned char *p, size_t len, CMSRC2CBCParameter *data, size_t *size)
    2070             : {
    2071           0 :     memset(data, 0, sizeof(*data));
    2072           0 :     return _asn1_decode_top(asn1_CMSRC2CBCParameter, 0|A1_PF_ALLOW_BER, p, len, data, size);
    2073             : }
    2074             : 
    2075             : 
    2076             : int ASN1CALL
    2077           0 : encode_CMSRC2CBCParameter(unsigned char *p, size_t len, const CMSRC2CBCParameter *data, size_t *size)
    2078             : {
    2079           0 :     return _asn1_encode(asn1_CMSRC2CBCParameter, p, len, data, size);
    2080             : }
    2081             : 
    2082             : 
    2083             : size_t ASN1CALL
    2084           0 : length_CMSRC2CBCParameter(const CMSRC2CBCParameter *data)
    2085             : {
    2086           0 :     return _asn1_length(asn1_CMSRC2CBCParameter, data);
    2087             : }
    2088             : 
    2089             : 
    2090             : void ASN1CALL
    2091           0 : free_CMSRC2CBCParameter(CMSRC2CBCParameter *data)
    2092             : {
    2093           0 :     _asn1_free_top(asn1_CMSRC2CBCParameter, data);
    2094           0 : }
    2095             : 
    2096             : 
    2097             : int ASN1CALL
    2098           0 : copy_CMSRC2CBCParameter(const CMSRC2CBCParameter *from, CMSRC2CBCParameter *to)
    2099             : {
    2100           0 :     return _asn1_copy_top(asn1_CMSRC2CBCParameter, from, to);
    2101             : }
    2102             : 
    2103             : 
    2104             : char * ASN1CALL
    2105           0 : print_CMSRC2CBCParameter(const CMSRC2CBCParameter *data, int flags)
    2106             : {
    2107           0 :     return _asn1_print_top(asn1_CMSRC2CBCParameter, flags, data);
    2108             : }
    2109             : 
    2110             : /* template_members: CMSCBCParameter exp exp */
    2111             : /* generate_template_type: CMSCBCParameter_tag__41 */
    2112             : /* generate_template_type: CMSCBCParameter */
    2113             : const struct asn1_template asn1_CMSCBCParameter[] = {
    2114             : /* 0 */ { 0, sizeof(CMSCBCParameter), ((void *)(uintptr_t)1) },
    2115             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_MessageDigest_tag__3 }
    2116             : };
    2117             : 
    2118             : int ASN1CALL
    2119           0 : decode_CMSCBCParameter(const unsigned char *p, size_t len, CMSCBCParameter *data, size_t *size)
    2120             : {
    2121           0 :     memset(data, 0, sizeof(*data));
    2122           0 :     return _asn1_decode_top(asn1_CMSCBCParameter, 0|A1_PF_ALLOW_BER, p, len, data, size);
    2123             : }
    2124             : 
    2125             : 
    2126             : int ASN1CALL
    2127          17 : encode_CMSCBCParameter(unsigned char *p, size_t len, const CMSCBCParameter *data, size_t *size)
    2128             : {
    2129          17 :     return _asn1_encode(asn1_CMSCBCParameter, p, len, data, size);
    2130             : }
    2131             : 
    2132             : 
    2133             : size_t ASN1CALL
    2134          17 : length_CMSCBCParameter(const CMSCBCParameter *data)
    2135             : {
    2136          17 :     return _asn1_length(asn1_CMSCBCParameter, data);
    2137             : }
    2138             : 
    2139             : 
    2140             : void ASN1CALL
    2141           0 : free_CMSCBCParameter(CMSCBCParameter *data)
    2142             : {
    2143           0 :     _asn1_free_top(asn1_CMSCBCParameter, data);
    2144           0 : }
    2145             : 
    2146             : 
    2147             : int ASN1CALL
    2148           0 : copy_CMSCBCParameter(const CMSCBCParameter *from, CMSCBCParameter *to)
    2149             : {
    2150           0 :     return _asn1_copy_top(asn1_CMSCBCParameter, from, to);
    2151             : }
    2152             : 
    2153             : 
    2154             : char * ASN1CALL
    2155           0 : print_CMSCBCParameter(const CMSCBCParameter *data, int flags)
    2156             : {
    2157           0 :     return _asn1_print_top(asn1_CMSCBCParameter, flags, data);
    2158             : }
    2159             : 

Generated by: LCOV version 1.14