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