Line data Source code
1 : /* parser auto-generated by pidl */
2 :
3 : #include "includes.h"
4 : #include "bin/default/librpc/gen_ndr/ndr_backupkey.h"
5 :
6 : #include "librpc/gen_ndr/ndr_misc.h"
7 : #include "librpc/gen_ndr/ndr_security.h"
8 3 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_exported_RSA_key_pair(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_exported_RSA_key_pair *r)
9 : {
10 3 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
11 3 : if (ndr_flags & NDR_SCALARS) {
12 3 : NDR_CHECK(ndr_push_align(ndr, 4));
13 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000002));
14 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000494));
15 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->certificate_len));
16 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000207));
17 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x0000A400));
18 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x32415352));
19 3 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000800));
20 : {
21 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
22 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
23 : {
24 2 : struct ndr_push *_ndr_public_exponent;
25 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_public_exponent, 0, 4));
26 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_public_exponent, NDR_SCALARS, r->public_exponent));
27 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_public_exponent, 0, 4));
28 : }
29 3 : ndr->flags = _flags_save_DATA_BLOB;
30 : }
31 : {
32 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
33 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
34 : {
35 2 : struct ndr_push *_ndr_modulus;
36 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_modulus, 0, 256));
37 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_modulus, NDR_SCALARS, r->modulus));
38 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_modulus, 0, 256));
39 : }
40 3 : ndr->flags = _flags_save_DATA_BLOB;
41 : }
42 : {
43 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
44 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
45 : {
46 2 : struct ndr_push *_ndr_prime1;
47 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_prime1, 0, 128));
48 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_prime1, NDR_SCALARS, r->prime1));
49 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_prime1, 0, 128));
50 : }
51 3 : ndr->flags = _flags_save_DATA_BLOB;
52 : }
53 : {
54 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
55 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
56 : {
57 2 : struct ndr_push *_ndr_prime2;
58 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_prime2, 0, 128));
59 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_prime2, NDR_SCALARS, r->prime2));
60 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_prime2, 0, 128));
61 : }
62 3 : ndr->flags = _flags_save_DATA_BLOB;
63 : }
64 : {
65 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
66 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
67 : {
68 2 : struct ndr_push *_ndr_exponent1;
69 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_exponent1, 0, 128));
70 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_exponent1, NDR_SCALARS, r->exponent1));
71 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_exponent1, 0, 128));
72 : }
73 3 : ndr->flags = _flags_save_DATA_BLOB;
74 : }
75 : {
76 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
77 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
78 : {
79 2 : struct ndr_push *_ndr_exponent2;
80 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_exponent2, 0, 128));
81 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_exponent2, NDR_SCALARS, r->exponent2));
82 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_exponent2, 0, 128));
83 : }
84 3 : ndr->flags = _flags_save_DATA_BLOB;
85 : }
86 : {
87 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
88 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
89 : {
90 2 : struct ndr_push *_ndr_coefficient;
91 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_coefficient, 0, 128));
92 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_coefficient, NDR_SCALARS, r->coefficient));
93 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_coefficient, 0, 128));
94 : }
95 3 : ndr->flags = _flags_save_DATA_BLOB;
96 : }
97 : {
98 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
99 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
100 : {
101 2 : struct ndr_push *_ndr_private_exponent;
102 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_private_exponent, 0, 256));
103 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_private_exponent, NDR_SCALARS, r->private_exponent));
104 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_private_exponent, 0, 256));
105 : }
106 3 : ndr->flags = _flags_save_DATA_BLOB;
107 : }
108 : {
109 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
110 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
111 : {
112 2 : struct ndr_push *_ndr_cert;
113 3 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_cert, 0, r->certificate_len));
114 3 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_cert, NDR_SCALARS, r->cert));
115 3 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_cert, 0, r->certificate_len));
116 : }
117 3 : ndr->flags = _flags_save_DATA_BLOB;
118 : }
119 3 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
120 : }
121 3 : if (ndr_flags & NDR_BUFFERS) {
122 2 : }
123 3 : return NDR_ERR_SUCCESS;
124 : }
125 :
126 23 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_exported_RSA_key_pair(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_exported_RSA_key_pair *r)
127 : {
128 23 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
129 23 : if (ndr_flags & NDR_SCALARS) {
130 23 : NDR_CHECK(ndr_pull_align(ndr, 4));
131 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->header1));
132 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->header2));
133 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->certificate_len));
134 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic1));
135 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic2));
136 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic3));
137 23 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic4));
138 : {
139 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
140 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
141 : {
142 2 : struct ndr_pull *_ndr_public_exponent;
143 23 : ssize_t sub_size = 4;
144 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_public_exponent, 0, sub_size));
145 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_public_exponent, NDR_SCALARS, &r->public_exponent));
146 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_public_exponent, 0, sub_size));
147 : }
148 23 : ndr->flags = _flags_save_DATA_BLOB;
149 : }
150 : {
151 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
152 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
153 : {
154 2 : struct ndr_pull *_ndr_modulus;
155 23 : ssize_t sub_size = 256;
156 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_modulus, 0, sub_size));
157 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_modulus, NDR_SCALARS, &r->modulus));
158 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_modulus, 0, sub_size));
159 : }
160 23 : ndr->flags = _flags_save_DATA_BLOB;
161 : }
162 : {
163 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
164 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
165 : {
166 2 : struct ndr_pull *_ndr_prime1;
167 23 : ssize_t sub_size = 128;
168 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_prime1, 0, sub_size));
169 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_prime1, NDR_SCALARS, &r->prime1));
170 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_prime1, 0, sub_size));
171 : }
172 23 : ndr->flags = _flags_save_DATA_BLOB;
173 : }
174 : {
175 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
176 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
177 : {
178 2 : struct ndr_pull *_ndr_prime2;
179 23 : ssize_t sub_size = 128;
180 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_prime2, 0, sub_size));
181 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_prime2, NDR_SCALARS, &r->prime2));
182 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_prime2, 0, sub_size));
183 : }
184 23 : ndr->flags = _flags_save_DATA_BLOB;
185 : }
186 : {
187 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
188 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
189 : {
190 2 : struct ndr_pull *_ndr_exponent1;
191 23 : ssize_t sub_size = 128;
192 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_exponent1, 0, sub_size));
193 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_exponent1, NDR_SCALARS, &r->exponent1));
194 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_exponent1, 0, sub_size));
195 : }
196 23 : ndr->flags = _flags_save_DATA_BLOB;
197 : }
198 : {
199 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
200 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
201 : {
202 2 : struct ndr_pull *_ndr_exponent2;
203 23 : ssize_t sub_size = 128;
204 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_exponent2, 0, sub_size));
205 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_exponent2, NDR_SCALARS, &r->exponent2));
206 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_exponent2, 0, sub_size));
207 : }
208 23 : ndr->flags = _flags_save_DATA_BLOB;
209 : }
210 : {
211 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
212 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
213 : {
214 2 : struct ndr_pull *_ndr_coefficient;
215 23 : ssize_t sub_size = 128;
216 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_coefficient, 0, sub_size));
217 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_coefficient, NDR_SCALARS, &r->coefficient));
218 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_coefficient, 0, sub_size));
219 : }
220 23 : ndr->flags = _flags_save_DATA_BLOB;
221 : }
222 : {
223 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
224 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
225 : {
226 2 : struct ndr_pull *_ndr_private_exponent;
227 23 : ssize_t sub_size = 256;
228 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_private_exponent, 0, sub_size));
229 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_private_exponent, NDR_SCALARS, &r->private_exponent));
230 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_private_exponent, 0, sub_size));
231 : }
232 23 : ndr->flags = _flags_save_DATA_BLOB;
233 : }
234 : {
235 23 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
236 23 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
237 : {
238 2 : struct ndr_pull *_ndr_cert;
239 23 : ssize_t sub_size = r->certificate_len;
240 23 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_cert, 0, sub_size));
241 23 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_cert, NDR_SCALARS, &r->cert));
242 23 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_cert, 0, sub_size));
243 : }
244 23 : ndr->flags = _flags_save_DATA_BLOB;
245 : }
246 23 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
247 : }
248 23 : if (ndr_flags & NDR_BUFFERS) {
249 2 : }
250 23 : return NDR_ERR_SUCCESS;
251 : }
252 :
253 0 : static void ndr_print_flags_bkrp_exported_RSA_key_pair(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_exported_RSA_key_pair *r)
254 : {
255 0 : ndr_print_bkrp_exported_RSA_key_pair(ndr, name, r);
256 0 : }
257 :
258 2 : _PUBLIC_ void ndr_print_bkrp_exported_RSA_key_pair(struct ndr_print *ndr, const char *name, const struct bkrp_exported_RSA_key_pair *r)
259 : {
260 2 : ndr_print_struct(ndr, name, "bkrp_exported_RSA_key_pair");
261 2 : if (r == NULL) { ndr_print_null(ndr); return; }
262 2 : ndr->depth++;
263 2 : ndr_print_uint32(ndr, "header1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000002:r->header1);
264 2 : ndr_print_uint32(ndr, "header2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000494:r->header2);
265 2 : ndr_print_uint32(ndr, "certificate_len", r->certificate_len);
266 2 : ndr_print_uint32(ndr, "magic1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000207:r->magic1);
267 2 : ndr_print_uint32(ndr, "magic2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x0000A400:r->magic2);
268 2 : ndr_print_uint32(ndr, "magic3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x32415352:r->magic3);
269 2 : ndr_print_uint32(ndr, "magic4", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000800:r->magic4);
270 : {
271 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
272 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
273 2 : ndr_print_DATA_BLOB(ndr, "public_exponent", r->public_exponent);
274 2 : ndr->flags = _flags_save_DATA_BLOB;
275 : }
276 : {
277 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
278 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
279 2 : ndr_print_DATA_BLOB(ndr, "modulus", r->modulus);
280 2 : ndr->flags = _flags_save_DATA_BLOB;
281 : }
282 : {
283 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
284 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
285 2 : ndr_print_DATA_BLOB(ndr, "prime1", r->prime1);
286 2 : ndr->flags = _flags_save_DATA_BLOB;
287 : }
288 : {
289 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
290 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
291 2 : ndr_print_DATA_BLOB(ndr, "prime2", r->prime2);
292 2 : ndr->flags = _flags_save_DATA_BLOB;
293 : }
294 : {
295 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
296 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
297 2 : ndr_print_DATA_BLOB(ndr, "exponent1", r->exponent1);
298 2 : ndr->flags = _flags_save_DATA_BLOB;
299 : }
300 : {
301 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
302 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
303 2 : ndr_print_DATA_BLOB(ndr, "exponent2", r->exponent2);
304 2 : ndr->flags = _flags_save_DATA_BLOB;
305 : }
306 : {
307 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
308 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
309 2 : ndr_print_DATA_BLOB(ndr, "coefficient", r->coefficient);
310 2 : ndr->flags = _flags_save_DATA_BLOB;
311 : }
312 : {
313 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
314 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
315 2 : ndr_print_DATA_BLOB(ndr, "private_exponent", r->private_exponent);
316 2 : ndr->flags = _flags_save_DATA_BLOB;
317 : }
318 : {
319 2 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
320 2 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
321 2 : ndr_print_DATA_BLOB(ndr, "cert", r->cert);
322 2 : ndr->flags = _flags_save_DATA_BLOB;
323 : }
324 2 : ndr->depth--;
325 : }
326 :
327 1 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_dc_serverwrap_key(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_dc_serverwrap_key *r)
328 : {
329 1 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
330 1 : if (ndr_flags & NDR_SCALARS) {
331 1 : NDR_CHECK(ndr_push_align(ndr, 4));
332 1 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000001));
333 1 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->key, 256));
334 1 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
335 : }
336 1 : if (ndr_flags & NDR_BUFFERS) {
337 0 : }
338 1 : return NDR_ERR_SUCCESS;
339 : }
340 :
341 32 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_dc_serverwrap_key(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_dc_serverwrap_key *r)
342 : {
343 32 : uint32_t size_key_0 = 0;
344 32 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
345 32 : if (ndr_flags & NDR_SCALARS) {
346 32 : NDR_CHECK(ndr_pull_align(ndr, 4));
347 32 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
348 32 : size_key_0 = 256;
349 32 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->key, size_key_0));
350 32 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
351 : }
352 32 : if (ndr_flags & NDR_BUFFERS) {
353 0 : }
354 32 : return NDR_ERR_SUCCESS;
355 : }
356 :
357 0 : static void ndr_print_flags_bkrp_dc_serverwrap_key(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_dc_serverwrap_key *r)
358 : {
359 0 : ndr_print_bkrp_dc_serverwrap_key(ndr, name, r);
360 0 : }
361 :
362 0 : _PUBLIC_ void ndr_print_bkrp_dc_serverwrap_key(struct ndr_print *ndr, const char *name, const struct bkrp_dc_serverwrap_key *r)
363 : {
364 0 : ndr_print_struct(ndr, name, "bkrp_dc_serverwrap_key");
365 0 : if (r == NULL) { ndr_print_null(ndr); return; }
366 0 : ndr->depth++;
367 0 : ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000001:r->magic);
368 0 : ndr_print_array_uint8(ndr, "key", r->key, 256);
369 0 : ndr->depth--;
370 : }
371 :
372 0 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_empty(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_empty *r)
373 : {
374 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
375 0 : if (ndr_flags & NDR_SCALARS) {
376 0 : NDR_CHECK(ndr_push_align(ndr, 1));
377 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 1));
378 : }
379 0 : if (ndr_flags & NDR_BUFFERS) {
380 0 : }
381 0 : return NDR_ERR_SUCCESS;
382 : }
383 :
384 0 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_empty(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_empty *r)
385 : {
386 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
387 0 : if (ndr_flags & NDR_SCALARS) {
388 0 : NDR_CHECK(ndr_pull_align(ndr, 1));
389 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 1));
390 : }
391 0 : if (ndr_flags & NDR_BUFFERS) {
392 0 : }
393 0 : return NDR_ERR_SUCCESS;
394 : }
395 :
396 0 : static void ndr_print_flags_bkrp_empty(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_empty *r)
397 : {
398 0 : ndr_print_bkrp_empty(ndr, name, r);
399 0 : }
400 :
401 0 : _PUBLIC_ void ndr_print_bkrp_empty(struct ndr_print *ndr, const char *name, const struct bkrp_empty *r)
402 : {
403 0 : ndr_print_struct(ndr, name, "bkrp_empty");
404 0 : if (r == NULL) { ndr_print_null(ndr); return; }
405 0 : ndr->depth++;
406 0 : ndr->depth--;
407 : }
408 :
409 76 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_client_side_wrapped(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_client_side_wrapped *r)
410 : {
411 76 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
412 76 : if (ndr_flags & NDR_SCALARS) {
413 76 : NDR_CHECK(ndr_push_align(ndr, 4));
414 76 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->version));
415 76 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->encrypted_secret_len));
416 76 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->access_check_len));
417 76 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
418 76 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->encrypted_secret, r->encrypted_secret_len));
419 76 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->access_check, r->access_check_len));
420 76 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
421 : }
422 76 : if (ndr_flags & NDR_BUFFERS) {
423 0 : }
424 76 : return NDR_ERR_SUCCESS;
425 : }
426 :
427 9 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_client_side_wrapped(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_client_side_wrapped *r)
428 : {
429 9 : uint32_t size_encrypted_secret_0 = 0;
430 9 : uint32_t size_access_check_0 = 0;
431 9 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
432 9 : if (ndr_flags & NDR_SCALARS) {
433 9 : NDR_CHECK(ndr_pull_align(ndr, 4));
434 9 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->version));
435 9 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->encrypted_secret_len));
436 9 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->access_check_len));
437 9 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
438 9 : size_encrypted_secret_0 = r->encrypted_secret_len;
439 9 : NDR_PULL_ALLOC_N(ndr, r->encrypted_secret, size_encrypted_secret_0);
440 9 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->encrypted_secret, size_encrypted_secret_0));
441 9 : size_access_check_0 = r->access_check_len;
442 9 : NDR_PULL_ALLOC_N(ndr, r->access_check, size_access_check_0);
443 9 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->access_check, size_access_check_0));
444 9 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
445 : }
446 9 : if (ndr_flags & NDR_BUFFERS) {
447 0 : }
448 9 : return NDR_ERR_SUCCESS;
449 : }
450 :
451 0 : static void ndr_print_flags_bkrp_client_side_wrapped(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_client_side_wrapped *r)
452 : {
453 0 : ndr_print_bkrp_client_side_wrapped(ndr, name, r);
454 0 : }
455 :
456 0 : _PUBLIC_ void ndr_print_bkrp_client_side_wrapped(struct ndr_print *ndr, const char *name, const struct bkrp_client_side_wrapped *r)
457 : {
458 0 : ndr_print_struct(ndr, name, "bkrp_client_side_wrapped");
459 0 : if (r == NULL) { ndr_print_null(ndr); return; }
460 0 : ndr->depth++;
461 0 : ndr_print_uint32(ndr, "version", r->version);
462 0 : ndr_print_uint32(ndr, "encrypted_secret_len", r->encrypted_secret_len);
463 0 : ndr_print_uint32(ndr, "access_check_len", r->access_check_len);
464 0 : ndr_print_GUID(ndr, "guid", &r->guid);
465 0 : ndr_print_array_uint8(ndr, "encrypted_secret", r->encrypted_secret, r->encrypted_secret_len);
466 0 : ndr_print_array_uint8(ndr, "access_check", r->access_check, r->access_check_len);
467 0 : ndr->depth--;
468 : }
469 :
470 0 : _PUBLIC_ size_t ndr_size_bkrp_client_side_wrapped(const struct bkrp_client_side_wrapped *r, libndr_flags flags)
471 : {
472 0 : return ndr_size_struct(r, flags, (ndr_push_flags_fn_t)ndr_push_bkrp_client_side_wrapped);
473 : }
474 :
475 0 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_client_side_unwrapped(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_client_side_unwrapped *r)
476 : {
477 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
478 0 : if (ndr_flags & NDR_SCALARS) {
479 0 : NDR_CHECK(ndr_push_align(ndr, 4));
480 0 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000000));
481 : {
482 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
483 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
484 : {
485 0 : struct ndr_push *_ndr_secret;
486 0 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secret, 0, -1));
487 0 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_secret, NDR_SCALARS, r->secret));
488 0 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secret, 0, -1));
489 : }
490 0 : ndr->flags = _flags_save_DATA_BLOB;
491 : }
492 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
493 : }
494 0 : if (ndr_flags & NDR_BUFFERS) {
495 0 : }
496 0 : return NDR_ERR_SUCCESS;
497 : }
498 :
499 10 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_client_side_unwrapped(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_client_side_unwrapped *r)
500 : {
501 10 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
502 10 : if (ndr_flags & NDR_SCALARS) {
503 10 : NDR_CHECK(ndr_pull_align(ndr, 4));
504 10 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
505 : {
506 3 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
507 3 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
508 : {
509 0 : struct ndr_pull *_ndr_secret;
510 3 : ssize_t sub_size = -1;
511 3 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secret, 0, sub_size));
512 3 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_secret, NDR_SCALARS, &r->secret));
513 3 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secret, 0, sub_size));
514 : }
515 3 : ndr->flags = _flags_save_DATA_BLOB;
516 : }
517 3 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
518 : }
519 3 : if (ndr_flags & NDR_BUFFERS) {
520 0 : }
521 3 : return NDR_ERR_SUCCESS;
522 : }
523 :
524 0 : static void ndr_print_flags_bkrp_client_side_unwrapped(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_client_side_unwrapped *r)
525 : {
526 0 : ndr_print_bkrp_client_side_unwrapped(ndr, name, r);
527 0 : }
528 :
529 0 : _PUBLIC_ void ndr_print_bkrp_client_side_unwrapped(struct ndr_print *ndr, const char *name, const struct bkrp_client_side_unwrapped *r)
530 : {
531 0 : ndr_print_struct(ndr, name, "bkrp_client_side_unwrapped");
532 0 : if (r == NULL) { ndr_print_null(ndr); return; }
533 0 : ndr->depth++;
534 0 : ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000000:r->magic);
535 : {
536 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
537 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
538 0 : ndr_print_DATA_BLOB(ndr, "secret", r->secret);
539 0 : ndr->flags = _flags_save_DATA_BLOB;
540 : }
541 0 : ndr->depth--;
542 : }
543 :
544 7 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_encrypted_secret_v2(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_encrypted_secret_v2 *r)
545 : {
546 7 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
547 7 : if (ndr_flags & NDR_SCALARS) {
548 7 : NDR_CHECK(ndr_push_align(ndr, 4));
549 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secret_len));
550 7 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000020));
551 7 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->secret, r->secret_len));
552 7 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->payload_key, 32));
553 7 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
554 : }
555 7 : if (ndr_flags & NDR_BUFFERS) {
556 0 : }
557 7 : return NDR_ERR_SUCCESS;
558 : }
559 :
560 5 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_encrypted_secret_v2(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_encrypted_secret_v2 *r)
561 : {
562 5 : uint32_t size_secret_0 = 0;
563 5 : uint32_t size_payload_key_0 = 0;
564 5 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
565 5 : if (ndr_flags & NDR_SCALARS) {
566 5 : NDR_CHECK(ndr_pull_align(ndr, 4));
567 5 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_len));
568 5 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
569 5 : size_secret_0 = r->secret_len;
570 5 : NDR_PULL_ALLOC_N(ndr, r->secret, size_secret_0);
571 5 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->secret, size_secret_0));
572 5 : size_payload_key_0 = 32;
573 5 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->payload_key, size_payload_key_0));
574 5 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
575 : }
576 5 : if (ndr_flags & NDR_BUFFERS) {
577 0 : }
578 5 : return NDR_ERR_SUCCESS;
579 : }
580 :
581 0 : static void ndr_print_flags_bkrp_encrypted_secret_v2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_encrypted_secret_v2 *r)
582 : {
583 0 : ndr_print_bkrp_encrypted_secret_v2(ndr, name, r);
584 0 : }
585 :
586 0 : _PUBLIC_ void ndr_print_bkrp_encrypted_secret_v2(struct ndr_print *ndr, const char *name, const struct bkrp_encrypted_secret_v2 *r)
587 : {
588 0 : ndr_print_struct(ndr, name, "bkrp_encrypted_secret_v2");
589 0 : if (r == NULL) { ndr_print_null(ndr); return; }
590 0 : ndr->depth++;
591 0 : ndr_print_uint32(ndr, "secret_len", r->secret_len);
592 0 : ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000020:r->magic);
593 0 : ndr_print_array_uint8(ndr, "secret", r->secret, r->secret_len);
594 0 : ndr_print_array_uint8(ndr, "payload_key", r->payload_key, 32);
595 0 : ndr->depth--;
596 : }
597 :
598 4 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_encrypted_secret_v3(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_encrypted_secret_v3 *r)
599 : {
600 4 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
601 4 : if (ndr_flags & NDR_SCALARS) {
602 4 : NDR_CHECK(ndr_push_align(ndr, 4));
603 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->secret_len));
604 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000030));
605 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00006610));
606 4 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x0000800e));
607 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->secret, r->secret_len));
608 4 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->payload_key, 48));
609 4 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
610 : }
611 4 : if (ndr_flags & NDR_BUFFERS) {
612 0 : }
613 4 : return NDR_ERR_SUCCESS;
614 : }
615 :
616 2 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_encrypted_secret_v3(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_encrypted_secret_v3 *r)
617 : {
618 2 : uint32_t size_secret_0 = 0;
619 2 : uint32_t size_payload_key_0 = 0;
620 2 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
621 2 : if (ndr_flags & NDR_SCALARS) {
622 2 : NDR_CHECK(ndr_pull_align(ndr, 4));
623 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->secret_len));
624 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic1));
625 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic2));
626 2 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic3));
627 2 : size_secret_0 = r->secret_len;
628 2 : NDR_PULL_ALLOC_N(ndr, r->secret, size_secret_0);
629 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->secret, size_secret_0));
630 2 : size_payload_key_0 = 48;
631 2 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->payload_key, size_payload_key_0));
632 2 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
633 : }
634 2 : if (ndr_flags & NDR_BUFFERS) {
635 0 : }
636 2 : return NDR_ERR_SUCCESS;
637 : }
638 :
639 0 : static void ndr_print_flags_bkrp_encrypted_secret_v3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_encrypted_secret_v3 *r)
640 : {
641 0 : ndr_print_bkrp_encrypted_secret_v3(ndr, name, r);
642 0 : }
643 :
644 0 : _PUBLIC_ void ndr_print_bkrp_encrypted_secret_v3(struct ndr_print *ndr, const char *name, const struct bkrp_encrypted_secret_v3 *r)
645 : {
646 0 : ndr_print_struct(ndr, name, "bkrp_encrypted_secret_v3");
647 0 : if (r == NULL) { ndr_print_null(ndr); return; }
648 0 : ndr->depth++;
649 0 : ndr_print_uint32(ndr, "secret_len", r->secret_len);
650 0 : ndr_print_uint32(ndr, "magic1", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000030:r->magic1);
651 0 : ndr_print_uint32(ndr, "magic2", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00006610:r->magic2);
652 0 : ndr_print_uint32(ndr, "magic3", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x0000800e:r->magic3);
653 0 : ndr_print_array_uint8(ndr, "secret", r->secret, r->secret_len);
654 0 : ndr_print_array_uint8(ndr, "payload_key", r->payload_key, 48);
655 0 : ndr->depth--;
656 : }
657 :
658 0 : static void ndr_print_flags_bkrp_access_check_v2(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_access_check_v2 *r)
659 : {
660 0 : ndr_print_bkrp_access_check_v2(ndr, name, r);
661 0 : }
662 :
663 0 : _PUBLIC_ void ndr_print_bkrp_access_check_v2(struct ndr_print *ndr, const char *name, const struct bkrp_access_check_v2 *r)
664 : {
665 0 : ndr_print_struct(ndr, name, "bkrp_access_check_v2");
666 0 : if (r == NULL) { ndr_print_null(ndr); return; }
667 0 : ndr->depth++;
668 0 : ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000001:r->magic);
669 0 : ndr_print_uint32(ndr, "nonce_len", r->nonce_len);
670 0 : ndr_print_array_uint8(ndr, "nonce", r->nonce, r->nonce_len);
671 0 : ndr_print_dom_sid(ndr, "sid", &r->sid);
672 0 : ndr_print_array_uint8(ndr, "hash", r->hash, 20);
673 0 : ndr->depth--;
674 : }
675 :
676 0 : static void ndr_print_flags_bkrp_access_check_v3(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_access_check_v3 *r)
677 : {
678 0 : ndr_print_bkrp_access_check_v3(ndr, name, r);
679 0 : }
680 :
681 0 : _PUBLIC_ void ndr_print_bkrp_access_check_v3(struct ndr_print *ndr, const char *name, const struct bkrp_access_check_v3 *r)
682 : {
683 0 : ndr_print_struct(ndr, name, "bkrp_access_check_v3");
684 0 : if (r == NULL) { ndr_print_null(ndr); return; }
685 0 : ndr->depth++;
686 0 : ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000001:r->magic);
687 0 : ndr_print_uint32(ndr, "nonce_len", r->nonce_len);
688 0 : ndr_print_array_uint8(ndr, "nonce", r->nonce, r->nonce_len);
689 0 : ndr_print_dom_sid(ndr, "sid", &r->sid);
690 0 : ndr_print_array_uint8(ndr, "hash", r->hash, 64);
691 0 : ndr->depth--;
692 : }
693 :
694 16 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_rc4encryptedpayload(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_rc4encryptedpayload *r)
695 : {
696 16 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
697 16 : if (ndr_flags & NDR_SCALARS) {
698 16 : NDR_CHECK(ndr_push_align(ndr, 4));
699 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->r3, 32));
700 16 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->mac, 20));
701 16 : NDR_CHECK(ndr_push_dom_sid(ndr, NDR_SCALARS, &r->sid));
702 : {
703 16 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
704 16 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
705 : {
706 0 : struct ndr_push *_ndr_secret_data;
707 16 : NDR_CHECK(ndr_push_subcontext_start(ndr, &_ndr_secret_data, 0, -1));
708 16 : NDR_CHECK(ndr_push_DATA_BLOB(_ndr_secret_data, NDR_SCALARS, r->secret_data));
709 16 : NDR_CHECK(ndr_push_subcontext_end(ndr, _ndr_secret_data, 0, -1));
710 : }
711 16 : ndr->flags = _flags_save_DATA_BLOB;
712 : }
713 16 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
714 : }
715 16 : if (ndr_flags & NDR_BUFFERS) {
716 0 : }
717 16 : return NDR_ERR_SUCCESS;
718 : }
719 :
720 19 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_rc4encryptedpayload(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_rc4encryptedpayload *r)
721 : {
722 19 : uint32_t size_r3_0 = 0;
723 19 : uint32_t size_mac_0 = 0;
724 19 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
725 19 : if (ndr_flags & NDR_SCALARS) {
726 19 : NDR_CHECK(ndr_pull_align(ndr, 4));
727 19 : size_r3_0 = 32;
728 19 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->r3, size_r3_0));
729 19 : size_mac_0 = 20;
730 19 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->mac, size_mac_0));
731 19 : NDR_CHECK(ndr_pull_dom_sid(ndr, NDR_SCALARS, &r->sid));
732 : {
733 17 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
734 17 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
735 : {
736 0 : struct ndr_pull *_ndr_secret_data;
737 17 : ssize_t sub_size = -1;
738 17 : NDR_CHECK(ndr_pull_subcontext_start(ndr, &_ndr_secret_data, 0, sub_size));
739 17 : NDR_CHECK(ndr_pull_DATA_BLOB(_ndr_secret_data, NDR_SCALARS, &r->secret_data));
740 17 : NDR_CHECK(ndr_pull_subcontext_end(ndr, _ndr_secret_data, 0, sub_size));
741 : }
742 17 : ndr->flags = _flags_save_DATA_BLOB;
743 : }
744 17 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
745 : }
746 17 : if (ndr_flags & NDR_BUFFERS) {
747 0 : }
748 17 : return NDR_ERR_SUCCESS;
749 : }
750 :
751 0 : static void ndr_print_flags_bkrp_rc4encryptedpayload(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_rc4encryptedpayload *r)
752 : {
753 0 : ndr_print_bkrp_rc4encryptedpayload(ndr, name, r);
754 0 : }
755 :
756 0 : _PUBLIC_ void ndr_print_bkrp_rc4encryptedpayload(struct ndr_print *ndr, const char *name, const struct bkrp_rc4encryptedpayload *r)
757 : {
758 0 : ndr_print_struct(ndr, name, "bkrp_rc4encryptedpayload");
759 0 : if (r == NULL) { ndr_print_null(ndr); return; }
760 0 : ndr->depth++;
761 0 : ndr_print_array_uint8(ndr, "r3", r->r3, 32);
762 0 : ndr_print_array_uint8(ndr, "mac", r->mac, 20);
763 0 : ndr_print_dom_sid(ndr, "sid", &r->sid);
764 : {
765 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
766 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
767 0 : ndr_print_DATA_BLOB(ndr, "secret_data", r->secret_data);
768 0 : ndr->flags = _flags_save_DATA_BLOB;
769 : }
770 0 : ndr->depth--;
771 : }
772 :
773 21 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_server_side_wrapped(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_server_side_wrapped *r)
774 : {
775 21 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
776 21 : if (ndr_flags & NDR_SCALARS) {
777 21 : NDR_CHECK(ndr_push_align(ndr, 4));
778 21 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, 0x00000001));
779 21 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->payload_length));
780 21 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->ciphertext_length));
781 21 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, &r->guid));
782 21 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->r2, 68));
783 21 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->rc4encryptedpayload, r->ciphertext_length));
784 21 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
785 : }
786 21 : if (ndr_flags & NDR_BUFFERS) {
787 0 : }
788 21 : return NDR_ERR_SUCCESS;
789 : }
790 :
791 41 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_server_side_wrapped(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_server_side_wrapped *r)
792 : {
793 41 : uint32_t size_r2_0 = 0;
794 41 : uint32_t size_rc4encryptedpayload_0 = 0;
795 41 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
796 41 : if (ndr_flags & NDR_SCALARS) {
797 41 : NDR_CHECK(ndr_pull_align(ndr, 4));
798 41 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->magic));
799 40 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->payload_length));
800 38 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->ciphertext_length));
801 38 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, &r->guid));
802 38 : size_r2_0 = 68;
803 38 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->r2, size_r2_0));
804 38 : size_rc4encryptedpayload_0 = r->ciphertext_length;
805 38 : NDR_PULL_ALLOC_N(ndr, r->rc4encryptedpayload, size_rc4encryptedpayload_0);
806 36 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->rc4encryptedpayload, size_rc4encryptedpayload_0));
807 36 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
808 : }
809 36 : if (ndr_flags & NDR_BUFFERS) {
810 0 : }
811 36 : return NDR_ERR_SUCCESS;
812 : }
813 :
814 0 : static void ndr_print_flags_bkrp_server_side_wrapped(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_server_side_wrapped *r)
815 : {
816 0 : ndr_print_bkrp_server_side_wrapped(ndr, name, r);
817 0 : }
818 :
819 0 : _PUBLIC_ void ndr_print_bkrp_server_side_wrapped(struct ndr_print *ndr, const char *name, const struct bkrp_server_side_wrapped *r)
820 : {
821 0 : ndr_print_struct(ndr, name, "bkrp_server_side_wrapped");
822 0 : if (r == NULL) { ndr_print_null(ndr); return; }
823 0 : ndr->depth++;
824 0 : ndr_print_uint32(ndr, "magic", (ndr->flags & LIBNDR_PRINT_SET_VALUES)?0x00000001:r->magic);
825 0 : ndr_print_uint32(ndr, "payload_length", r->payload_length);
826 0 : ndr_print_uint32(ndr, "ciphertext_length", r->ciphertext_length);
827 0 : ndr_print_GUID(ndr, "guid", &r->guid);
828 0 : ndr_print_array_uint8(ndr, "r2", r->r2, 68);
829 0 : ndr_print_array_uint8(ndr, "rc4encryptedpayload", r->rc4encryptedpayload, r->ciphertext_length);
830 0 : ndr->depth--;
831 : }
832 :
833 0 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_opaque_blob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const struct bkrp_opaque_blob *r)
834 : {
835 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
836 0 : if (ndr_flags & NDR_SCALARS) {
837 0 : NDR_CHECK(ndr_push_align(ndr, 4));
838 : {
839 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
840 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
841 0 : NDR_CHECK(ndr_push_DATA_BLOB(ndr, NDR_SCALARS, r->opaque));
842 0 : ndr->flags = _flags_save_DATA_BLOB;
843 : }
844 0 : NDR_CHECK(ndr_push_trailer_align(ndr, 4));
845 : }
846 0 : if (ndr_flags & NDR_BUFFERS) {
847 0 : }
848 0 : return NDR_ERR_SUCCESS;
849 : }
850 :
851 0 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_opaque_blob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, struct bkrp_opaque_blob *r)
852 : {
853 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
854 0 : if (ndr_flags & NDR_SCALARS) {
855 0 : NDR_CHECK(ndr_pull_align(ndr, 4));
856 : {
857 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
858 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
859 0 : NDR_CHECK(ndr_pull_DATA_BLOB(ndr, NDR_SCALARS, &r->opaque));
860 0 : ndr->flags = _flags_save_DATA_BLOB;
861 : }
862 0 : NDR_CHECK(ndr_pull_trailer_align(ndr, 4));
863 : }
864 0 : if (ndr_flags & NDR_BUFFERS) {
865 0 : }
866 0 : return NDR_ERR_SUCCESS;
867 : }
868 :
869 0 : static void ndr_print_flags_bkrp_opaque_blob(struct ndr_print *ndr, const char *name, ndr_flags_type unused, const struct bkrp_opaque_blob *r)
870 : {
871 0 : ndr_print_bkrp_opaque_blob(ndr, name, r);
872 0 : }
873 :
874 0 : _PUBLIC_ void ndr_print_bkrp_opaque_blob(struct ndr_print *ndr, const char *name, const struct bkrp_opaque_blob *r)
875 : {
876 0 : ndr_print_struct(ndr, name, "bkrp_opaque_blob");
877 0 : if (r == NULL) { ndr_print_null(ndr); return; }
878 0 : ndr->depth++;
879 : {
880 0 : libndr_flags _flags_save_DATA_BLOB = ndr->flags;
881 0 : ndr_set_flags(&ndr->flags, LIBNDR_FLAG_REMAINING);
882 0 : ndr_print_DATA_BLOB(ndr, "opaque", r->opaque);
883 0 : ndr->flags = _flags_save_DATA_BLOB;
884 : }
885 0 : ndr->depth--;
886 : }
887 :
888 0 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_data_in_blob(struct ndr_push *ndr, ndr_flags_type ndr_flags, const union bkrp_data_in_blob *r)
889 : {
890 0 : uint32_t level;
891 0 : NDR_PUSH_CHECK_FLAGS(ndr, ndr_flags);
892 0 : if (ndr_flags & NDR_SCALARS) {
893 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
894 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
895 0 : NDR_CHECK(ndr_push_union_align(ndr, 4));
896 0 : switch (level) {
897 0 : case BACKUPKEY_RESTORE_GUID_INTEGER: {
898 0 : NDR_CHECK(ndr_push_bkrp_client_side_wrapped(ndr, NDR_SCALARS, &r->restore_req));
899 0 : break; }
900 :
901 0 : case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER: {
902 0 : NDR_CHECK(ndr_push_bkrp_empty(ndr, NDR_SCALARS, &r->empty));
903 0 : break; }
904 :
905 0 : case BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER: {
906 0 : NDR_CHECK(ndr_push_bkrp_server_side_wrapped(ndr, NDR_SCALARS, &r->unsign_req));
907 0 : break; }
908 :
909 0 : case BACKUPKEY_BACKUP_GUID_INTEGER: {
910 0 : NDR_CHECK(ndr_push_bkrp_opaque_blob(ndr, NDR_SCALARS, &r->sign_req));
911 0 : break; }
912 :
913 0 : default:
914 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
915 : }
916 : }
917 0 : if (ndr_flags & NDR_BUFFERS) {
918 0 : if (!(ndr_flags & NDR_SCALARS)) {
919 : /* We didn't get it above, and the token is not needed after this. */
920 0 : NDR_CHECK(ndr_push_steal_switch_value(ndr, r, &level));
921 : }
922 0 : switch (level) {
923 0 : case BACKUPKEY_RESTORE_GUID_INTEGER:
924 0 : break;
925 :
926 0 : case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER:
927 0 : break;
928 :
929 0 : case BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER:
930 0 : break;
931 :
932 0 : case BACKUPKEY_BACKUP_GUID_INTEGER:
933 0 : break;
934 :
935 0 : default:
936 0 : return ndr_push_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32, level);
937 : }
938 : }
939 0 : return NDR_ERR_SUCCESS;
940 : }
941 :
942 0 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_data_in_blob(struct ndr_pull *ndr, ndr_flags_type ndr_flags, union bkrp_data_in_blob *r)
943 : {
944 0 : uint32_t level;
945 0 : NDR_PULL_CHECK_FLAGS(ndr, ndr_flags);
946 0 : if (ndr_flags & NDR_SCALARS) {
947 : /* This token is not used again (except perhaps below in the NDR_BUFFERS case) */
948 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
949 0 : NDR_CHECK(ndr_pull_union_align(ndr, 4));
950 0 : switch (level) {
951 0 : case BACKUPKEY_RESTORE_GUID_INTEGER: {
952 0 : NDR_CHECK(ndr_pull_bkrp_client_side_wrapped(ndr, NDR_SCALARS, &r->restore_req));
953 0 : break; }
954 :
955 0 : case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER: {
956 0 : NDR_CHECK(ndr_pull_bkrp_empty(ndr, NDR_SCALARS, &r->empty));
957 0 : break; }
958 :
959 0 : case BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER: {
960 0 : NDR_CHECK(ndr_pull_bkrp_server_side_wrapped(ndr, NDR_SCALARS, &r->unsign_req));
961 0 : break; }
962 :
963 0 : case BACKUPKEY_BACKUP_GUID_INTEGER: {
964 0 : NDR_CHECK(ndr_pull_bkrp_opaque_blob(ndr, NDR_SCALARS, &r->sign_req));
965 0 : break; }
966 :
967 0 : default:
968 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
969 : }
970 : }
971 0 : if (ndr_flags & NDR_BUFFERS) {
972 0 : if (!(ndr_flags & NDR_SCALARS)) {
973 : /* We didn't get it above, and the token is not needed after this. */
974 0 : NDR_CHECK(ndr_pull_steal_switch_value(ndr, r, &level));
975 : }
976 0 : switch (level) {
977 0 : case BACKUPKEY_RESTORE_GUID_INTEGER:
978 0 : break;
979 :
980 0 : case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER:
981 0 : break;
982 :
983 0 : case BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER:
984 0 : break;
985 :
986 0 : case BACKUPKEY_BACKUP_GUID_INTEGER:
987 0 : break;
988 :
989 0 : default:
990 0 : return ndr_pull_error(ndr, NDR_ERR_BAD_SWITCH, "Bad switch value %"PRIu32" at %s", level, __location__);
991 : }
992 : }
993 0 : return NDR_ERR_SUCCESS;
994 : }
995 :
996 0 : _PUBLIC_ void ndr_print_bkrp_data_in_blob(struct ndr_print *ndr, const char *name, const union bkrp_data_in_blob *r)
997 : {
998 0 : uint32_t level;
999 0 : level = ndr_print_steal_switch_value(ndr, r);
1000 0 : ndr_print_union(ndr, name, level, "bkrp_data_in_blob");
1001 0 : switch (level) {
1002 0 : case BACKUPKEY_RESTORE_GUID_INTEGER:
1003 0 : ndr_print_bkrp_client_side_wrapped(ndr, "restore_req", &r->restore_req);
1004 0 : break;
1005 :
1006 0 : case BACKUPKEY_RETRIEVE_BACKUP_KEY_GUID_INTEGER:
1007 0 : ndr_print_bkrp_empty(ndr, "empty", &r->empty);
1008 0 : break;
1009 :
1010 0 : case BACKUPKEY_RESTORE_GUID_WIN2K_INTEGER:
1011 0 : ndr_print_bkrp_server_side_wrapped(ndr, "unsign_req", &r->unsign_req);
1012 0 : break;
1013 :
1014 0 : case BACKUPKEY_BACKUP_GUID_INTEGER:
1015 0 : ndr_print_bkrp_opaque_blob(ndr, "sign_req", &r->sign_req);
1016 0 : break;
1017 :
1018 0 : default:
1019 0 : ndr_print_bad_level(ndr, name, level);
1020 : }
1021 0 : }
1022 :
1023 280 : _PUBLIC_ enum ndr_err_code ndr_push_bkrp_BackupKey(struct ndr_push *ndr, ndr_flags_type flags, const struct bkrp_BackupKey *r)
1024 : {
1025 280 : NDR_PUSH_CHECK_FN_FLAGS(ndr, flags);
1026 280 : if (flags & NDR_IN) {
1027 211 : if (r->in.guidActionAgent == NULL) {
1028 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1029 : }
1030 211 : if (r->in.data_in == NULL) {
1031 2 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1032 : }
1033 209 : NDR_CHECK(ndr_push_GUID(ndr, NDR_SCALARS, r->in.guidActionAgent));
1034 209 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, r->in.data_in_len));
1035 209 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, r->in.data_in, r->in.data_in_len));
1036 209 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.data_in_len));
1037 209 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, r->in.param));
1038 : }
1039 278 : if (flags & NDR_OUT) {
1040 69 : if (r->out.data_out == NULL) {
1041 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1042 : }
1043 69 : if (r->out.data_out_len == NULL) {
1044 0 : return ndr_push_error(ndr, NDR_ERR_INVALID_POINTER, "NULL [ref] pointer");
1045 : }
1046 69 : NDR_CHECK(ndr_push_unique_ptr(ndr, *r->out.data_out));
1047 69 : if (*r->out.data_out) {
1048 33 : NDR_CHECK(ndr_push_uint3264(ndr, NDR_SCALARS, *r->out.data_out_len));
1049 33 : NDR_CHECK(ndr_push_array_uint8(ndr, NDR_SCALARS, *r->out.data_out, *r->out.data_out_len));
1050 : }
1051 69 : NDR_CHECK(ndr_push_uint32(ndr, NDR_SCALARS, *r->out.data_out_len));
1052 69 : NDR_CHECK(ndr_push_WERROR(ndr, NDR_SCALARS, r->out.result));
1053 : }
1054 278 : return NDR_ERR_SUCCESS;
1055 : }
1056 :
1057 166 : _PUBLIC_ enum ndr_err_code ndr_pull_bkrp_BackupKey(struct ndr_pull *ndr, ndr_flags_type flags, struct bkrp_BackupKey *r)
1058 : {
1059 166 : uint32_t size_data_in_1 = 0;
1060 0 : uint32_t _ptr_data_out;
1061 166 : uint32_t size_data_out_2 = 0;
1062 166 : TALLOC_CTX *_mem_save_guidActionAgent_0 = NULL;
1063 166 : TALLOC_CTX *_mem_save_data_out_0 = NULL;
1064 166 : TALLOC_CTX *_mem_save_data_out_1 = NULL;
1065 166 : TALLOC_CTX *_mem_save_data_out_len_0 = NULL;
1066 166 : NDR_PULL_CHECK_FN_FLAGS(ndr, flags);
1067 166 : if (flags & NDR_IN) {
1068 97 : NDR_ZERO_STRUCT(r->out);
1069 :
1070 97 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1071 97 : NDR_PULL_ALLOC(ndr, r->in.guidActionAgent);
1072 : }
1073 97 : _mem_save_guidActionAgent_0 = NDR_PULL_GET_MEM_CTX(ndr);
1074 97 : NDR_PULL_SET_MEM_CTX(ndr, r->in.guidActionAgent, LIBNDR_FLAG_REF_ALLOC);
1075 97 : NDR_CHECK(ndr_pull_GUID(ndr, NDR_SCALARS, r->in.guidActionAgent));
1076 97 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_guidActionAgent_0, LIBNDR_FLAG_REF_ALLOC);
1077 97 : NDR_CHECK(ndr_pull_array_size(ndr, &r->in.data_in));
1078 97 : NDR_CHECK(ndr_get_array_size(ndr, (void*)&r->in.data_in, &size_data_in_1));
1079 97 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1080 97 : NDR_PULL_ALLOC_N(ndr, r->in.data_in, size_data_in_1);
1081 : }
1082 97 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, r->in.data_in, size_data_in_1));
1083 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.data_in_len));
1084 97 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, &r->in.param));
1085 97 : NDR_PULL_ALLOC(ndr, r->out.data_out);
1086 97 : NDR_ZERO_STRUCTP(r->out.data_out);
1087 97 : NDR_PULL_ALLOC(ndr, r->out.data_out_len);
1088 97 : NDR_ZERO_STRUCTP(r->out.data_out_len);
1089 97 : if (r->in.data_in) {
1090 97 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)&r->in.data_in, r->in.data_in_len));
1091 : }
1092 : }
1093 166 : if (flags & NDR_OUT) {
1094 : #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
1095 : if (r->in.guidActionAgent == NULL) {
1096 : NDR_PULL_ALLOC(ndr, r->in.guidActionAgent);
1097 : NDR_ZERO_STRUCTP(r->in.guidActionAgent);
1098 : }
1099 : #endif /* FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION */
1100 69 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1101 0 : NDR_PULL_ALLOC(ndr, r->out.data_out);
1102 : }
1103 69 : _mem_save_data_out_0 = NDR_PULL_GET_MEM_CTX(ndr);
1104 69 : NDR_PULL_SET_MEM_CTX(ndr, r->out.data_out, LIBNDR_FLAG_REF_ALLOC);
1105 69 : NDR_CHECK(ndr_pull_generic_ptr(ndr, &_ptr_data_out));
1106 69 : if (_ptr_data_out) {
1107 33 : NDR_PULL_ALLOC(ndr, *r->out.data_out);
1108 : } else {
1109 36 : *r->out.data_out = NULL;
1110 : }
1111 69 : if (*r->out.data_out) {
1112 33 : _mem_save_data_out_1 = NDR_PULL_GET_MEM_CTX(ndr);
1113 33 : NDR_PULL_SET_MEM_CTX(ndr, *r->out.data_out, 0);
1114 33 : NDR_CHECK(ndr_pull_array_size(ndr, r->out.data_out));
1115 33 : NDR_CHECK(ndr_get_array_size(ndr, (void*)r->out.data_out, &size_data_out_2));
1116 33 : NDR_PULL_ALLOC_N(ndr, *r->out.data_out, size_data_out_2);
1117 33 : NDR_CHECK(ndr_pull_array_uint8(ndr, NDR_SCALARS, *r->out.data_out, size_data_out_2));
1118 33 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_out_1, 0);
1119 : }
1120 69 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_out_0, LIBNDR_FLAG_REF_ALLOC);
1121 69 : if (ndr->flags & LIBNDR_FLAG_REF_ALLOC) {
1122 0 : NDR_PULL_ALLOC(ndr, r->out.data_out_len);
1123 : }
1124 69 : _mem_save_data_out_len_0 = NDR_PULL_GET_MEM_CTX(ndr);
1125 69 : NDR_PULL_SET_MEM_CTX(ndr, r->out.data_out_len, LIBNDR_FLAG_REF_ALLOC);
1126 69 : NDR_CHECK(ndr_pull_uint32(ndr, NDR_SCALARS, r->out.data_out_len));
1127 69 : NDR_PULL_SET_MEM_CTX(ndr, _mem_save_data_out_len_0, LIBNDR_FLAG_REF_ALLOC);
1128 69 : NDR_CHECK(ndr_pull_WERROR(ndr, NDR_SCALARS, &r->out.result));
1129 69 : if (*r->out.data_out) {
1130 33 : NDR_CHECK(ndr_check_steal_array_size(ndr, (void*)r->out.data_out, *r->out.data_out_len));
1131 : }
1132 : }
1133 166 : return NDR_ERR_SUCCESS;
1134 : }
1135 :
1136 : #ifndef SKIP_NDR_TABLE_backupkey
1137 : static const struct ndr_interface_public_struct backupkey_public_structs[] = {
1138 : {
1139 : .name = "bkrp_exported_RSA_key_pair",
1140 : .struct_size = sizeof(struct bkrp_exported_RSA_key_pair ),
1141 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_exported_RSA_key_pair,
1142 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_exported_RSA_key_pair,
1143 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_exported_RSA_key_pair,
1144 : },
1145 : {
1146 : .name = "bkrp_dc_serverwrap_key",
1147 : .struct_size = sizeof(struct bkrp_dc_serverwrap_key ),
1148 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_dc_serverwrap_key,
1149 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_dc_serverwrap_key,
1150 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_dc_serverwrap_key,
1151 : },
1152 : {
1153 : .name = "bkrp_empty",
1154 : .struct_size = sizeof(struct bkrp_empty ),
1155 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_empty,
1156 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_empty,
1157 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_empty,
1158 : },
1159 : {
1160 : .name = "bkrp_client_side_wrapped",
1161 : .struct_size = sizeof(struct bkrp_client_side_wrapped ),
1162 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_client_side_wrapped,
1163 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_client_side_wrapped,
1164 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_client_side_wrapped,
1165 : },
1166 : {
1167 : .name = "bkrp_client_side_unwrapped",
1168 : .struct_size = sizeof(struct bkrp_client_side_unwrapped ),
1169 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_client_side_unwrapped,
1170 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_client_side_unwrapped,
1171 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_client_side_unwrapped,
1172 : },
1173 : {
1174 : .name = "bkrp_encrypted_secret_v2",
1175 : .struct_size = sizeof(struct bkrp_encrypted_secret_v2 ),
1176 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_encrypted_secret_v2,
1177 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_encrypted_secret_v2,
1178 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_encrypted_secret_v2,
1179 : },
1180 : {
1181 : .name = "bkrp_encrypted_secret_v3",
1182 : .struct_size = sizeof(struct bkrp_encrypted_secret_v3 ),
1183 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_encrypted_secret_v3,
1184 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_encrypted_secret_v3,
1185 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_encrypted_secret_v3,
1186 : },
1187 : {
1188 : .name = "bkrp_access_check_v2",
1189 : .struct_size = sizeof(struct bkrp_access_check_v2 ),
1190 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_access_check_v2,
1191 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_access_check_v2,
1192 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_access_check_v2,
1193 : },
1194 : {
1195 : .name = "bkrp_access_check_v3",
1196 : .struct_size = sizeof(struct bkrp_access_check_v3 ),
1197 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_access_check_v3,
1198 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_access_check_v3,
1199 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_access_check_v3,
1200 : },
1201 : {
1202 : .name = "bkrp_rc4encryptedpayload",
1203 : .struct_size = sizeof(struct bkrp_rc4encryptedpayload ),
1204 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_rc4encryptedpayload,
1205 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_rc4encryptedpayload,
1206 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_rc4encryptedpayload,
1207 : },
1208 : {
1209 : .name = "bkrp_server_side_wrapped",
1210 : .struct_size = sizeof(struct bkrp_server_side_wrapped ),
1211 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_server_side_wrapped,
1212 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_server_side_wrapped,
1213 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_server_side_wrapped,
1214 : },
1215 : {
1216 : .name = "bkrp_opaque_blob",
1217 : .struct_size = sizeof(struct bkrp_opaque_blob ),
1218 : .ndr_push = (ndr_push_flags_fn_t) ndr_push_bkrp_opaque_blob,
1219 : .ndr_pull = (ndr_pull_flags_fn_t) ndr_pull_bkrp_opaque_blob,
1220 : .ndr_print = (ndr_print_function_t) ndr_print_flags_bkrp_opaque_blob,
1221 : },
1222 : { .name = NULL }
1223 : };
1224 :
1225 : static const struct ndr_interface_call backupkey_calls[] = {
1226 : {
1227 : "bkrp_BackupKey",
1228 : sizeof(struct bkrp_BackupKey),
1229 : (ndr_push_flags_fn_t) ndr_push_bkrp_BackupKey,
1230 : (ndr_pull_flags_fn_t) ndr_pull_bkrp_BackupKey,
1231 : (ndr_print_function_t) ndr_print_bkrp_BackupKey,
1232 : { 0, NULL },
1233 : { 0, NULL },
1234 : },
1235 : { .name = NULL }
1236 : };
1237 :
1238 : static const char * const backupkey_endpoint_strings[] = {
1239 : "ncacn_np:[\\pipe\\protected_storage]",
1240 : "ncacn_ip_tcp:",
1241 : };
1242 :
1243 : static const struct ndr_interface_string_array backupkey_endpoints = {
1244 : .count = 2,
1245 : .names = backupkey_endpoint_strings
1246 : };
1247 :
1248 : static const char * const backupkey_authservice_strings[] = {
1249 : "host",
1250 : };
1251 :
1252 : static const struct ndr_interface_string_array backupkey_authservices = {
1253 : .count = 1,
1254 : .names = backupkey_authservice_strings
1255 : };
1256 :
1257 :
1258 : const struct ndr_interface_table ndr_table_backupkey = {
1259 : .name = "backupkey",
1260 : .syntax_id = {
1261 : {0x3dde7c30,0x165d,0x11d1,{0xab,0x8f},{0x00,0x80,0x5f,0x14,0xdb,0x40}},
1262 : NDR_BACKUPKEY_VERSION
1263 : },
1264 : .helpstring = NDR_BACKUPKEY_HELPSTRING,
1265 : .num_calls = 1,
1266 : .calls = backupkey_calls,
1267 : .num_public_structs = 12,
1268 : .public_structs = backupkey_public_structs,
1269 : .endpoints = &backupkey_endpoints,
1270 : .authservices = &backupkey_authservices
1271 : };
1272 :
1273 : #endif /* SKIP_NDR_TABLE_backupkey */
|