LCOV - code coverage report
Current view: top level - bin/default/third_party/heimdal/lib/asn1 - asn1_pkcs12_asn1.c (source / functions) Hit Total Coverage
Test: coverage report for master 2f515e9b Lines: 0 140 0.0 %
Date: 2024-04-21 15:09:00 Functions: 0 60 0.0 %

          Line data    Source code
       1             : /* Generated from /builds/eaglegai/samba/third_party/heimdal/lib/asn1/pkcs12.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 "pkcs12_asn1.h"
      15             : #include "pkcs12_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_ContentInfo = {
      23             :         (asn1_type_encode)encode_ContentInfo,
      24             :         (asn1_type_decode)decode_ContentInfo,
      25             :         (asn1_type_length)length_ContentInfo,
      26             :         (asn1_type_copy)copy_ContentInfo,
      27             :         (asn1_type_release)free_ContentInfo,
      28             :         (asn1_type_print)print_ContentInfo,
      29             :         sizeof(ContentInfo)
      30             : };
      31             : static const struct asn1_type_func asn1_extern_DigestInfo = {
      32             :         (asn1_type_encode)encode_DigestInfo,
      33             :         (asn1_type_decode)decode_DigestInfo,
      34             :         (asn1_type_length)length_DigestInfo,
      35             :         (asn1_type_copy)copy_DigestInfo,
      36             :         (asn1_type_release)free_DigestInfo,
      37             :         (asn1_type_print)print_DigestInfo,
      38             :         sizeof(DigestInfo)
      39             : };
      40             : static const struct asn1_type_func asn1_extern_HEIM_ANY = {
      41             :         (asn1_type_encode)encode_HEIM_ANY,
      42             :         (asn1_type_decode)decode_HEIM_ANY,
      43             :         (asn1_type_length)length_HEIM_ANY,
      44             :         (asn1_type_copy)copy_HEIM_ANY,
      45             :         (asn1_type_release)free_HEIM_ANY,
      46             :         (asn1_type_print)print_HEIM_ANY,
      47             :         sizeof(HEIM_ANY)
      48             : };
      49             : static const struct asn1_type_func asn1_extern_HEIM_ANY_SET = {
      50             :         (asn1_type_encode)encode_HEIM_ANY_SET,
      51             :         (asn1_type_decode)decode_HEIM_ANY_SET,
      52             :         (asn1_type_length)length_HEIM_ANY_SET,
      53             :         (asn1_type_copy)copy_HEIM_ANY_SET,
      54             :         (asn1_type_release)free_HEIM_ANY_SET,
      55             :         (asn1_type_print)print_HEIM_ANY_SET,
      56             :         sizeof(HEIM_ANY_SET)
      57             : };
      58             : static unsigned oid_id_pkcs_12_variable_num[6] =  { 1, 2, 840, 113549, 1, 12};
      59             : const heim_oid asn1_oid_id_pkcs_12 = { 6, oid_id_pkcs_12_variable_num };
      60             : 
      61             : static unsigned oid_id_pkcs_12PbeIds_variable_num[7] =  { 1, 2, 840, 113549, 1, 12, 1};
      62             : const heim_oid asn1_oid_id_pkcs_12PbeIds = { 7, oid_id_pkcs_12PbeIds_variable_num };
      63             : 
      64             : static unsigned oid_id_pbeWithSHAAnd128BitRC4_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 1, 1};
      65             : const heim_oid asn1_oid_id_pbeWithSHAAnd128BitRC4 = { 8, oid_id_pbeWithSHAAnd128BitRC4_variable_num };
      66             : 
      67             : static unsigned oid_id_pbeWithSHAAnd40BitRC4_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 1, 2};
      68             : const heim_oid asn1_oid_id_pbeWithSHAAnd40BitRC4 = { 8, oid_id_pbeWithSHAAnd40BitRC4_variable_num };
      69             : 
      70             : static unsigned oid_id_pbeWithSHAAnd3_KeyTripleDES_CBC_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 1, 3};
      71             : const heim_oid asn1_oid_id_pbeWithSHAAnd3_KeyTripleDES_CBC = { 8, oid_id_pbeWithSHAAnd3_KeyTripleDES_CBC_variable_num };
      72             : 
      73             : static unsigned oid_id_pbeWithSHAAnd2_KeyTripleDES_CBC_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 1, 4};
      74             : const heim_oid asn1_oid_id_pbeWithSHAAnd2_KeyTripleDES_CBC = { 8, oid_id_pbeWithSHAAnd2_KeyTripleDES_CBC_variable_num };
      75             : 
      76             : static unsigned oid_id_pbeWithSHAAnd128BitRC2_CBC_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 1, 5};
      77             : const heim_oid asn1_oid_id_pbeWithSHAAnd128BitRC2_CBC = { 8, oid_id_pbeWithSHAAnd128BitRC2_CBC_variable_num };
      78             : 
      79             : static unsigned oid_id_pbewithSHAAnd40BitRC2_CBC_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 1, 6};
      80             : const heim_oid asn1_oid_id_pbewithSHAAnd40BitRC2_CBC = { 8, oid_id_pbewithSHAAnd40BitRC2_CBC_variable_num };
      81             : 
      82             : static unsigned oid_id_pkcs12_bagtypes_variable_num[8] =  { 1, 2, 840, 113549, 1, 12, 10, 1};
      83             : const heim_oid asn1_oid_id_pkcs12_bagtypes = { 8, oid_id_pkcs12_bagtypes_variable_num };
      84             : 
      85             : static unsigned oid_id_pkcs12_keyBag_variable_num[9] =  { 1, 2, 840, 113549, 1, 12, 10, 1, 1};
      86             : const heim_oid asn1_oid_id_pkcs12_keyBag = { 9, oid_id_pkcs12_keyBag_variable_num };
      87             : 
      88             : static unsigned oid_id_pkcs12_pkcs8ShroudedKeyBag_variable_num[9] =  { 1, 2, 840, 113549, 1, 12, 10, 1, 2};
      89             : const heim_oid asn1_oid_id_pkcs12_pkcs8ShroudedKeyBag = { 9, oid_id_pkcs12_pkcs8ShroudedKeyBag_variable_num };
      90             : 
      91             : static unsigned oid_id_pkcs12_certBag_variable_num[9] =  { 1, 2, 840, 113549, 1, 12, 10, 1, 3};
      92             : const heim_oid asn1_oid_id_pkcs12_certBag = { 9, oid_id_pkcs12_certBag_variable_num };
      93             : 
      94             : static unsigned oid_id_pkcs12_crlBag_variable_num[9] =  { 1, 2, 840, 113549, 1, 12, 10, 1, 4};
      95             : const heim_oid asn1_oid_id_pkcs12_crlBag = { 9, oid_id_pkcs12_crlBag_variable_num };
      96             : 
      97             : static unsigned oid_id_pkcs12_secretBag_variable_num[9] =  { 1, 2, 840, 113549, 1, 12, 10, 1, 5};
      98             : const heim_oid asn1_oid_id_pkcs12_secretBag = { 9, oid_id_pkcs12_secretBag_variable_num };
      99             : 
     100             : static unsigned oid_id_pkcs12_safeContentsBag_variable_num[9] =  { 1, 2, 840, 113549, 1, 12, 10, 1, 6};
     101             : const heim_oid asn1_oid_id_pkcs12_safeContentsBag = { 9, oid_id_pkcs12_safeContentsBag_variable_num };
     102             : 
     103             : extern const struct asn1_template asn1_PKCS12_MacData[];
     104             : extern const struct asn1_template asn1_PKCS12_PFX[];
     105             : extern const struct asn1_template asn1_PKCS12_AuthenticatedSafe[];
     106             : extern const struct asn1_template asn1_PKCS12_Attribute[];
     107             : extern const struct asn1_template asn1_PKCS12_Attributes[];
     108             : extern const struct asn1_template asn1_PKCS12_SafeBag[];
     109             : extern const struct asn1_template asn1_PKCS12_SafeContents[];
     110             : extern const struct asn1_template asn1_PKCS12_CertBag[];
     111             : extern const struct asn1_template asn1_PKCS12_PBEParams[];
     112             : extern const struct asn1_template asn1_PKCS12_OctetString[];
     113             : extern const struct asn1_template asn1_PKCS12_OctetString[];
     114             : /* template_members: PKCS12_MacData exp exp */
     115             : /* tsequence: members isstruct: 1 */
     116             : /* template_members: PKCS12_MacData exp exp */
     117             : /* generate_template_type: PKCS12_MacData_tag_macSalt_1 */
     118             : const struct asn1_template asn1_PKCS12_MacData_tag_macSalt_1[] = {
     119             : /* 0 */ { 0, sizeof(heim_octet_string), ((void *)(uintptr_t)1) },
     120             : /* 1 */ { A1_PARSE_T(A1T_OCTET_STRING), 0, NULL }
     121             : };
     122             : /* template_members: PKCS12_MacData exp exp */
     123             : /* generate_template_type: PKCS12_MacData_tag_iterations_2 */
     124             : const struct asn1_template asn1_PKCS12_MacData_tag_iterations_2[] = {
     125             : /* 0 */ { 0, sizeof(heim_integer), ((void *)(uintptr_t)1) },
     126             : /* 1 */ { A1_PARSE_T(A1T_HEIM_INTEGER), 0, NULL }
     127             : };
     128             : /* generate_template_type: PKCS12_MacData_tag__0 */
     129             : const struct asn1_template asn1_PKCS12_MacData_tag__0[] = {
     130             : /* 0 */ { 0, sizeof(struct PKCS12_MacData), ((void *)(uintptr_t)7) },
     131             : /* 1 */ { A1_OP_TYPE_EXTERN , offsetof(struct PKCS12_MacData, mac), &asn1_extern_DigestInfo},
     132             : /* 2 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct PKCS12_MacData, macSalt), asn1_PKCS12_MacData_tag_macSalt_1 },
     133             : /* 3 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer)|A1_FLAG_OPTIONAL, offsetof(struct PKCS12_MacData, iterations), asn1_PKCS12_MacData_tag_iterations_2 },
     134             : /* 4 */ { A1_OP_NAME, 0, "PKCS12_MacData" },
     135             : /* 5 */ { A1_OP_NAME, 0, "mac" },
     136             : /* 6 */ { A1_OP_NAME, 0, "macSalt" },
     137             : /* 7 */ { A1_OP_NAME, 0, "iterations" }
     138             : };
     139             : /* generate_template_type: PKCS12_MacData */
     140             : const struct asn1_template asn1_PKCS12_MacData[] = {
     141             : /* 0 */ { 0, sizeof(PKCS12_MacData), ((void *)(uintptr_t)1) },
     142             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_MacData_tag__0 }
     143             : };
     144             : 
     145             : int ASN1CALL
     146           0 : decode_PKCS12_MacData(const unsigned char *p, size_t len, PKCS12_MacData *data, size_t *size)
     147             : {
     148           0 :     memset(data, 0, sizeof(*data));
     149           0 :     return _asn1_decode_top(asn1_PKCS12_MacData, 0|0, p, len, data, size);
     150             : }
     151             : 
     152             : 
     153             : int ASN1CALL
     154           0 : encode_PKCS12_MacData(unsigned char *p, size_t len, const PKCS12_MacData *data, size_t *size)
     155             : {
     156           0 :     return _asn1_encode(asn1_PKCS12_MacData, p, len, data, size);
     157             : }
     158             : 
     159             : 
     160             : size_t ASN1CALL
     161           0 : length_PKCS12_MacData(const PKCS12_MacData *data)
     162             : {
     163           0 :     return _asn1_length(asn1_PKCS12_MacData, data);
     164             : }
     165             : 
     166             : 
     167             : void ASN1CALL
     168           0 : free_PKCS12_MacData(PKCS12_MacData *data)
     169             : {
     170           0 :     _asn1_free_top(asn1_PKCS12_MacData, data);
     171           0 : }
     172             : 
     173             : 
     174             : int ASN1CALL
     175           0 : copy_PKCS12_MacData(const PKCS12_MacData *from, PKCS12_MacData *to)
     176             : {
     177           0 :     return _asn1_copy_top(asn1_PKCS12_MacData, from, to);
     178             : }
     179             : 
     180             : 
     181             : char * ASN1CALL
     182           0 : print_PKCS12_MacData(const PKCS12_MacData *data, int flags)
     183             : {
     184           0 :     return _asn1_print_top(asn1_PKCS12_MacData, flags, data);
     185             : }
     186             : 
     187             : /* template_members: PKCS12_PFX exp exp */
     188             : /* tsequence: members isstruct: 1 */
     189             : /* template_members: PKCS12_PFX exp exp */
     190             : /* generate_template_type: PKCS12_PFX_tag_version_4 */
     191             : /* generate_template_type: PKCS12_PFX_tag__3 */
     192             : const struct asn1_template asn1_PKCS12_PFX_tag__3[] = {
     193             : /* 0 */ { 0, sizeof(struct PKCS12_PFX), ((void *)(uintptr_t)7) },
     194             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer), offsetof(struct PKCS12_PFX, version), asn1_PKCS12_MacData_tag_iterations_2 },
     195             : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct PKCS12_PFX, authSafe), &asn1_extern_ContentInfo},
     196             : /* 3 */ { A1_OP_TYPE |A1_FLAG_OPTIONAL, offsetof(struct PKCS12_PFX, macData), asn1_PKCS12_MacData },
     197             : /* 4 */ { A1_OP_NAME, 0, "PKCS12_PFX" },
     198             : /* 5 */ { A1_OP_NAME, 0, "version" },
     199             : /* 6 */ { A1_OP_NAME, 0, "authSafe" },
     200             : /* 7 */ { A1_OP_NAME, 0, "macData" }
     201             : };
     202             : /* generate_template_type: PKCS12_PFX */
     203             : const struct asn1_template asn1_PKCS12_PFX[] = {
     204             : /* 0 */ { 0, sizeof(PKCS12_PFX), ((void *)(uintptr_t)1) },
     205             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_PFX_tag__3 }
     206             : };
     207             : 
     208             : int ASN1CALL
     209           0 : decode_PKCS12_PFX(const unsigned char *p, size_t len, PKCS12_PFX *data, size_t *size)
     210             : {
     211           0 :     memset(data, 0, sizeof(*data));
     212           0 :     return _asn1_decode_top(asn1_PKCS12_PFX, 0|0, p, len, data, size);
     213             : }
     214             : 
     215             : 
     216             : int ASN1CALL
     217           0 : encode_PKCS12_PFX(unsigned char *p, size_t len, const PKCS12_PFX *data, size_t *size)
     218             : {
     219           0 :     return _asn1_encode(asn1_PKCS12_PFX, p, len, data, size);
     220             : }
     221             : 
     222             : 
     223             : size_t ASN1CALL
     224           0 : length_PKCS12_PFX(const PKCS12_PFX *data)
     225             : {
     226           0 :     return _asn1_length(asn1_PKCS12_PFX, data);
     227             : }
     228             : 
     229             : 
     230             : void ASN1CALL
     231           0 : free_PKCS12_PFX(PKCS12_PFX *data)
     232             : {
     233           0 :     _asn1_free_top(asn1_PKCS12_PFX, data);
     234           0 : }
     235             : 
     236             : 
     237             : int ASN1CALL
     238           0 : copy_PKCS12_PFX(const PKCS12_PFX *from, PKCS12_PFX *to)
     239             : {
     240           0 :     return _asn1_copy_top(asn1_PKCS12_PFX, from, to);
     241             : }
     242             : 
     243             : 
     244             : char * ASN1CALL
     245           0 : print_PKCS12_PFX(const PKCS12_PFX *data, int flags)
     246             : {
     247           0 :     return _asn1_print_top(asn1_PKCS12_PFX, flags, data);
     248             : }
     249             : 
     250             : /* template_members: PKCS12_AuthenticatedSafe exp exp */
     251             : /* generate_template_type: ContentInfo_seofTstruct_0 */
     252             : const struct asn1_template asn1_ContentInfo_seofTstruct_0[] = {
     253             : /* 0 */ { 0, sizeof(ContentInfo), ((void *)(uintptr_t)1) },
     254             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_ContentInfo}
     255             : };
     256             : /* generate_template_type: PKCS12_AuthenticatedSafe_tag__5 */
     257             : const struct asn1_template asn1_PKCS12_AuthenticatedSafe_tag__5[] = {
     258             : /* 0 */ { 0, sizeof(ContentInfo), ((void *)(uintptr_t)1) },
     259             : /* 1 */ { A1_OP_SEQOF, 0, asn1_ContentInfo_seofTstruct_0 }
     260             : };
     261             : /* generate_template_type: PKCS12_AuthenticatedSafe */
     262             : const struct asn1_template asn1_PKCS12_AuthenticatedSafe[] = {
     263             : /* 0 */ { 0, sizeof(PKCS12_AuthenticatedSafe), ((void *)(uintptr_t)1) },
     264             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_AuthenticatedSafe_tag__5 }
     265             : };
     266             : 
     267             : int ASN1CALL
     268           0 : decode_PKCS12_AuthenticatedSafe(const unsigned char *p, size_t len, PKCS12_AuthenticatedSafe *data, size_t *size)
     269             : {
     270           0 :     memset(data, 0, sizeof(*data));
     271           0 :     return _asn1_decode_top(asn1_PKCS12_AuthenticatedSafe, 0|0, p, len, data, size);
     272             : }
     273             : 
     274             : 
     275             : int ASN1CALL
     276           0 : encode_PKCS12_AuthenticatedSafe(unsigned char *p, size_t len, const PKCS12_AuthenticatedSafe *data, size_t *size)
     277             : {
     278           0 :     return _asn1_encode(asn1_PKCS12_AuthenticatedSafe, p, len, data, size);
     279             : }
     280             : 
     281             : 
     282             : size_t ASN1CALL
     283           0 : length_PKCS12_AuthenticatedSafe(const PKCS12_AuthenticatedSafe *data)
     284             : {
     285           0 :     return _asn1_length(asn1_PKCS12_AuthenticatedSafe, data);
     286             : }
     287             : 
     288             : 
     289             : void ASN1CALL
     290           0 : free_PKCS12_AuthenticatedSafe(PKCS12_AuthenticatedSafe *data)
     291             : {
     292           0 :     _asn1_free_top(asn1_PKCS12_AuthenticatedSafe, data);
     293           0 : }
     294             : 
     295             : 
     296             : int ASN1CALL
     297           0 : copy_PKCS12_AuthenticatedSafe(const PKCS12_AuthenticatedSafe *from, PKCS12_AuthenticatedSafe *to)
     298             : {
     299           0 :     return _asn1_copy_top(asn1_PKCS12_AuthenticatedSafe, from, to);
     300             : }
     301             : 
     302             : 
     303             : char * ASN1CALL
     304           0 : print_PKCS12_AuthenticatedSafe(const PKCS12_AuthenticatedSafe *data, int flags)
     305             : {
     306           0 :     return _asn1_print_top(asn1_PKCS12_AuthenticatedSafe, flags, data);
     307             : }
     308             : 
     309             : /* template_members: PKCS12_Attribute exp exp */
     310             : /* tsequence: members isstruct: 1 */
     311             : /* template_members: PKCS12_Attribute exp exp */
     312             : /* generate_template_type: PKCS12_Attribute_tag_attrId_7 */
     313             : const struct asn1_template asn1_PKCS12_Attribute_tag_attrId_7[] = {
     314             : /* 0 */ { 0, sizeof(heim_oid), ((void *)(uintptr_t)1) },
     315             : /* 1 */ { A1_PARSE_T(A1T_OID), 0, NULL }
     316             : };
     317             : /* generate_template_type: PKCS12_Attribute_tag__6 */
     318             : const struct asn1_template asn1_PKCS12_Attribute_tag__6[] = {
     319             : /* 0 */ { 0, sizeof(struct PKCS12_Attribute), ((void *)(uintptr_t)5) },
     320             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OID), offsetof(struct PKCS12_Attribute, attrId), asn1_PKCS12_Attribute_tag_attrId_7 },
     321             : /* 2 */ { A1_OP_TYPE_EXTERN , offsetof(struct PKCS12_Attribute, attrValues), &asn1_extern_HEIM_ANY_SET},
     322             : /* 3 */ { A1_OP_NAME, 0, "PKCS12_Attribute" },
     323             : /* 4 */ { A1_OP_NAME, 0, "attrId" },
     324             : /* 5 */ { A1_OP_NAME, 0, "attrValues" }
     325             : };
     326             : /* generate_template_type: PKCS12_Attribute */
     327             : const struct asn1_template asn1_PKCS12_Attribute[] = {
     328             : /* 0 */ { 0, sizeof(PKCS12_Attribute), ((void *)(uintptr_t)1) },
     329             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_Attribute_tag__6 }
     330             : };
     331             : 
     332             : int ASN1CALL
     333           0 : decode_PKCS12_Attribute(const unsigned char *p, size_t len, PKCS12_Attribute *data, size_t *size)
     334             : {
     335           0 :     memset(data, 0, sizeof(*data));
     336           0 :     return _asn1_decode_top(asn1_PKCS12_Attribute, 0|0, p, len, data, size);
     337             : }
     338             : 
     339             : 
     340             : int ASN1CALL
     341           0 : encode_PKCS12_Attribute(unsigned char *p, size_t len, const PKCS12_Attribute *data, size_t *size)
     342             : {
     343           0 :     return _asn1_encode(asn1_PKCS12_Attribute, p, len, data, size);
     344             : }
     345             : 
     346             : 
     347             : size_t ASN1CALL
     348           0 : length_PKCS12_Attribute(const PKCS12_Attribute *data)
     349             : {
     350           0 :     return _asn1_length(asn1_PKCS12_Attribute, data);
     351             : }
     352             : 
     353             : 
     354             : void ASN1CALL
     355           0 : free_PKCS12_Attribute(PKCS12_Attribute *data)
     356             : {
     357           0 :     _asn1_free_top(asn1_PKCS12_Attribute, data);
     358           0 : }
     359             : 
     360             : 
     361             : int ASN1CALL
     362           0 : copy_PKCS12_Attribute(const PKCS12_Attribute *from, PKCS12_Attribute *to)
     363             : {
     364           0 :     return _asn1_copy_top(asn1_PKCS12_Attribute, from, to);
     365             : }
     366             : 
     367             : 
     368             : char * ASN1CALL
     369           0 : print_PKCS12_Attribute(const PKCS12_Attribute *data, int flags)
     370             : {
     371           0 :     return _asn1_print_top(asn1_PKCS12_Attribute, flags, data);
     372             : }
     373             : 
     374             : /* template_members: PKCS12_Attributes exp exp */
     375             : /* generate_template_type: PKCS12_Attribute_seofTstruct_1 */
     376             : const struct asn1_template asn1_PKCS12_Attribute_seofTstruct_1[] = {
     377             : /* 0 */ { 0, sizeof(PKCS12_Attribute), ((void *)(uintptr_t)1) },
     378             : /* 1 */ { A1_OP_TYPE , 0, asn1_PKCS12_Attribute }
     379             : };
     380             : /* generate_template_type: PKCS12_Attributes_tag__8 */
     381             : const struct asn1_template asn1_PKCS12_Attributes_tag__8[] = {
     382             : /* 0 */ { 0, sizeof(PKCS12_Attribute), ((void *)(uintptr_t)1) },
     383             : /* 1 */ { A1_OP_SETOF, 0, asn1_PKCS12_Attribute_seofTstruct_1 }
     384             : };
     385             : /* generate_template_type: PKCS12_Attributes */
     386             : const struct asn1_template asn1_PKCS12_Attributes[] = {
     387             : /* 0 */ { 0, sizeof(PKCS12_Attributes), ((void *)(uintptr_t)1) },
     388             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Set), 0, asn1_PKCS12_Attributes_tag__8 }
     389             : };
     390             : 
     391             : int ASN1CALL
     392           0 : decode_PKCS12_Attributes(const unsigned char *p, size_t len, PKCS12_Attributes *data, size_t *size)
     393             : {
     394           0 :     memset(data, 0, sizeof(*data));
     395           0 :     return _asn1_decode_top(asn1_PKCS12_Attributes, 0|0, p, len, data, size);
     396             : }
     397             : 
     398             : 
     399             : int ASN1CALL
     400           0 : encode_PKCS12_Attributes(unsigned char *p, size_t len, const PKCS12_Attributes *data, size_t *size)
     401             : {
     402           0 :     return _asn1_encode(asn1_PKCS12_Attributes, p, len, data, size);
     403             : }
     404             : 
     405             : 
     406             : size_t ASN1CALL
     407           0 : length_PKCS12_Attributes(const PKCS12_Attributes *data)
     408             : {
     409           0 :     return _asn1_length(asn1_PKCS12_Attributes, data);
     410             : }
     411             : 
     412             : 
     413             : void ASN1CALL
     414           0 : free_PKCS12_Attributes(PKCS12_Attributes *data)
     415             : {
     416           0 :     _asn1_free_top(asn1_PKCS12_Attributes, data);
     417           0 : }
     418             : 
     419             : 
     420             : int ASN1CALL
     421           0 : copy_PKCS12_Attributes(const PKCS12_Attributes *from, PKCS12_Attributes *to)
     422             : {
     423           0 :     return _asn1_copy_top(asn1_PKCS12_Attributes, from, to);
     424             : }
     425             : 
     426             : 
     427             : char * ASN1CALL
     428           0 : print_PKCS12_Attributes(const PKCS12_Attributes *data, int flags)
     429             : {
     430           0 :     return _asn1_print_top(asn1_PKCS12_Attributes, flags, data);
     431             : }
     432             : 
     433             : /* template_members: PKCS12_SafeBag exp exp */
     434             : /* tsequence: members isstruct: 1 */
     435             : /* template_members: PKCS12_SafeBag exp exp */
     436             : /* generate_template_type: PKCS12_SafeBag_tag_bagId_10 */
     437             : /* template_members: PKCS12_SafeBag exp exp */
     438             : /* generate_template_type: PKCS12_SafeBag_tag_bagValue_11 */
     439             : const struct asn1_template asn1_PKCS12_SafeBag_tag_bagValue_11[] = {
     440             : /* 0 */ { 0, sizeof(HEIM_ANY), ((void *)(uintptr_t)1) },
     441             : /* 1 */ { A1_OP_TYPE_EXTERN , 0, &asn1_extern_HEIM_ANY}
     442             : };
     443             : /* generate_template_type: PKCS12_SafeBag_tag__9 */
     444             : const struct asn1_template asn1_PKCS12_SafeBag_tag__9[] = {
     445             : /* 0 */ { 0, sizeof(struct PKCS12_SafeBag), ((void *)(uintptr_t)7) },
     446             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OID), offsetof(struct PKCS12_SafeBag, bagId), asn1_PKCS12_Attribute_tag_attrId_7 },
     447             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0), offsetof(struct PKCS12_SafeBag, bagValue), asn1_PKCS12_SafeBag_tag_bagValue_11 },
     448             : /* 3 */ { A1_OP_TYPE |A1_FLAG_OPTIONAL, offsetof(struct PKCS12_SafeBag, bagAttributes), asn1_PKCS12_Attributes },
     449             : /* 4 */ { A1_OP_NAME, 0, "PKCS12_SafeBag" },
     450             : /* 5 */ { A1_OP_NAME, 0, "bagId" },
     451             : /* 6 */ { A1_OP_NAME, 0, "bagValue" },
     452             : /* 7 */ { A1_OP_NAME, 0, "bagAttributes" }
     453             : };
     454             : /* generate_template_type: PKCS12_SafeBag */
     455             : const struct asn1_template asn1_PKCS12_SafeBag[] = {
     456             : /* 0 */ { 0, sizeof(PKCS12_SafeBag), ((void *)(uintptr_t)1) },
     457             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_SafeBag_tag__9 }
     458             : };
     459             : 
     460             : int ASN1CALL
     461           0 : decode_PKCS12_SafeBag(const unsigned char *p, size_t len, PKCS12_SafeBag *data, size_t *size)
     462             : {
     463           0 :     memset(data, 0, sizeof(*data));
     464           0 :     return _asn1_decode_top(asn1_PKCS12_SafeBag, 0|0, p, len, data, size);
     465             : }
     466             : 
     467             : 
     468             : int ASN1CALL
     469           0 : encode_PKCS12_SafeBag(unsigned char *p, size_t len, const PKCS12_SafeBag *data, size_t *size)
     470             : {
     471           0 :     return _asn1_encode(asn1_PKCS12_SafeBag, p, len, data, size);
     472             : }
     473             : 
     474             : 
     475             : size_t ASN1CALL
     476           0 : length_PKCS12_SafeBag(const PKCS12_SafeBag *data)
     477             : {
     478           0 :     return _asn1_length(asn1_PKCS12_SafeBag, data);
     479             : }
     480             : 
     481             : 
     482             : void ASN1CALL
     483           0 : free_PKCS12_SafeBag(PKCS12_SafeBag *data)
     484             : {
     485           0 :     _asn1_free_top(asn1_PKCS12_SafeBag, data);
     486           0 : }
     487             : 
     488             : 
     489             : int ASN1CALL
     490           0 : copy_PKCS12_SafeBag(const PKCS12_SafeBag *from, PKCS12_SafeBag *to)
     491             : {
     492           0 :     return _asn1_copy_top(asn1_PKCS12_SafeBag, from, to);
     493             : }
     494             : 
     495             : 
     496             : char * ASN1CALL
     497           0 : print_PKCS12_SafeBag(const PKCS12_SafeBag *data, int flags)
     498             : {
     499           0 :     return _asn1_print_top(asn1_PKCS12_SafeBag, flags, data);
     500             : }
     501             : 
     502             : /* template_members: PKCS12_SafeContents exp exp */
     503             : /* generate_template_type: PKCS12_SafeBag_seofTstruct_2 */
     504             : const struct asn1_template asn1_PKCS12_SafeBag_seofTstruct_2[] = {
     505             : /* 0 */ { 0, sizeof(PKCS12_SafeBag), ((void *)(uintptr_t)1) },
     506             : /* 1 */ { A1_OP_TYPE , 0, asn1_PKCS12_SafeBag }
     507             : };
     508             : /* generate_template_type: PKCS12_SafeContents_tag__12 */
     509             : const struct asn1_template asn1_PKCS12_SafeContents_tag__12[] = {
     510             : /* 0 */ { 0, sizeof(PKCS12_SafeBag), ((void *)(uintptr_t)1) },
     511             : /* 1 */ { A1_OP_SEQOF, 0, asn1_PKCS12_SafeBag_seofTstruct_2 }
     512             : };
     513             : /* generate_template_type: PKCS12_SafeContents */
     514             : const struct asn1_template asn1_PKCS12_SafeContents[] = {
     515             : /* 0 */ { 0, sizeof(PKCS12_SafeContents), ((void *)(uintptr_t)1) },
     516             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_SafeContents_tag__12 }
     517             : };
     518             : 
     519             : int ASN1CALL
     520           0 : decode_PKCS12_SafeContents(const unsigned char *p, size_t len, PKCS12_SafeContents *data, size_t *size)
     521             : {
     522           0 :     memset(data, 0, sizeof(*data));
     523           0 :     return _asn1_decode_top(asn1_PKCS12_SafeContents, 0|0, p, len, data, size);
     524             : }
     525             : 
     526             : 
     527             : int ASN1CALL
     528           0 : encode_PKCS12_SafeContents(unsigned char *p, size_t len, const PKCS12_SafeContents *data, size_t *size)
     529             : {
     530           0 :     return _asn1_encode(asn1_PKCS12_SafeContents, p, len, data, size);
     531             : }
     532             : 
     533             : 
     534             : size_t ASN1CALL
     535           0 : length_PKCS12_SafeContents(const PKCS12_SafeContents *data)
     536             : {
     537           0 :     return _asn1_length(asn1_PKCS12_SafeContents, data);
     538             : }
     539             : 
     540             : 
     541             : void ASN1CALL
     542           0 : free_PKCS12_SafeContents(PKCS12_SafeContents *data)
     543             : {
     544           0 :     _asn1_free_top(asn1_PKCS12_SafeContents, data);
     545           0 : }
     546             : 
     547             : 
     548             : int ASN1CALL
     549           0 : copy_PKCS12_SafeContents(const PKCS12_SafeContents *from, PKCS12_SafeContents *to)
     550             : {
     551           0 :     return _asn1_copy_top(asn1_PKCS12_SafeContents, from, to);
     552             : }
     553             : 
     554             : 
     555             : char * ASN1CALL
     556           0 : print_PKCS12_SafeContents(const PKCS12_SafeContents *data, int flags)
     557             : {
     558           0 :     return _asn1_print_top(asn1_PKCS12_SafeContents, flags, data);
     559             : }
     560             : 
     561             : /* template_members: PKCS12_CertBag exp exp */
     562             : /* tsequence: members isstruct: 1 */
     563             : /* template_members: PKCS12_CertBag exp exp */
     564             : /* generate_template_type: PKCS12_CertBag_tag_certType_14 */
     565             : /* template_members: PKCS12_CertBag exp exp */
     566             : /* generate_template_type: PKCS12_CertBag_tag_certValue_15 */
     567             : /* generate_template_type: PKCS12_CertBag_tag__13 */
     568             : const struct asn1_template asn1_PKCS12_CertBag_tag__13[] = {
     569             : /* 0 */ { 0, sizeof(struct PKCS12_CertBag), ((void *)(uintptr_t)5) },
     570             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OID), offsetof(struct PKCS12_CertBag, certType), asn1_PKCS12_Attribute_tag_attrId_7 },
     571             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0), offsetof(struct PKCS12_CertBag, certValue), asn1_PKCS12_SafeBag_tag_bagValue_11 },
     572             : /* 3 */ { A1_OP_NAME, 0, "PKCS12_CertBag" },
     573             : /* 4 */ { A1_OP_NAME, 0, "certType" },
     574             : /* 5 */ { A1_OP_NAME, 0, "certValue" }
     575             : };
     576             : /* generate_template_type: PKCS12_CertBag */
     577             : const struct asn1_template asn1_PKCS12_CertBag[] = {
     578             : /* 0 */ { 0, sizeof(PKCS12_CertBag), ((void *)(uintptr_t)1) },
     579             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_CertBag_tag__13 }
     580             : };
     581             : 
     582             : int ASN1CALL
     583           0 : decode_PKCS12_CertBag(const unsigned char *p, size_t len, PKCS12_CertBag *data, size_t *size)
     584             : {
     585           0 :     memset(data, 0, sizeof(*data));
     586           0 :     return _asn1_decode_top(asn1_PKCS12_CertBag, 0|0, p, len, data, size);
     587             : }
     588             : 
     589             : 
     590             : int ASN1CALL
     591           0 : encode_PKCS12_CertBag(unsigned char *p, size_t len, const PKCS12_CertBag *data, size_t *size)
     592             : {
     593           0 :     return _asn1_encode(asn1_PKCS12_CertBag, p, len, data, size);
     594             : }
     595             : 
     596             : 
     597             : size_t ASN1CALL
     598           0 : length_PKCS12_CertBag(const PKCS12_CertBag *data)
     599             : {
     600           0 :     return _asn1_length(asn1_PKCS12_CertBag, data);
     601             : }
     602             : 
     603             : 
     604             : void ASN1CALL
     605           0 : free_PKCS12_CertBag(PKCS12_CertBag *data)
     606             : {
     607           0 :     _asn1_free_top(asn1_PKCS12_CertBag, data);
     608           0 : }
     609             : 
     610             : 
     611             : int ASN1CALL
     612           0 : copy_PKCS12_CertBag(const PKCS12_CertBag *from, PKCS12_CertBag *to)
     613             : {
     614           0 :     return _asn1_copy_top(asn1_PKCS12_CertBag, from, to);
     615             : }
     616             : 
     617             : 
     618             : char * ASN1CALL
     619           0 : print_PKCS12_CertBag(const PKCS12_CertBag *data, int flags)
     620             : {
     621           0 :     return _asn1_print_top(asn1_PKCS12_CertBag, flags, data);
     622             : }
     623             : 
     624             : /* template_members: PKCS12_PBEParams exp exp */
     625             : /* tsequence: members isstruct: 1 */
     626             : /* template_members: PKCS12_PBEParams exp exp */
     627             : /* generate_template_type: PKCS12_PBEParams_tag_salt_17 */
     628             : /* template_members: PKCS12_PBEParams exp exp */
     629             : /* generate_template_type: PKCS12_PBEParams_tag_iterations_18 */
     630             : const struct asn1_template asn1_PKCS12_PBEParams_tag_iterations_18[] = {
     631             : /* 0 */ { 0, sizeof(unsigned), ((void *)(uintptr_t)1) },
     632             : /* 1 */ { A1_PARSE_T(A1T_UNSIGNED), 0, NULL }
     633             : };
     634             : /* generate_template_type: PKCS12_PBEParams_tag__16 */
     635             : const struct asn1_template asn1_PKCS12_PBEParams_tag__16[] = {
     636             : /* 0 */ { 0, sizeof(struct PKCS12_PBEParams), ((void *)(uintptr_t)5) },
     637             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct PKCS12_PBEParams, salt), asn1_PKCS12_MacData_tag_macSalt_1 },
     638             : /* 2 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer)|A1_FLAG_OPTIONAL, offsetof(struct PKCS12_PBEParams, iterations), asn1_PKCS12_PBEParams_tag_iterations_18 },
     639             : /* 3 */ { A1_OP_NAME, 0, "PKCS12_PBEParams" },
     640             : /* 4 */ { A1_OP_NAME, 0, "salt" },
     641             : /* 5 */ { A1_OP_NAME, 0, "iterations" }
     642             : };
     643             : /* generate_template_type: PKCS12_PBEParams */
     644             : const struct asn1_template asn1_PKCS12_PBEParams[] = {
     645             : /* 0 */ { 0, sizeof(PKCS12_PBEParams), ((void *)(uintptr_t)1) },
     646             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_PKCS12_PBEParams_tag__16 }
     647             : };
     648             : 
     649             : int ASN1CALL
     650           0 : decode_PKCS12_PBEParams(const unsigned char *p, size_t len, PKCS12_PBEParams *data, size_t *size)
     651             : {
     652           0 :     memset(data, 0, sizeof(*data));
     653           0 :     return _asn1_decode_top(asn1_PKCS12_PBEParams, 0|0, p, len, data, size);
     654             : }
     655             : 
     656             : 
     657             : int ASN1CALL
     658           0 : encode_PKCS12_PBEParams(unsigned char *p, size_t len, const PKCS12_PBEParams *data, size_t *size)
     659             : {
     660           0 :     return _asn1_encode(asn1_PKCS12_PBEParams, p, len, data, size);
     661             : }
     662             : 
     663             : 
     664             : size_t ASN1CALL
     665           0 : length_PKCS12_PBEParams(const PKCS12_PBEParams *data)
     666             : {
     667           0 :     return _asn1_length(asn1_PKCS12_PBEParams, data);
     668             : }
     669             : 
     670             : 
     671             : void ASN1CALL
     672           0 : free_PKCS12_PBEParams(PKCS12_PBEParams *data)
     673             : {
     674           0 :     _asn1_free_top(asn1_PKCS12_PBEParams, data);
     675           0 : }
     676             : 
     677             : 
     678             : int ASN1CALL
     679           0 : copy_PKCS12_PBEParams(const PKCS12_PBEParams *from, PKCS12_PBEParams *to)
     680             : {
     681           0 :     return _asn1_copy_top(asn1_PKCS12_PBEParams, from, to);
     682             : }
     683             : 
     684             : 
     685             : char * ASN1CALL
     686           0 : print_PKCS12_PBEParams(const PKCS12_PBEParams *data, int flags)
     687             : {
     688           0 :     return _asn1_print_top(asn1_PKCS12_PBEParams, flags, data);
     689             : }
     690             : 
     691             : /* template_members: PKCS12_OctetString exp exp */
     692             : /* generate_template_type: PKCS12_OctetString_tag__19 */
     693             : /* generate_template_type: PKCS12_OctetString */
     694             : const struct asn1_template asn1_PKCS12_OctetString[] = {
     695             : /* 0 */ { 0, sizeof(PKCS12_OctetString), ((void *)(uintptr_t)1) },
     696             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_PKCS12_MacData_tag_macSalt_1 }
     697             : };
     698             : 
     699             : int ASN1CALL
     700           0 : decode_PKCS12_OctetString(const unsigned char *p, size_t len, PKCS12_OctetString *data, size_t *size)
     701             : {
     702           0 :     memset(data, 0, sizeof(*data));
     703           0 :     return _asn1_decode_top(asn1_PKCS12_OctetString, 0|0, p, len, data, size);
     704             : }
     705             : 
     706             : 
     707             : int ASN1CALL
     708           0 : encode_PKCS12_OctetString(unsigned char *p, size_t len, const PKCS12_OctetString *data, size_t *size)
     709             : {
     710           0 :     return _asn1_encode(asn1_PKCS12_OctetString, p, len, data, size);
     711             : }
     712             : 
     713             : 
     714             : size_t ASN1CALL
     715           0 : length_PKCS12_OctetString(const PKCS12_OctetString *data)
     716             : {
     717           0 :     return _asn1_length(asn1_PKCS12_OctetString, data);
     718             : }
     719             : 
     720             : 
     721             : void ASN1CALL
     722           0 : free_PKCS12_OctetString(PKCS12_OctetString *data)
     723             : {
     724           0 :     _asn1_free_top(asn1_PKCS12_OctetString, data);
     725           0 : }
     726             : 
     727             : 
     728             : int ASN1CALL
     729           0 : copy_PKCS12_OctetString(const PKCS12_OctetString *from, PKCS12_OctetString *to)
     730             : {
     731           0 :     return _asn1_copy_top(asn1_PKCS12_OctetString, from, to);
     732             : }
     733             : 
     734             : 
     735             : char * ASN1CALL
     736           0 : print_PKCS12_OctetString(const PKCS12_OctetString *data, int flags)
     737             : {
     738           0 :     return _asn1_print_top(asn1_PKCS12_OctetString, flags, data);
     739             : }
     740             : 

Generated by: LCOV version 1.14