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

          Line data    Source code
       1             : /* Generated from /builds/eaglegai/samba/third_party/heimdal/lib/asn1/kx509.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 "kx509_asn1.h"
      15             : #include "kx509_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_Extensions = {
      23             :         (asn1_type_encode)encode_Extensions,
      24             :         (asn1_type_decode)decode_Extensions,
      25             :         (asn1_type_length)length_Extensions,
      26             :         (asn1_type_copy)copy_Extensions,
      27             :         (asn1_type_release)free_Extensions,
      28             :         (asn1_type_print)print_Extensions,
      29             :         sizeof(Extensions)
      30             : };
      31             : static const struct asn1_type_func asn1_extern_KerberosTime = {
      32             :         (asn1_type_encode)encode_KerberosTime,
      33             :         (asn1_type_decode)decode_KerberosTime,
      34             :         (asn1_type_length)length_KerberosTime,
      35             :         (asn1_type_copy)copy_KerberosTime,
      36             :         (asn1_type_release)free_KerberosTime,
      37             :         (asn1_type_print)print_KerberosTime,
      38             :         sizeof(KerberosTime)
      39             : };
      40             : extern const struct asn1_template asn1_KX509_ERROR_CODE[];
      41             : extern const struct asn1_template asn1_KX509_ERROR_CODE[];
      42             : extern const struct asn1_template asn1_Kx509CSRPlus[];
      43             : extern const struct asn1_template asn1_Kx509Request[];
      44             : extern const struct asn1_template asn1_Kx509ErrorCode[];
      45             : extern const struct asn1_template asn1_Kx509ErrorCode[];
      46             : extern const struct asn1_template asn1_Kx509Response[];
      47             : /* template_members: KX509_ERROR_CODE exp exp */
      48             : const struct asn1_template asn1_KX509_ERROR_CODE_enum_names[] = {
      49             : /* 0 */ { 0, 0, ((void *)(uintptr_t)8) },
      50             : /* 1 */ { A1_OP_NAME, 0, "KX509-STATUS-GOOD" },
      51             : /* 2 */ { A1_OP_NAME, 1, "KX509-STATUS-CLIENT-BAD" },
      52             : /* 3 */ { A1_OP_NAME, 2, "KX509-STATUS-CLIENT-FIX" },
      53             : /* 4 */ { A1_OP_NAME, 3, "KX509-STATUS-CLIENT-TEMP" },
      54             : /* 5 */ { A1_OP_NAME, 4, "KX509-STATUS-SERVER-BAD" },
      55             : /* 6 */ { A1_OP_NAME, 5, "KX509-STATUS-SERVER-TEMP" },
      56             : /* 7 */ { A1_OP_NAME, 7, "KX509-STATUS-SERVER-KEY" },
      57             : /* 8 */ { A1_OP_NAME, 8, "KX509-STATUS-CLIENT-USE-CSR" }
      58             : };
      59             : /* generate_template_type: KX509_ERROR_CODE_tag__0 */
      60             : const struct asn1_template asn1_KX509_ERROR_CODE_tag__0[] = {
      61             : /* 0 */ { 0, sizeof(int), ((void *)(uintptr_t)1) },
      62             : /* 1 */ { A1_PARSE_T(A1T_IMEMBER), 0, asn1_KX509_ERROR_CODE_enum_names }
      63             : };
      64             : /* generate_template_type: KX509_ERROR_CODE */
      65             : const struct asn1_template asn1_KX509_ERROR_CODE[] = {
      66             : /* 0 */ { 0, sizeof(KX509_ERROR_CODE), ((void *)(uintptr_t)1) },
      67             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer), 0, asn1_KX509_ERROR_CODE_tag__0 }
      68             : };
      69             : 
      70             : int ASN1CALL
      71           0 : decode_KX509_ERROR_CODE(const unsigned char *p, size_t len, KX509_ERROR_CODE *data, size_t *size)
      72             : {
      73           0 :     memset(data, 0, sizeof(*data));
      74           0 :     return _asn1_decode_top(asn1_KX509_ERROR_CODE, 0|0, p, len, data, size);
      75             : }
      76             : 
      77             : 
      78             : int ASN1CALL
      79           0 : encode_KX509_ERROR_CODE(unsigned char *p, size_t len, const KX509_ERROR_CODE *data, size_t *size)
      80             : {
      81           0 :     return _asn1_encode(asn1_KX509_ERROR_CODE, p, len, data, size);
      82             : }
      83             : 
      84             : 
      85             : size_t ASN1CALL
      86           0 : length_KX509_ERROR_CODE(const KX509_ERROR_CODE *data)
      87             : {
      88           0 :     return _asn1_length(asn1_KX509_ERROR_CODE, data);
      89             : }
      90             : 
      91             : 
      92             : void ASN1CALL
      93           0 : free_KX509_ERROR_CODE(KX509_ERROR_CODE *data)
      94             : {
      95           0 :     _asn1_free_top(asn1_KX509_ERROR_CODE, data);
      96           0 : }
      97             : 
      98             : 
      99             : int ASN1CALL
     100           0 : copy_KX509_ERROR_CODE(const KX509_ERROR_CODE *from, KX509_ERROR_CODE *to)
     101             : {
     102           0 :     return _asn1_copy_top(asn1_KX509_ERROR_CODE, from, to);
     103             : }
     104             : 
     105             : 
     106             : char * ASN1CALL
     107           0 : print_KX509_ERROR_CODE(const KX509_ERROR_CODE *data, int flags)
     108             : {
     109           0 :     return _asn1_print_top(asn1_KX509_ERROR_CODE, flags, data);
     110             : }
     111             : 
     112             : /* template_members: Kx509CSRPlus exp exp */
     113             : /* template_members: Kx509CSRPlus exp exp */
     114             : /* tsequence: members isstruct: 1 */
     115             : /* template_members: Kx509CSRPlus exp exp */
     116             : /* generate_template_type: Kx509CSRPlus_tag_csr_3 */
     117             : const struct asn1_template asn1_Kx509CSRPlus_tag_csr_3[] = {
     118             : /* 0 */ { 0, sizeof(heim_octet_string), ((void *)(uintptr_t)1) },
     119             : /* 1 */ { A1_PARSE_T(A1T_OCTET_STRING), 0, NULL }
     120             : };
     121             : /* generate_template_type: Kx509CSRPlus_tag__2 */
     122             : const struct asn1_template asn1_Kx509CSRPlus_tag__2[] = {
     123             : /* 0 */ { 0|A1_HF_ELLIPSIS, sizeof(struct Kx509CSRPlus), ((void *)(uintptr_t)8) },
     124             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct Kx509CSRPlus, csr), asn1_Kx509CSRPlus_tag_csr_3 },
     125             : /* 2 */ { A1_OP_TYPE_EXTERN |A1_FLAG_OPTIONAL, offsetof(struct Kx509CSRPlus, exts), &asn1_extern_Extensions},
     126             : /* 3 */ { A1_OP_TYPE_EXTERN |A1_FLAG_OPTIONAL, offsetof(struct Kx509CSRPlus, req_life), &asn1_extern_KerberosTime},
     127             : /* 4 */ { A1_OP_NAME, 0, "Kx509CSRPlus" },
     128             : /* 5 */ { A1_OP_NAME, 0, "csr" },
     129             : /* 6 */ { A1_OP_NAME, 0, "exts" },
     130             : /* 7 */ { A1_OP_NAME, 0, "req-life" },
     131             : /* 8 */ { A1_OP_NAME, 0, "..." }
     132             : };
     133             : /* generate_template_type: Kx509CSRPlus_tag__1 */
     134             : const struct asn1_template asn1_Kx509CSRPlus_tag__1[] = {
     135             : /* 0 */ { 0, sizeof(struct Kx509CSRPlus), ((void *)(uintptr_t)1) },
     136             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_Kx509CSRPlus_tag__2 }
     137             : };
     138             : /* generate_template_type: Kx509CSRPlus */
     139             : const struct asn1_template asn1_Kx509CSRPlus[] = {
     140             : /* 0 */ { 0, sizeof(Kx509CSRPlus), ((void *)(uintptr_t)1) },
     141             : /* 1 */ { A1_TAG_T(ASN1_C_APPL,CONS,35), 0, asn1_Kx509CSRPlus_tag__1 }
     142             : };
     143             : 
     144             : int ASN1CALL
     145           0 : decode_Kx509CSRPlus(const unsigned char *p, size_t len, Kx509CSRPlus *data, size_t *size)
     146             : {
     147           0 :     memset(data, 0, sizeof(*data));
     148           0 :     return _asn1_decode_top(asn1_Kx509CSRPlus, 0|0, p, len, data, size);
     149             : }
     150             : 
     151             : 
     152             : int ASN1CALL
     153           0 : encode_Kx509CSRPlus(unsigned char *p, size_t len, const Kx509CSRPlus *data, size_t *size)
     154             : {
     155           0 :     return _asn1_encode(asn1_Kx509CSRPlus, p, len, data, size);
     156             : }
     157             : 
     158             : 
     159             : size_t ASN1CALL
     160           0 : length_Kx509CSRPlus(const Kx509CSRPlus *data)
     161             : {
     162           0 :     return _asn1_length(asn1_Kx509CSRPlus, data);
     163             : }
     164             : 
     165             : 
     166             : void ASN1CALL
     167           0 : free_Kx509CSRPlus(Kx509CSRPlus *data)
     168             : {
     169           0 :     _asn1_free_top(asn1_Kx509CSRPlus, data);
     170           0 : }
     171             : 
     172             : 
     173             : int ASN1CALL
     174           0 : copy_Kx509CSRPlus(const Kx509CSRPlus *from, Kx509CSRPlus *to)
     175             : {
     176           0 :     return _asn1_copy_top(asn1_Kx509CSRPlus, from, to);
     177             : }
     178             : 
     179             : 
     180             : char * ASN1CALL
     181           0 : print_Kx509CSRPlus(const Kx509CSRPlus *data, int flags)
     182             : {
     183           0 :     return _asn1_print_top(asn1_Kx509CSRPlus, flags, data);
     184             : }
     185             : 
     186             : /* template_members: Kx509Request exp exp */
     187             : /* tsequence: members isstruct: 1 */
     188             : /* template_members: Kx509Request exp exp */
     189             : /* generate_template_type: Kx509Request_tag_authenticator_5 */
     190             : /* template_members: Kx509Request exp exp */
     191             : /* generate_template_type: Kx509Request_tag_pk_hash_6 */
     192             : /* template_members: Kx509Request exp exp */
     193             : /* generate_template_type: Kx509Request_tag_pk_key_7 */
     194             : /* generate_template_type: Kx509Request_tag__4 */
     195             : const struct asn1_template asn1_Kx509Request_tag__4[] = {
     196             : /* 0 */ { 0, sizeof(struct Kx509Request), ((void *)(uintptr_t)7) },
     197             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct Kx509Request, authenticator), asn1_Kx509CSRPlus_tag_csr_3 },
     198             : /* 2 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct Kx509Request, pk_hash), asn1_Kx509CSRPlus_tag_csr_3 },
     199             : /* 3 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), offsetof(struct Kx509Request, pk_key), asn1_Kx509CSRPlus_tag_csr_3 },
     200             : /* 4 */ { A1_OP_NAME, 0, "Kx509Request" },
     201             : /* 5 */ { A1_OP_NAME, 0, "authenticator" },
     202             : /* 6 */ { A1_OP_NAME, 0, "pk-hash" },
     203             : /* 7 */ { A1_OP_NAME, 0, "pk-key" }
     204             : };
     205             : /* generate_template_type: Kx509Request */
     206             : const struct asn1_template asn1_Kx509Request[] = {
     207             : /* 0 */ { 0, sizeof(Kx509Request), ((void *)(uintptr_t)1) },
     208             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_Kx509Request_tag__4 }
     209             : };
     210             : 
     211             : int ASN1CALL
     212           0 : decode_Kx509Request(const unsigned char *p, size_t len, Kx509Request *data, size_t *size)
     213             : {
     214           0 :     memset(data, 0, sizeof(*data));
     215           0 :     return _asn1_decode_top(asn1_Kx509Request, 0|0, p, len, data, size);
     216             : }
     217             : 
     218             : 
     219             : int ASN1CALL
     220           0 : encode_Kx509Request(unsigned char *p, size_t len, const Kx509Request *data, size_t *size)
     221             : {
     222           0 :     return _asn1_encode(asn1_Kx509Request, p, len, data, size);
     223             : }
     224             : 
     225             : 
     226             : size_t ASN1CALL
     227           0 : length_Kx509Request(const Kx509Request *data)
     228             : {
     229           0 :     return _asn1_length(asn1_Kx509Request, data);
     230             : }
     231             : 
     232             : 
     233             : void ASN1CALL
     234           0 : free_Kx509Request(Kx509Request *data)
     235             : {
     236           0 :     _asn1_free_top(asn1_Kx509Request, data);
     237           0 : }
     238             : 
     239             : 
     240             : int ASN1CALL
     241           0 : copy_Kx509Request(const Kx509Request *from, Kx509Request *to)
     242             : {
     243           0 :     return _asn1_copy_top(asn1_Kx509Request, from, to);
     244             : }
     245             : 
     246             : 
     247             : char * ASN1CALL
     248           0 : print_Kx509Request(const Kx509Request *data, int flags)
     249             : {
     250           0 :     return _asn1_print_top(asn1_Kx509Request, flags, data);
     251             : }
     252             : 
     253             : /* template_members: Kx509ErrorCode exp exp */
     254             : /* generate_template_type: Kx509ErrorCode_tag__8 */
     255             : const struct asn1_template asn1_Kx509ErrorCode_tag__8[] = {
     256             : /* 0 */ { 0, sizeof(int), ((void *)(uintptr_t)1) },
     257             : /* 1 */ { A1_PARSE_T(A1T_INTEGER), 0, NULL }
     258             : };
     259             : /* generate_template_type: Kx509ErrorCode */
     260             : const struct asn1_template asn1_Kx509ErrorCode[] = {
     261             : /* 0 */ { 0, sizeof(Kx509ErrorCode), ((void *)(uintptr_t)1) },
     262             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_Integer), 0, asn1_Kx509ErrorCode_tag__8 }
     263             : };
     264             : 
     265             : int ASN1CALL
     266           0 : decode_Kx509ErrorCode(const unsigned char *p, size_t len, Kx509ErrorCode *data, size_t *size)
     267             : {
     268           0 :     memset(data, 0, sizeof(*data));
     269           0 :     return _asn1_decode_top(asn1_Kx509ErrorCode, 0|0, p, len, data, size);
     270             : }
     271             : 
     272             : 
     273             : int ASN1CALL
     274           0 : encode_Kx509ErrorCode(unsigned char *p, size_t len, const Kx509ErrorCode *data, size_t *size)
     275             : {
     276           0 :     return _asn1_encode(asn1_Kx509ErrorCode, p, len, data, size);
     277             : }
     278             : 
     279             : 
     280             : size_t ASN1CALL
     281           0 : length_Kx509ErrorCode(const Kx509ErrorCode *data)
     282             : {
     283           0 :     return _asn1_length(asn1_Kx509ErrorCode, data);
     284             : }
     285             : 
     286             : 
     287             : void ASN1CALL
     288           0 : free_Kx509ErrorCode(Kx509ErrorCode *data)
     289             : {
     290           0 :     _asn1_free_top(asn1_Kx509ErrorCode, data);
     291           0 : }
     292             : 
     293             : 
     294             : int ASN1CALL
     295           0 : copy_Kx509ErrorCode(const Kx509ErrorCode *from, Kx509ErrorCode *to)
     296             : {
     297           0 :     return _asn1_copy_top(asn1_Kx509ErrorCode, from, to);
     298             : }
     299             : 
     300             : 
     301             : char * ASN1CALL
     302           0 : print_Kx509ErrorCode(const Kx509ErrorCode *data, int flags)
     303             : {
     304           0 :     return _asn1_print_top(asn1_Kx509ErrorCode, flags, data);
     305             : }
     306             : 
     307             : /* template_members: Kx509Response exp exp */
     308             : /* tsequence: members isstruct: 1 */
     309             : /* template_members: Kx509Response exp exp */
     310             : /* generate_template_type: Kx509Response_tag_error_code_10 */
     311             : const struct asn1_template asn1_Kx509Response_tag_error_code_10[] = {
     312             : /* 0 */ { 0, sizeof(Kx509ErrorCode), ((void *)(uintptr_t)1) },
     313             : /* 1 */ { A1_OP_TYPE , 0, asn1_Kx509ErrorCode }
     314             : };
     315             : /* template_members: Kx509Response exp exp */
     316             : /* template_members: heim_octet_string exp exp */
     317             : /* generate_template_type: heim_octet_string_tag_hash_12 */
     318             : /* generate_template_type: Kx509Response_tag_hash_11 */
     319             : const struct asn1_template asn1_Kx509Response_tag_hash_11[] = {
     320             : /* 0 */ { 0, sizeof(heim_octet_string), ((void *)(uintptr_t)1) },
     321             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_OctetString), 0, asn1_Kx509CSRPlus_tag_csr_3 }
     322             : };
     323             : /* template_members: Kx509Response exp exp */
     324             : /* template_members: heim_octet_string exp exp */
     325             : /* generate_template_type: heim_octet_string_tag_certificate_14 */
     326             : /* generate_template_type: Kx509Response_tag_certificate_13 */
     327             : /* template_members: Kx509Response exp exp */
     328             : /* template_members: heim_visible_string exp exp */
     329             : /* generate_template_type: heim_visible_string_tag_e_text_16 */
     330             : const struct asn1_template asn1_heim_visible_string_tag_e_text_16[] = {
     331             : /* 0 */ { 0, sizeof(heim_visible_string), ((void *)(uintptr_t)1) },
     332             : /* 1 */ { A1_PARSE_T(A1T_VISIBLE_STRING), 0, NULL }
     333             : };
     334             : /* generate_template_type: Kx509Response_tag_e_text_15 */
     335             : const struct asn1_template asn1_Kx509Response_tag_e_text_15[] = {
     336             : /* 0 */ { 0, sizeof(heim_visible_string), ((void *)(uintptr_t)1) },
     337             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,PRIM,UT_VisibleString), 0, asn1_heim_visible_string_tag_e_text_16 }
     338             : };
     339             : /* generate_template_type: Kx509Response_tag__9 */
     340             : const struct asn1_template asn1_Kx509Response_tag__9[] = {
     341             : /* 0 */ { 0, sizeof(struct Kx509Response), ((void *)(uintptr_t)10) },
     342             : /* 1 */ { A1_OP_DEFVAL|A1_DV_INTEGER32, ~0, (void *)(uintptr_t)0 },
     343             : /* 2 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,0)|A1_FLAG_DEFAULT, offsetof(struct Kx509Response, error_code), asn1_Kx509Response_tag_error_code_10 },
     344             : /* 3 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,1)|A1_FLAG_OPTIONAL, offsetof(struct Kx509Response, hash), asn1_Kx509Response_tag_hash_11 },
     345             : /* 4 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,2)|A1_FLAG_OPTIONAL, offsetof(struct Kx509Response, certificate), asn1_Kx509Response_tag_hash_11 },
     346             : /* 5 */ { A1_TAG_T(ASN1_C_CONTEXT,CONS,3)|A1_FLAG_OPTIONAL, offsetof(struct Kx509Response, e_text), asn1_Kx509Response_tag_e_text_15 },
     347             : /* 6 */ { A1_OP_NAME, 0, "Kx509Response" },
     348             : /* 7 */ { A1_OP_NAME, 0, "error-code" },
     349             : /* 8 */ { A1_OP_NAME, 0, "hash" },
     350             : /* 9 */ { A1_OP_NAME, 0, "certificate" },
     351             : /* 10 */ { A1_OP_NAME, 0, "e-text" }
     352             : };
     353             : /* generate_template_type: Kx509Response */
     354             : const struct asn1_template asn1_Kx509Response[] = {
     355             : /* 0 */ { 0, sizeof(Kx509Response), ((void *)(uintptr_t)1) },
     356             : /* 1 */ { A1_TAG_T(ASN1_C_UNIV,CONS,UT_Sequence), 0, asn1_Kx509Response_tag__9 }
     357             : };
     358             : 
     359             : int ASN1CALL
     360           0 : decode_Kx509Response(const unsigned char *p, size_t len, Kx509Response *data, size_t *size)
     361             : {
     362           0 :     memset(data, 0, sizeof(*data));
     363           0 :     return _asn1_decode_top(asn1_Kx509Response, 0|0, p, len, data, size);
     364             : }
     365             : 
     366             : 
     367             : int ASN1CALL
     368           0 : encode_Kx509Response(unsigned char *p, size_t len, const Kx509Response *data, size_t *size)
     369             : {
     370           0 :     return _asn1_encode(asn1_Kx509Response, p, len, data, size);
     371             : }
     372             : 
     373             : 
     374             : size_t ASN1CALL
     375           0 : length_Kx509Response(const Kx509Response *data)
     376             : {
     377           0 :     return _asn1_length(asn1_Kx509Response, data);
     378             : }
     379             : 
     380             : 
     381             : void ASN1CALL
     382           0 : free_Kx509Response(Kx509Response *data)
     383             : {
     384           0 :     _asn1_free_top(asn1_Kx509Response, data);
     385           0 : }
     386             : 
     387             : 
     388             : int ASN1CALL
     389           0 : copy_Kx509Response(const Kx509Response *from, Kx509Response *to)
     390             : {
     391           0 :     return _asn1_copy_top(asn1_Kx509Response, from, to);
     392             : }
     393             : 
     394             : 
     395             : char * ASN1CALL
     396           0 : print_Kx509Response(const Kx509Response *data, int flags)
     397             : {
     398           0 :     return _asn1_print_top(asn1_Kx509Response, flags, data);
     399             : }
     400             : 

Generated by: LCOV version 1.14