LCOV - code coverage report
Current view: top level - bin/default/librpc/gen_ndr - ndr_gkdi.c (source / functions) Hit Total Coverage
Test: coverage report for vadcx-master-patch-75612 fe003de8 Lines: 271 559 48.5 %
Date: 2024-02-29 22:57:05 Functions: 9 26 34.6 %

          Line data    Source code
       1             : /* parser auto-generated by pidl */
       2             : 
       3             : #include "includes.h"
       4             : #include "bin/default/librpc/gen_ndr/ndr_gkdi.h"
       5             : 
       6             : #include "librpc/gen_ndr/ndr_misc.h"
       7           2 : static enum ndr_err_code ndr_push_EnvelopeFlags(struct ndr_push *ndr, ndr_flags_type ndr_flags, uint32_t r)
       8             : {
       9           2 :         NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r));
      10           0 :         return NDR_ERR_SUCCESS;
      11             : }
      12             : 
      13           2 : static enum ndr_err_code ndr_pull_EnvelopeFlags(struct ndr_pull *ndr, ndr_flags_type ndr_flags, uint32_t *r)
      14             : {
      15           2 :         uint32_t v;
      16           2 :         NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &v));
      17           2 :         *r = v;
      18           2 :         return NDR_ERR_SUCCESS;
      19             : }
      20             : 
      21           0 : _PUBLIC_ void ndr_print_EnvelopeFlags(struct ndr_print *ndr, const char *name, uint32_t r)
      22             : {
      23           0 :         ndr_print_uint32(ndr, name, r);
      24           0 :         ndr->depth++;
      25           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ENVELOPE_FLAG_TRANSPORTING_PUBLIC_KEY", ENVELOPE_FLAG_TRANSPORTING_PUBLIC_KEY, r);
      26           0 :         ndr_print_bitmap_flag(ndr, sizeof(uint32_t), "ENVELOPE_FLAG_KEY_MAY_ENCRYPT_NEW_DATA", ENVELOPE_FLAG_KEY_MAY_ENCRYPT_NEW_DATA, r);
      27           0 :         ndr->depth--;
      28           0 : }
      29             : 
      30           1 : _PUBLIC_ enum ndr_err_code ndr_push_KeyEnvelope(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct KeyEnvelope *r)
      31             : {
      32           1 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
      33           1 :         if (ndr_flags & NDR_SCALARS) {
      34           1 :                 NDR_CHECK(ndr_push_align(ndr, 4));
      35           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
      36           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x4b53444b));
      37           2 :                 NDR_CHECK(ndr_push_EnvelopeFlags(ndr, NDR_SCALARS, r->flags));
      38           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l0_index));
      39           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l1_index));
      40           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l2_index));
      41           1 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->root_key_id));
      42           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->additional_info_len));
      43           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->domain_name, CH_UTF16)));
      44           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->forest_name, CH_UTF16)));
      45             :                 {
      46           1 :                         libndr_flags _flags_save_uint8 = ndr->flags;
      47           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
      48           1 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->additional_info, r->additional_info_len));
      49           1 :                         ndr->flags = _flags_save_uint8;
      50             :                 }
      51             :                 {
      52           1 :                         libndr_flags _flags_save_string = ndr->flags;
      53           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
      54           1 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
      55           1 :                         ndr->flags = _flags_save_string;
      56             :                 }
      57             :                 {
      58           1 :                         libndr_flags _flags_save_string = ndr->flags;
      59           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
      60           1 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->forest_name));
      61           1 :                         ndr->flags = _flags_save_string;
      62             :                 }
      63           1 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
      64             :         }
      65           1 :         if (ndr_flags & NDR_BUFFERS) {
      66           1 :         }
      67           1 :         return NDR_ERR_SUCCESS;
      68             : }
      69             : 
      70           1 : _PUBLIC_ enum ndr_err_code ndr_pull_KeyEnvelope(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct KeyEnvelope *r)
      71             : {
      72           1 :         uint32_t size_additional_info_0 = 0;
      73           1 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
      74           1 :         if (ndr_flags & NDR_SCALARS) {
      75           1 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
      76           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
      77           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
      78           1 :                 if (r->magic < 1263748171 || r->magic > 1263748171) {
      79           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->magic), (uint32_t)(1263748171), (uint32_t)(1263748171));
      80             :                 }
      81           2 :                 NDR_CHECK(ndr_pull_EnvelopeFlags(ndr, NDR_SCALARS, &r->flags));
      82           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l0_index));
      83           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l1_index));
      84           1 :                 if (r->l1_index > 31) {
      85           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->l1_index), (uint32_t)(0), (uint32_t)(31));
      86             :                 }
      87           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l2_index));
      88           1 :                 if (r->l2_index > 31) {
      89           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->l2_index), (uint32_t)(0), (uint32_t)(31));
      90             :                 }
      91           1 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->root_key_id));
      92           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->additional_info_len));
      93           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->domain_name_len));
      94           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_name_len));
      95             :                 {
      96           1 :                         libndr_flags _flags_save_uint8 = ndr->flags;
      97           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
      98           1 :                         size_additional_info_0 = r->additional_info_len;
      99           1 :                         NDR_PULL_ALLOC_N(ndr, r->additional_info, size_additional_info_0);
     100           1 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->additional_info, size_additional_info_0));
     101           1 :                         ndr->flags = _flags_save_uint8;
     102             :                 }
     103             :                 {
     104           1 :                         libndr_flags _flags_save_string = ndr->flags;
     105           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     106           1 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
     107           1 :                         ndr->flags = _flags_save_string;
     108             :                 }
     109             :                 {
     110           1 :                         libndr_flags _flags_save_string = ndr->flags;
     111           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     112           1 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->forest_name));
     113           1 :                         ndr->flags = _flags_save_string;
     114             :                 }
     115           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     116             :         }
     117           1 :         if (ndr_flags & NDR_BUFFERS) {
     118           1 :         }
     119           1 :         return NDR_ERR_SUCCESS;
     120             : }
     121             : 
     122           0 : static void ndr_print_flags_KeyEnvelope(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct KeyEnvelope *r)
     123             : {
     124           0 :         ndr_print_KeyEnvelope(ndr, name, r);
     125           0 : }
     126             : 
     127           0 : _PUBLIC_ void ndr_print_KeyEnvelope(struct ndr_print *ndr, const char *name, const struct KeyEnvelope *r)
     128             : {
     129           0 :         ndr_print_struct(ndr, name, "KeyEnvelope");
     130           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     131           0 :         ndr->depth++;
     132           0 :         ndr_print_uint32(ndr, "version", r->version);
     133           0 :         ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x4b53444b:r->magic);
     134           0 :         ndr_print_EnvelopeFlags(ndr, "flags", r->flags);
     135           0 :         ndr_print_uint32(ndr, "l0_index", r->l0_index);
     136           0 :         ndr_print_uint32(ndr, "l1_index", r->l1_index);
     137           0 :         ndr_print_uint32(ndr, "l2_index", r->l2_index);
     138           0 :         ndr_print_GUID(ndr, "root_key_id", &r->root_key_id);
     139           0 :         ndr_print_uint32(ndr, "additional_info_len", r->additional_info_len);
     140           0 :         ndr_print_uint32(ndr, "domain_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->domain_name, CH_UTF16):r->domain_name_len);
     141           0 :         ndr_print_uint32(ndr, "forest_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->forest_name, CH_UTF16):r->forest_name_len);
     142             :         {
     143           0 :                 libndr_flags _flags_save_uint8 = ndr->flags;
     144           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     145           0 :                 ndr_print_array_uint8(ndr, "additional_info", r->additional_info, r->additional_info_len);
     146           0 :                 ndr->flags = _flags_save_uint8;
     147             :         }
     148             :         {
     149           0 :                 libndr_flags _flags_save_string = ndr->flags;
     150           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     151           0 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
     152           0 :                 ndr->flags = _flags_save_string;
     153             :         }
     154             :         {
     155           0 :                 libndr_flags _flags_save_string = ndr->flags;
     156           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     157           0 :                 ndr_print_string(ndr, "forest_name", r->forest_name);
     158           0 :                 ndr->flags = _flags_save_string;
     159             :         }
     160           0 :         ndr->depth--;
     161             : }
     162             : 
     163           1 : _PUBLIC_ enum ndr_err_code ndr_push_GroupKeyEnvelope(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct GroupKeyEnvelope *r)
     164             : {
     165           1 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     166           1 :         if (ndr_flags & NDR_SCALARS) {
     167           1 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     168           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
     169           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x4b53444b));
     170           2 :                 NDR_CHECK(ndr_push_EnvelopeFlags(ndr, NDR_SCALARS, r->flags));
     171           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l0_index));
     172           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l1_index));
     173           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l2_index));
     174           1 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->root_key_id));
     175           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->kdf_algorithm, CH_UTF16)));
     176           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->kdf_parameters_len));
     177           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->secret_agreement_algorithm, CH_UTF16)));
     178           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secret_agreement_parameters_len));
     179           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->private_key_len));
     180           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->public_key_len));
     181           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l1_key_len));
     182           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->l2_key_len));
     183           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->domain_name, CH_UTF16)));
     184           1 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->forest_name, CH_UTF16)));
     185             :                 {
     186           1 :                         libndr_flags _flags_save_string = ndr->flags;
     187           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     188           1 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->kdf_algorithm));
     189           1 :                         ndr->flags = _flags_save_string;
     190             :                 }
     191           1 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->kdf_parameters, r->kdf_parameters_len));
     192             :                 {
     193           1 :                         libndr_flags _flags_save_string = ndr->flags;
     194           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     195           1 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->secret_agreement_algorithm));
     196           1 :                         ndr->flags = _flags_save_string;
     197             :                 }
     198           1 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->secret_agreement_parameters, r->secret_agreement_parameters_len));
     199             :                 {
     200           1 :                         libndr_flags _flags_save_string = ndr->flags;
     201           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     202           1 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->domain_name));
     203           1 :                         ndr->flags = _flags_save_string;
     204             :                 }
     205             :                 {
     206           1 :                         libndr_flags _flags_save_string = ndr->flags;
     207           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     208           1 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->forest_name));
     209           1 :                         ndr->flags = _flags_save_string;
     210             :                 }
     211             :                 {
     212           1 :                         libndr_flags _flags_save_uint8 = ndr->flags;
     213           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     214           1 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->l1_key, r->l1_key_len));
     215           1 :                         ndr->flags = _flags_save_uint8;
     216             :                 }
     217             :                 {
     218           1 :                         libndr_flags _flags_save_uint8 = ndr->flags;
     219           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     220           1 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->l2_key, r->l2_key_len));
     221           1 :                         ndr->flags = _flags_save_uint8;
     222             :                 }
     223           1 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     224             :         }
     225           1 :         if (ndr_flags & NDR_BUFFERS) {
     226           1 :         }
     227           1 :         return NDR_ERR_SUCCESS;
     228             : }
     229             : 
     230           1 : _PUBLIC_ enum ndr_err_code ndr_pull_GroupKeyEnvelope(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct GroupKeyEnvelope *r)
     231             : {
     232           1 :         uint32_t size_kdf_parameters_0 = 0;
     233           1 :         uint32_t size_secret_agreement_parameters_0 = 0;
     234           1 :         uint32_t size_l1_key_0 = 0;
     235           1 :         uint32_t size_l2_key_0 = 0;
     236           1 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     237           1 :         if (ndr_flags & NDR_SCALARS) {
     238           1 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     239           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
     240           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
     241           1 :                 if (r->magic < 1263748171 || r->magic > 1263748171) {
     242           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->magic), (uint32_t)(1263748171), (uint32_t)(1263748171));
     243             :                 }
     244           2 :                 NDR_CHECK(ndr_pull_EnvelopeFlags(ndr, NDR_SCALARS, &r->flags));
     245           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l0_index));
     246           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l1_index));
     247           1 :                 if (r->l1_index > 31) {
     248           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->l1_index), (uint32_t)(0), (uint32_t)(31));
     249             :                 }
     250           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l2_index));
     251           1 :                 if (r->l2_index > 31) {
     252           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->l2_index), (uint32_t)(0), (uint32_t)(31));
     253             :                 }
     254           1 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->root_key_id));
     255           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->kdf_algorithm_len));
     256           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->kdf_parameters_len));
     257           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_agreement_algorithm_len));
     258           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_agreement_parameters_len));
     259           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->private_key_len));
     260           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->public_key_len));
     261           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l1_key_len));
     262           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->l2_key_len));
     263           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->domain_name_len));
     264           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->forest_name_len));
     265             :                 {
     266           1 :                         libndr_flags _flags_save_string = ndr->flags;
     267           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     268           1 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->kdf_algorithm));
     269           1 :                         ndr->flags = _flags_save_string;
     270             :                 }
     271           1 :                 size_kdf_parameters_0 = r->kdf_parameters_len;
     272           1 :                 NDR_PULL_ALLOC_N(ndr, r->kdf_parameters, size_kdf_parameters_0);
     273           1 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->kdf_parameters, size_kdf_parameters_0));
     274             :                 {
     275           1 :                         libndr_flags _flags_save_string = ndr->flags;
     276           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     277           1 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->secret_agreement_algorithm));
     278           1 :                         ndr->flags = _flags_save_string;
     279             :                 }
     280           1 :                 size_secret_agreement_parameters_0 = r->secret_agreement_parameters_len;
     281           1 :                 NDR_PULL_ALLOC_N(ndr, r->secret_agreement_parameters, size_secret_agreement_parameters_0);
     282           1 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->secret_agreement_parameters, size_secret_agreement_parameters_0));
     283             :                 {
     284           1 :                         libndr_flags _flags_save_string = ndr->flags;
     285           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     286           1 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->domain_name));
     287           1 :                         ndr->flags = _flags_save_string;
     288             :                 }
     289             :                 {
     290           1 :                         libndr_flags _flags_save_string = ndr->flags;
     291           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     292           1 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->forest_name));
     293           1 :                         ndr->flags = _flags_save_string;
     294             :                 }
     295             :                 {
     296           1 :                         libndr_flags _flags_save_uint8 = ndr->flags;
     297           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     298           1 :                         size_l1_key_0 = r->l1_key_len;
     299           1 :                         NDR_PULL_ALLOC_N(ndr, r->l1_key, size_l1_key_0);
     300           1 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->l1_key, size_l1_key_0));
     301           1 :                         ndr->flags = _flags_save_uint8;
     302             :                 }
     303             :                 {
     304           1 :                         libndr_flags _flags_save_uint8 = ndr->flags;
     305           1 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     306           1 :                         size_l2_key_0 = r->l2_key_len;
     307           1 :                         NDR_PULL_ALLOC_N(ndr, r->l2_key, size_l2_key_0);
     308           1 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->l2_key, size_l2_key_0));
     309           1 :                         ndr->flags = _flags_save_uint8;
     310             :                 }
     311           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     312             :         }
     313           1 :         if (ndr_flags & NDR_BUFFERS) {
     314           1 :         }
     315           1 :         return NDR_ERR_SUCCESS;
     316             : }
     317             : 
     318           0 : static void ndr_print_flags_GroupKeyEnvelope(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct GroupKeyEnvelope *r)
     319             : {
     320           0 :         ndr_print_GroupKeyEnvelope(ndr, name, r);
     321           0 : }
     322             : 
     323           0 : _PUBLIC_ void ndr_print_GroupKeyEnvelope(struct ndr_print *ndr, const char *name, const struct GroupKeyEnvelope *r)
     324             : {
     325           0 :         ndr_print_struct(ndr, name, "GroupKeyEnvelope");
     326           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     327           0 :         ndr->depth++;
     328           0 :         ndr_print_uint32(ndr, "version", r->version);
     329           0 :         ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x4b53444b:r->magic);
     330           0 :         ndr_print_EnvelopeFlags(ndr, "flags", r->flags);
     331           0 :         ndr_print_uint32(ndr, "l0_index", r->l0_index);
     332           0 :         ndr_print_uint32(ndr, "l1_index", r->l1_index);
     333           0 :         ndr_print_uint32(ndr, "l2_index", r->l2_index);
     334           0 :         ndr_print_GUID(ndr, "root_key_id", &r->root_key_id);
     335           0 :         ndr_print_uint32(ndr, "kdf_algorithm_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->kdf_algorithm, CH_UTF16):r->kdf_algorithm_len);
     336           0 :         ndr_print_uint32(ndr, "kdf_parameters_len", r->kdf_parameters_len);
     337           0 :         ndr_print_uint32(ndr, "secret_agreement_algorithm_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->secret_agreement_algorithm, CH_UTF16):r->secret_agreement_algorithm_len);
     338           0 :         ndr_print_uint32(ndr, "secret_agreement_parameters_len", r->secret_agreement_parameters_len);
     339           0 :         ndr_print_uint32(ndr, "private_key_len", r->private_key_len);
     340           0 :         ndr_print_uint32(ndr, "public_key_len", r->public_key_len);
     341           0 :         ndr_print_uint32(ndr, "l1_key_len", r->l1_key_len);
     342           0 :         ndr_print_uint32(ndr, "l2_key_len", r->l2_key_len);
     343           0 :         ndr_print_uint32(ndr, "domain_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->domain_name, CH_UTF16):r->domain_name_len);
     344           0 :         ndr_print_uint32(ndr, "forest_name_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->forest_name, CH_UTF16):r->forest_name_len);
     345             :         {
     346           0 :                 libndr_flags _flags_save_string = ndr->flags;
     347           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     348           0 :                 ndr_print_string(ndr, "kdf_algorithm", r->kdf_algorithm);
     349           0 :                 ndr->flags = _flags_save_string;
     350             :         }
     351           0 :         ndr_print_array_uint8(ndr, "kdf_parameters", r->kdf_parameters, r->kdf_parameters_len);
     352             :         {
     353           0 :                 libndr_flags _flags_save_string = ndr->flags;
     354           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     355           0 :                 ndr_print_string(ndr, "secret_agreement_algorithm", r->secret_agreement_algorithm);
     356           0 :                 ndr->flags = _flags_save_string;
     357             :         }
     358           0 :         ndr_print_array_uint8(ndr, "secret_agreement_parameters", r->secret_agreement_parameters, r->secret_agreement_parameters_len);
     359             :         {
     360           0 :                 libndr_flags _flags_save_string = ndr->flags;
     361           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     362           0 :                 ndr_print_string(ndr, "domain_name", r->domain_name);
     363           0 :                 ndr->flags = _flags_save_string;
     364             :         }
     365             :         {
     366           0 :                 libndr_flags _flags_save_string = ndr->flags;
     367           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     368           0 :                 ndr_print_string(ndr, "forest_name", r->forest_name);
     369           0 :                 ndr->flags = _flags_save_string;
     370             :         }
     371             :         {
     372           0 :                 libndr_flags _flags_save_uint8 = ndr->flags;
     373           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     374           0 :                 ndr_print_array_uint8(ndr, "l1_key", r->l1_key, r->l1_key_len);
     375           0 :                 ndr->flags = _flags_save_uint8;
     376             :         }
     377             :         {
     378           0 :                 libndr_flags _flags_save_uint8 = ndr->flags;
     379           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_IS_SECRET);
     380           0 :                 ndr_print_array_uint8(ndr, "l2_key", r->l2_key, r->l2_key_len);
     381           0 :                 ndr->flags = _flags_save_uint8;
     382             :         }
     383           0 :         ndr->depth--;
     384             : }
     385             : 
     386          41 : _PUBLIC_ enum ndr_err_code ndr_push_KdfParameters(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct KdfParameters *r)
     387             : {
     388          41 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     389          41 :         if (ndr_flags & NDR_SCALARS) {
     390          41 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     391          41 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     392          41 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 1));
     393          41 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 2 * ndr_charset_length(r->hash_algorithm, CH_UTF16)));
     394          41 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0));
     395             :                 {
     396          41 :                         libndr_flags _flags_save_string = ndr->flags;
     397          41 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     398          41 :                         NDR_CHECK(ndr_push_string(ndr, NDR_SCALARS, r->hash_algorithm));
     399          41 :                         ndr->flags = _flags_save_string;
     400             :                 }
     401          41 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     402             :         }
     403          41 :         if (ndr_flags & NDR_BUFFERS) {
     404           1 :         }
     405          41 :         return NDR_ERR_SUCCESS;
     406             : }
     407             : 
     408          29 : _PUBLIC_ enum ndr_err_code ndr_pull_KdfParameters(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct KdfParameters *r)
     409             : {
     410          29 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     411          29 :         if (ndr_flags & NDR_SCALARS) {
     412          29 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     413          29 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding_0));
     414          29 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding_1));
     415          29 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->hash_algorithm_len));
     416          29 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->padding_2));
     417             :                 {
     418          29 :                         libndr_flags _flags_save_string = ndr->flags;
     419          29 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     420          29 :                         NDR_CHECK(ndr_pull_string(ndr, NDR_SCALARS, &r->hash_algorithm));
     421          29 :                         ndr->flags = _flags_save_string;
     422             :                 }
     423          29 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     424             :         }
     425          29 :         if (ndr_flags & NDR_BUFFERS) {
     426           1 :         }
     427          29 :         return NDR_ERR_SUCCESS;
     428             : }
     429             : 
     430           0 : static void ndr_print_flags_KdfParameters(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct KdfParameters *r)
     431             : {
     432           0 :         ndr_print_KdfParameters(ndr, name, r);
     433           0 : }
     434             : 
     435           0 : _PUBLIC_ void ndr_print_KdfParameters(struct ndr_print *ndr, const char *name, const struct KdfParameters *r)
     436             : {
     437           0 :         ndr_print_struct(ndr, name, "KdfParameters");
     438           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     439           0 :         ndr->depth++;
     440           0 :         ndr_print_uint32(ndr, "padding_0", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding_0);
     441           0 :         ndr_print_uint32(ndr, "padding_1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?1:r->padding_1);
     442           0 :         ndr_print_uint32(ndr, "hash_algorithm_len", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?2 * ndr_charset_length(r->hash_algorithm, CH_UTF16):r->hash_algorithm_len);
     443           0 :         ndr_print_uint32(ndr, "padding_2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0:r->padding_2);
     444             :         {
     445           0 :                 libndr_flags _flags_save_string = ndr->flags;
     446           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_STR_NULLTERM|LIBNDR_FLAG_ALIGN2);
     447           0 :                 ndr_print_string(ndr, "hash_algorithm", r->hash_algorithm);
     448           0 :                 ndr->flags = _flags_save_string;
     449             :         }
     450           0 :         ndr->depth--;
     451             : }
     452             : 
     453          43 : _PUBLIC_ enum ndr_err_code ndr_push_FfcDhParameters(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct FfcDhParameters *r)
     454             : {
     455          43 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     456          43 :         if (ndr_flags & NDR_SCALARS) {
     457          43 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     458          43 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 12 + 2 * r->key_length));
     459          43 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x4d504844));
     460          43 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->key_length));
     461          43 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->field_order, r->key_length));
     462          43 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->generator, r->key_length));
     463          43 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     464             :         }
     465          43 :         if (ndr_flags & NDR_BUFFERS) {
     466           1 :         }
     467          43 :         return NDR_ERR_SUCCESS;
     468             : }
     469             : 
     470           1 : _PUBLIC_ enum ndr_err_code ndr_pull_FfcDhParameters(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct FfcDhParameters *r)
     471             : {
     472           1 :         uint32_t size_field_order_0 = 0;
     473           1 :         uint32_t size_generator_0 = 0;
     474           1 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     475           1 :         if (ndr_flags & NDR_SCALARS) {
     476           1 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     477           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->length));
     478           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
     479           1 :                 if (r->magic < 1297107012 || r->magic > 1297107012) {
     480           0 :                         return ndr_pull_error(ndr, NDR_ERR_RANGE, "value (%"PRIu32") out of range (%"PRIu32" - %"PRIu32")", (uint32_t)(r->magic), (uint32_t)(1297107012), (uint32_t)(1297107012));
     481             :                 }
     482           1 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->key_length));
     483           1 :                 size_field_order_0 = r->key_length;
     484           1 :                 NDR_PULL_ALLOC_N(ndr, r->field_order, size_field_order_0);
     485           1 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->field_order, size_field_order_0));
     486           1 :                 size_generator_0 = r->key_length;
     487           1 :                 NDR_PULL_ALLOC_N(ndr, r->generator, size_generator_0);
     488           1 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->generator, size_generator_0));
     489           1 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     490             :         }
     491           1 :         if (ndr_flags & NDR_BUFFERS) {
     492           1 :         }
     493           1 :         return NDR_ERR_SUCCESS;
     494             : }
     495             : 
     496           0 : static void ndr_print_flags_FfcDhParameters(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct FfcDhParameters *r)
     497             : {
     498           0 :         ndr_print_FfcDhParameters(ndr, name, r);
     499           0 : }
     500             : 
     501           0 : _PUBLIC_ void ndr_print_FfcDhParameters(struct ndr_print *ndr, const char *name, const struct FfcDhParameters *r)
     502             : {
     503           0 :         ndr_print_struct(ndr, name, "FfcDhParameters");
     504           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     505           0 :         ndr->depth++;
     506           0 :         ndr_print_uint32(ndr, "length", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?12 + 2 * r->key_length:r->length);
     507           0 :         ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x4d504844:r->magic);
     508           0 :         ndr_print_uint32(ndr, "key_length", r->key_length);
     509           0 :         ndr_print_array_uint8(ndr, "field_order", r->field_order, r->key_length);
     510           0 :         ndr_print_array_uint8(ndr, "generator", r->generator, r->key_length);
     511           0 :         ndr->depth--;
     512             : }
     513             : 
     514         336 : _PUBLIC_ enum ndr_err_code ndr_push_GkdiDerivationCtx(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct GkdiDerivationCtx *r)
     515             : {
     516         336 :         NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
     517         336 :         if (ndr_flags & NDR_SCALARS) {
     518         336 :                 NDR_CHECK(ndr_push_align(ndr, 4));
     519         336 :                 NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
     520         336 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->l0_idx));
     521         336 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->l1_idx));
     522         336 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->l2_idx));
     523             :                 {
     524         336 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     525         336 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     526         336 :                         NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->target_security_descriptor));
     527         336 :                         ndr->flags = _flags_save_DATA_BLOB;
     528             :                 }
     529         336 :                 NDR_CHECK(ndr_push_trailer_align(ndr, 4));
     530             :         }
     531         336 :         if (ndr_flags & NDR_BUFFERS) {
     532         336 :         }
     533         336 :         return NDR_ERR_SUCCESS;
     534             : }
     535             : 
     536           0 : _PUBLIC_ enum ndr_err_code ndr_pull_GkdiDerivationCtx(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct GkdiDerivationCtx *r)
     537             : {
     538           0 :         NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
     539           0 :         if (ndr_flags & NDR_SCALARS) {
     540           0 :                 NDR_CHECK(ndr_pull_align(ndr, 4));
     541           0 :                 NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
     542           0 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->l0_idx));
     543           0 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->l1_idx));
     544           0 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->l2_idx));
     545             :                 {
     546           0 :                         libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     547           0 :                         ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     548           0 :                         NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->target_security_descriptor));
     549           0 :                         ndr->flags = _flags_save_DATA_BLOB;
     550             :                 }
     551           0 :                 NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
     552             :         }
     553           0 :         if (ndr_flags & NDR_BUFFERS) {
     554           0 :         }
     555           0 :         return NDR_ERR_SUCCESS;
     556             : }
     557             : 
     558           0 : static void ndr_print_flags_GkdiDerivationCtx(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct GkdiDerivationCtx *r)
     559             : {
     560           0 :         ndr_print_GkdiDerivationCtx(ndr, name, r);
     561           0 : }
     562             : 
     563           0 : _PUBLIC_ void ndr_print_GkdiDerivationCtx(struct ndr_print *ndr, const char *name, const struct GkdiDerivationCtx *r)
     564             : {
     565           0 :         ndr_print_struct(ndr, name, "GkdiDerivationCtx");
     566           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     567           0 :         ndr->depth++;
     568           0 :         ndr_print_GUID(ndr, "guid", &r->guid);
     569           0 :         ndr_print_int32(ndr, "l0_idx", r->l0_idx);
     570           0 :         ndr_print_int32(ndr, "l1_idx", r->l1_idx);
     571           0 :         ndr_print_int32(ndr, "l2_idx", r->l2_idx);
     572             :         {
     573           0 :                 libndr_flags _flags_save_DATA_BLOB = ndr->flags;
     574           0 :                 ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
     575           0 :                 ndr_print_DATA_BLOB(ndr, "target_security_descriptor", r->target_security_descriptor);
     576           0 :                 ndr->flags = _flags_save_DATA_BLOB;
     577             :         }
     578           0 :         ndr->depth--;
     579             : }
     580             : 
     581           0 : static enum ndr_err_code ndr_push_gkdi_GetKey(struct ndr_push *ndr, ndr_flags_type flags, const struct gkdi_GetKey *r)
     582             : {
     583           0 :         NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
     584           0 :         if (flags & NDR_IN) {
     585           0 :                 if (r->in.target_sd == NULL) {
     586           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     587             :                 }
     588           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.target_sd_len));
     589           0 :                 NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.target_sd_len));
     590           0 :                 NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.target_sd, r->in.target_sd_len));
     591           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, r->in.root_key_id));
     592           0 :                 if (r->in.root_key_id) {
     593           0 :                         NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.root_key_id));
     594             :                 }
     595           0 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->in.l0_key_id));
     596           0 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->in.l1_key_id));
     597           0 :                 NDR_CHECK(ndr_push_int32(ndr, NDR_SCALARS, r->in.l2_key_id));
     598             :         }
     599           0 :         if (flags & NDR_OUT) {
     600           0 :                 if (r->out.out_len == NULL) {
     601           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     602             :                 }
     603           0 :                 if (r->out.out == NULL) {
     604           0 :                         return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
     605             :                 }
     606           0 :                 NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.out_len));
     607           0 :                 NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.out));
     608           0 :                 if (*r->out.out) {
     609           0 :                         NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.out_len));
     610           0 :                         NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.out, *r->out.out_len));
     611             :                 }
     612           0 :                 NDR_CHECK(ndr_push_HRESULT(ndr, NDR_SCALARS, r->out.result));
     613             :         }
     614           0 :         return NDR_ERR_SUCCESS;
     615             : }
     616             : 
     617           0 : static enum ndr_err_code ndr_pull_gkdi_GetKey(struct ndr_pull *ndr, ndr_flags_type flags, struct gkdi_GetKey *r)
     618             : {
     619           0 :         uint32_t size_target_sd_1 = 0;
     620           0 :         uint32_t _ptr_root_key_id;
     621           0 :         uint32_t _ptr_out;
     622           0 :         uint32_t size_out_2 = 0;
     623           0 :         TALLOC_CTX *_mem_save_root_key_id_0 = NULL;
     624           0 :         TALLOC_CTX *_mem_save_out_len_0 = NULL;
     625           0 :         TALLOC_CTX *_mem_save_out_0 = NULL;
     626           0 :         TALLOC_CTX *_mem_save_out_1 = NULL;
     627           0 :         NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
     628           0 :         if (flags & NDR_IN) {
     629           0 :                 NDR_ZERO_STRUCT(r->out);
     630             : 
     631           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.target_sd_len));
     632           0 :                 NDR_CHECK(ndr_pull_array_size(ndr, &r->in.target_sd));
     633           0 :                 NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.target_sd, &size_target_sd_1));
     634           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     635           0 :                         NDR_PULL_ALLOC_N(ndr, r->in.target_sd, size_target_sd_1);
     636             :                 }
     637           0 :                 NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.target_sd, size_target_sd_1));
     638           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_root_key_id));
     639           0 :                 if (_ptr_root_key_id) {
     640           0 :                         NDR_PULL_ALLOC(ndr, r->in.root_key_id);
     641             :                 } else {
     642           0 :                         r->in.root_key_id = NULL;
     643             :                 }
     644           0 :                 if (r->in.root_key_id) {
     645           0 :                         _mem_save_root_key_id_0 = NDR_PULL_GET_MEM_CTX(ndr);
     646           0 :                         NDR_PULL_SET_MEM_CTX(ndr, r->in.root_key_id, 0);
     647           0 :                         NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.root_key_id));
     648           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_root_key_id_0, 0);
     649             :                 }
     650           0 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->in.l0_key_id));
     651           0 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->in.l1_key_id));
     652           0 :                 NDR_CHECK(ndr_pull_int32(ndr, NDR_SCALARS, &r->in.l2_key_id));
     653           0 :                 NDR_PULL_ALLOC(ndr, r->out.out_len);
     654           0 :                 NDR_ZERO_STRUCTP(r->out.out_len);
     655           0 :                 NDR_PULL_ALLOC(ndr, r->out.out);
     656           0 :                 NDR_ZERO_STRUCTP(r->out.out);
     657           0 :                 if (r->in.target_sd) {
     658           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.target_sd, r->in.target_sd_len));
     659             :                 }
     660             :         }
     661           0 :         if (flags & NDR_OUT) {
     662             : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
     663             : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
     664           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     665           0 :                         NDR_PULL_ALLOC(ndr, r->out.out_len);
     666             :                 }
     667           0 :                 _mem_save_out_len_0 = NDR_PULL_GET_MEM_CTX(ndr);
     668           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.out_len, LIBNDR_FLAG_REF_ALLOC);
     669           0 :                 NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.out_len));
     670           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_len_0, LIBNDR_FLAG_REF_ALLOC);
     671           0 :                 if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
     672           0 :                         NDR_PULL_ALLOC(ndr, r->out.out);
     673             :                 }
     674           0 :                 _mem_save_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
     675           0 :                 NDR_PULL_SET_MEM_CTX(ndr, r->out.out, LIBNDR_FLAG_REF_ALLOC);
     676           0 :                 NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_out));
     677           0 :                 if (_ptr_out) {
     678           0 :                         NDR_PULL_ALLOC(ndr, *r->out.out);
     679             :                 } else {
     680           0 :                         *r->out.out = NULL;
     681             :                 }
     682           0 :                 if (*r->out.out) {
     683           0 :                         _mem_save_out_1 = NDR_PULL_GET_MEM_CTX(ndr);
     684           0 :                         NDR_PULL_SET_MEM_CTX(ndr, *r->out.out, 0);
     685           0 :                         NDR_CHECK(ndr_pull_array_size(ndr, r->out.out));
     686           0 :                         NDR_CHECK(ndr_get_array_size(ndr, (void*)r->out.out, &size_out_2));
     687           0 :                         NDR_PULL_ALLOC_N(ndr, *r->out.out, size_out_2);
     688           0 :                         NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.out, size_out_2));
     689           0 :                         NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_1, 0);
     690             :                 }
     691           0 :                 NDR_PULL_SET_MEM_CTX(ndr, _mem_save_out_0, LIBNDR_FLAG_REF_ALLOC);
     692           0 :                 NDR_CHECK(ndr_pull_HRESULT(ndr, NDR_SCALARS, &r->out.result));
     693           0 :                 if (*r->out.out) {
     694           0 :                         NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)r->out.out, *r->out.out_len));
     695             :                 }
     696             :         }
     697           0 :         return NDR_ERR_SUCCESS;
     698             : }
     699             : 
     700           0 : _PUBLIC_ void ndr_print_gkdi_GetKey(struct ndr_print *ndr, const char *name, ndr_flags_type flags, const struct gkdi_GetKey *r)
     701             : {
     702           0 :         ndr_print_struct(ndr, name, "gkdi_GetKey");
     703           0 :         if (r == NULL) { ndr_print_null(ndr); return; }
     704           0 :         ndr->depth++;
     705           0 :         if (flags & NDR_SET_VALUES) {
     706           0 :                 ndr->flags |= LIBNDR_PRINT_SET_VALUES;
     707             :         }
     708           0 :         if (flags & NDR_IN) {
     709           0 :                 ndr_print_struct(ndr, "in", "gkdi_GetKey");
     710           0 :                 ndr->depth++;
     711           0 :                 ndr_print_uint32(ndr, "target_sd_len", r->in.target_sd_len);
     712           0 :                 ndr_print_ptr(ndr, "target_sd", r->in.target_sd);
     713           0 :                 ndr->depth++;
     714           0 :                 ndr_print_array_uint8(ndr, "target_sd", r->in.target_sd, r->in.target_sd_len);
     715           0 :                 ndr->depth--;
     716           0 :                 ndr_print_ptr(ndr, "root_key_id", r->in.root_key_id);
     717           0 :                 ndr->depth++;
     718           0 :                 if (r->in.root_key_id) {
     719           0 :                         ndr_print_GUID(ndr, "root_key_id", r->in.root_key_id);
     720             :                 }
     721           0 :                 ndr->depth--;
     722           0 :                 ndr_print_int32(ndr, "l0_key_id", r->in.l0_key_id);
     723           0 :                 ndr_print_int32(ndr, "l1_key_id", r->in.l1_key_id);
     724           0 :                 ndr_print_int32(ndr, "l2_key_id", r->in.l2_key_id);
     725           0 :                 ndr->depth--;
     726             :         }
     727           0 :         if (flags & NDR_OUT) {
     728           0 :                 ndr_print_struct(ndr, "out", "gkdi_GetKey");
     729           0 :                 ndr->depth++;
     730           0 :                 ndr_print_ptr(ndr, "out_len", r->out.out_len);
     731           0 :                 ndr->depth++;
     732           0 :                 ndr_print_uint32(ndr, "out_len", *r->out.out_len);
     733           0 :                 ndr->depth--;
     734           0 :                 ndr_print_ptr(ndr, "out", r->out.out);
     735           0 :                 ndr->depth++;
     736           0 :                 ndr_print_ptr(ndr, "out", *r->out.out);
     737           0 :                 ndr->depth++;
     738           0 :                 if (*r->out.out) {
     739           0 :                         ndr_print_array_uint8(ndr, "out", *r->out.out, *r->out.out_len);
     740             :                 }
     741           0 :                 ndr->depth--;
     742           0 :                 ndr->depth--;
     743           0 :                 ndr_print_HRESULT(ndr, "result", r->out.result);
     744           0 :                 ndr->depth--;
     745             :         }
     746           0 :         ndr->depth--;
     747             : }
     748             : 
     749             : #ifndef SKIP_NDR_TABLE_gkdi
     750             : static const struct ndr_interface_public_struct gkdi_public_structs[] = {
     751             :         {
     752             :                 .name = "KeyEnvelope",
     753             :                 .struct_size = sizeof(struct KeyEnvelope ),
     754             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_KeyEnvelope,
     755             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_KeyEnvelope,
     756             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_KeyEnvelope,
     757             :         },
     758             :         {
     759             :                 .name = "GroupKeyEnvelope",
     760             :                 .struct_size = sizeof(struct GroupKeyEnvelope ),
     761             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_GroupKeyEnvelope,
     762             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_GroupKeyEnvelope,
     763             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_GroupKeyEnvelope,
     764             :         },
     765             :         {
     766             :                 .name = "KdfParameters",
     767             :                 .struct_size = sizeof(struct KdfParameters ),
     768             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_KdfParameters,
     769             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_KdfParameters,
     770             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_KdfParameters,
     771             :         },
     772             :         {
     773             :                 .name = "FfcDhParameters",
     774             :                 .struct_size = sizeof(struct FfcDhParameters ),
     775             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_FfcDhParameters,
     776             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_FfcDhParameters,
     777             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_FfcDhParameters,
     778             :         },
     779             :         {
     780             :                 .name = "GkdiDerivationCtx",
     781             :                 .struct_size = sizeof(struct GkdiDerivationCtx ),
     782             :                 .ndr_push = (ndr_push_flags_fn_t) ndr_push_GkdiDerivationCtx,
     783             :                 .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_GkdiDerivationCtx,
     784             :                 .ndr_print = (ndr_print_function_t) ndr_print_flags_GkdiDerivationCtx,
     785             :         },
     786             :         { .name = NULL }
     787             : };
     788             : 
     789             : static const struct ndr_interface_call gkdi_calls[] = {
     790             :         {
     791             :                 "gkdi_GetKey",
     792             :                 sizeof(struct gkdi_GetKey),
     793             :                 (ndr_push_flags_fn_t) ndr_push_gkdi_GetKey,
     794             :                 (ndr_pull_flags_fn_t) ndr_pull_gkdi_GetKey,
     795             :                 (ndr_print_function_t) ndr_print_gkdi_GetKey,
     796             :                 { 0, NULL },
     797             :                 { 0, NULL },
     798             :         },
     799             :         { .name = NULL }
     800             : };
     801             : 
     802             : static const char * const gkdi_endpoint_strings[] = {
     803             :         "ncacn_np:[\\pipe\\lsass]", 
     804             :         "ncacn_ip_tcp:", 
     805             :         "ncalrpc:", 
     806             : };
     807             : 
     808             : static const struct ndr_interface_string_array gkdi_endpoints = {
     809             :         .count  = 3,
     810             :         .names  = gkdi_endpoint_strings
     811             : };
     812             : 
     813             : static const char * const gkdi_authservice_strings[] = {
     814             :         "host", 
     815             : };
     816             : 
     817             : static const struct ndr_interface_string_array gkdi_authservices = {
     818             :         .count  = 1,
     819             :         .names  = gkdi_authservice_strings
     820             : };
     821             : 
     822             : 
     823             : const struct ndr_interface_table ndr_table_gkdi = {
     824             :         .name           = "gkdi",
     825             :         .syntax_id      = {
     826             :                 {0xb9785960,0x524f,0x11df,{0x8b,0x6d},{0x83,0xdc,0xde,0xd7,0x20,0x85}},
     827             :                 NDR_GKDI_VERSION
     828             :         },
     829             :         .helpstring     = NDR_GKDI_HELPSTRING,
     830             :         .num_calls      = 1,
     831             :         .calls          = gkdi_calls,
     832             :         .num_public_structs     = 5,
     833             :         .public_structs         = gkdi_public_structs,
     834             :         .endpoints      = &gkdi_endpoints,
     835             :         .authservices   = &gkdi_authservices
     836             : };
     837             : 
     838             : #endif /* SKIP_NDR_TABLE_gkdi */

Generated by: LCOV version 1.14