FreeRDP
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
rdpear_common.c
1
19#include <rdpear-common/rdpear_common.h>
20#include <rdpear-common/rdpear_asn1.h>
21#include <rdpear-common/ndr.h>
22
23#include <stddef.h>
24#include <winpr/print.h>
25#include <freerdp/channels/log.h>
26
27#define TAG CHANNELS_TAG("rdpear")
28
29static char kerberosPackageName[] = {
30 'K', 0, 'e', 0, 'r', 0, 'b', 0, 'e', 0, 'r', 0, 'o', 0, 's', 0
31};
32static char ntlmPackageName[] = { 'N', 0, 'T', 0, 'L', 0, 'M', 0 };
33
34RdpEarPackageType rdpear_packageType_from_name(WinPrAsn1_OctetString* package)
35{
36 if (package->len == sizeof(kerberosPackageName) &&
37 memcmp(package->data, kerberosPackageName, package->len) == 0)
38 return RDPEAR_PACKAGE_KERBEROS;
39
40 if (package->len == sizeof(ntlmPackageName) &&
41 memcmp(package->data, ntlmPackageName, package->len) == 0)
42 return RDPEAR_PACKAGE_NTLM;
43
44 return RDPEAR_PACKAGE_UNKNOWN;
45}
46
47wStream* rdpear_encodePayload(RdpEarPackageType packageType, wStream* payload)
48{
49 wStream* ret = NULL;
50 WinPrAsn1Encoder* enc = WinPrAsn1Encoder_New(WINPR_ASN1_DER);
51 if (!enc)
52 return NULL;
53
54 /* TSRemoteGuardInnerPacket ::= SEQUENCE { */
55 if (!WinPrAsn1EncSeqContainer(enc))
56 goto out;
57
58 /* packageName [1] OCTET STRING */
59 WinPrAsn1_OctetString packageOctetString;
60 switch (packageType)
61 {
62 case RDPEAR_PACKAGE_KERBEROS:
63 packageOctetString.data = (BYTE*)kerberosPackageName;
64 packageOctetString.len = sizeof(kerberosPackageName);
65 break;
66 case RDPEAR_PACKAGE_NTLM:
67 packageOctetString.data = (BYTE*)ntlmPackageName;
68 packageOctetString.len = sizeof(ntlmPackageName);
69 break;
70 default:
71 goto out;
72 }
73
74 if (!WinPrAsn1EncContextualOctetString(enc, 1, &packageOctetString))
75 goto out;
76
77 /* buffer [2] OCTET STRING*/
78 WinPrAsn1_OctetString payloadOctetString = { Stream_GetPosition(payload),
79 Stream_Buffer(payload) };
80 if (!WinPrAsn1EncContextualOctetString(enc, 2, &payloadOctetString))
81 goto out;
82
83 /* } */
84 if (!WinPrAsn1EncEndContainer(enc))
85 goto out;
86
87 ret = Stream_New(NULL, 100);
88 if (!ret)
89 goto out;
90
91 if (!WinPrAsn1EncToStream(enc, ret))
92 {
93 Stream_Free(ret, TRUE);
94 ret = NULL;
95 goto out;
96 }
97out:
98 WinPrAsn1Encoder_Free(&enc);
99 return ret;
100}
101
102#define RDPEAR_SIMPLE_MESSAGE_TYPE(V) \
103 BOOL ndr_read_##V(NdrContext* context, wStream* s, const void* hints, V* obj) \
104 { \
105 WINPR_UNUSED(hints); \
106 return ndr_struct_read_fromDescr(context, s, &V##_struct, obj); \
107 } \
108 BOOL ndr_write_##V(NdrContext* context, wStream* s, const void* hints, const V* obj) \
109 { \
110 WINPR_UNUSED(hints); \
111 return ndr_struct_write_fromDescr(context, s, &V##_struct, obj); \
112 } \
113 void ndr_destroy_##V(NdrContext* context, const void* hints, V* obj) \
114 { \
115 WINPR_UNUSED(hints); \
116 ndr_struct_destroy(context, &V##_struct, obj); \
117 } \
118 void ndr_dump_##V(wLog* logger, UINT32 lvl, size_t indentLevel, const V* obj) \
119 { \
120 ndr_struct_dump_fromDescr(logger, lvl, indentLevel, &V##_struct, obj); \
121 } \
122 \
123 static BOOL ndr_descr_read_##V(NdrContext* context, wStream* s, const void* hints, void* obj) \
124 { \
125 WINPR_UNUSED(hints); \
126 return ndr_struct_read_fromDescr(context, s, &V##_struct, obj); \
127 } \
128 static BOOL ndr_descr_write_##V(NdrContext* context, wStream* s, const void* hints, \
129 const void* obj) \
130 { \
131 WINPR_UNUSED(hints); \
132 return ndr_struct_write_fromDescr(context, s, &V##_struct, obj); \
133 } \
134 static void ndr_descr_destroy_##V(NdrContext* context, const void* hints, void* obj) \
135 { \
136 WINPR_UNUSED(hints); \
137 ndr_struct_destroy(context, &V##_struct, obj); \
138 } \
139 static void ndr_descr_dump_##V(wLog* logger, UINT32 lvl, size_t indentLevel, const void* obj) \
140 { \
141 ndr_struct_dump_fromDescr(logger, lvl, indentLevel, &V##_struct, obj); \
142 } \
143 \
144 static NdrMessageDescr ndr_##V##_descr_s = { \
145 NDR_ARITY_SIMPLE, sizeof(V), ndr_descr_read_##V, ndr_descr_write_##V, \
146 ndr_descr_destroy_##V, ndr_descr_dump_##V, \
147 }; \
148 \
149 NdrMessageType ndr_##V##_descr(void) \
150 { \
151 return &ndr_##V##_descr_s; \
152 }
153
154static const NdrFieldStruct KERB_RPC_OCTET_STRING_fields[] = {
155 { "Length", offsetof(KERB_RPC_OCTET_STRING, length), NDR_NOT_POINTER, -1, &ndr_uint32_descr_s },
156 { "value", offsetof(KERB_RPC_OCTET_STRING, value), NDR_POINTER_NON_NULL, 0,
157 &ndr_uint8Array_descr_s }
158};
159static const NdrStructDescr KERB_RPC_OCTET_STRING_struct = { "KERB_RPC_OCTET_STRING", 2,
160 KERB_RPC_OCTET_STRING_fields };
161
162RDPEAR_SIMPLE_MESSAGE_TYPE(KERB_RPC_OCTET_STRING)
163
164/* ============================= KERB_ASN1_DATA ============================== */
165
166static const NdrFieldStruct KERB_ASN1_DATA_fields[] = {
167 { "Pdu", offsetof(KERB_ASN1_DATA, Pdu), NDR_NOT_POINTER, -1, &ndr_uint32_descr_s },
168 { "Count", offsetof(KERB_ASN1_DATA, Asn1BufferHints.count), NDR_NOT_POINTER, -1,
169 &ndr_uint32_descr_s },
170 { "Asn1Buffer", offsetof(KERB_ASN1_DATA, Asn1Buffer), NDR_POINTER_NON_NULL, 1,
171 &ndr_uint8Array_descr_s }
172};
173static const NdrStructDescr KERB_ASN1_DATA_struct = { "KERB_ASN1_DATA",
174 ARRAYSIZE(KERB_ASN1_DATA_fields),
175 KERB_ASN1_DATA_fields };
176
177RDPEAR_SIMPLE_MESSAGE_TYPE(KERB_ASN1_DATA)
178
179/* ============================ RPC_UNICODE_STRING ========================== */
180
181BOOL ndr_read_RPC_UNICODE_STRING(NdrContext* context, wStream* s, const void* hints,
183{
184 NdrDeferredEntry bufferDesc = { NDR_PTR_NULL, "RPC_UNICODE_STRING.Buffer", &res->lenHints,
185 (void*)&res->Buffer, ndr_uint16VaryingArray_descr() };
186 UINT16 Length = 0;
187 UINT16 MaximumLength = 0;
188
189 WINPR_UNUSED(hints);
190 if (!ndr_read_uint16(context, s, &Length) || !ndr_read_uint16(context, s, &MaximumLength) ||
191 !ndr_read_refpointer(context, s, &bufferDesc.ptrId) || Length > MaximumLength)
192 return FALSE;
193
194 res->lenHints.length = Length;
195 res->lenHints.maxLength = MaximumLength;
196 res->strLength = Length / 2;
197
198 return ndr_push_deferreds(context, &bufferDesc, 1);
199}
200
201static BOOL ndr_descr_read_RPC_UNICODE_STRING(NdrContext* context, wStream* s, const void* hints,
202 void* res)
203{
204 return ndr_read_RPC_UNICODE_STRING(context, s, hints, res);
205}
206
207BOOL ndr_write_RPC_UNICODE_STRING(NdrContext* context, wStream* s,
208 WINPR_ATTR_UNUSED const void* hints,
209 const RPC_UNICODE_STRING* res)
210{
211 WINPR_ASSERT(res);
212 if (!ndr_write_uint32(context, s, res->lenHints.length))
213 return FALSE;
214
215 if (!ndr_write_uint32(context, s, res->lenHints.maxLength))
216 return FALSE;
217
218 return ndr_write_data(context, s, res->Buffer, res->strLength);
219}
220
221static BOOL ndr_write_RPC_UNICODE_STRING_(NdrContext* context, wStream* s, const void* hints,
222 const void* pvres)
223{
224 const RPC_UNICODE_STRING* res = pvres;
225 return ndr_write_RPC_UNICODE_STRING(context, s, hints, res);
226}
227
228void ndr_dump_RPC_UNICODE_STRING(wLog* logger, UINT32 lvl, size_t indentLevel,
229 const RPC_UNICODE_STRING* obj)
230{
231 WINPR_UNUSED(indentLevel);
232 WLog_Print(logger, lvl, "\tLength=%d MaximumLength=%d", obj->lenHints.length,
233 obj->lenHints.maxLength);
234 winpr_HexLogDump(logger, lvl, obj->Buffer, obj->lenHints.length);
235}
236
237static void ndr_descr_dump_RPC_UNICODE_STRING(wLog* logger, UINT32 lvl, size_t indentLevel,
238 const void* obj)
239{
240 ndr_dump_RPC_UNICODE_STRING(logger, lvl, indentLevel, obj);
241}
242
243void ndr_destroy_RPC_UNICODE_STRING(NdrContext* context, const void* hints, RPC_UNICODE_STRING* obj)
244{
245 WINPR_UNUSED(context);
246 WINPR_UNUSED(hints);
247 if (!obj)
248 return;
249 free(obj->Buffer);
250 obj->Buffer = NULL;
251}
252
253static void ndr_descr_destroy_RPC_UNICODE_STRING(NdrContext* context, const void* hints, void* obj)
254{
255 ndr_destroy_RPC_UNICODE_STRING(context, hints, obj);
256}
257
258static const NdrMessageDescr RPC_UNICODE_STRING_descr_s = { NDR_ARITY_SIMPLE,
259 sizeof(RPC_UNICODE_STRING),
260 ndr_descr_read_RPC_UNICODE_STRING,
261 ndr_write_RPC_UNICODE_STRING_,
262 ndr_descr_destroy_RPC_UNICODE_STRING,
263 ndr_descr_dump_RPC_UNICODE_STRING };
264
265NdrMessageType ndr_RPC_UNICODE_STRING_descr(void)
266{
267 return &RPC_UNICODE_STRING_descr_s;
268}
269
270/* ========================= RPC_UNICODE_STRING_Array ======================== */
271
272static BOOL ndr_read_RPC_UNICODE_STRING_Array(NdrContext* context, wStream* s, const void* hints,
273 void* v)
274{
275 WINPR_ASSERT(context);
276 WINPR_ASSERT(s);
277 WINPR_ASSERT(hints);
278 return ndr_read_uconformant_array(context, s, hints, ndr_RPC_UNICODE_STRING_descr(), v);
279}
280
281static BOOL ndr_write_RPC_UNICODE_STRING_Array(NdrContext* context, wStream* s, const void* ghints,
282 const void* v)
283{
284 WINPR_ASSERT(context);
285 WINPR_ASSERT(s);
286 WINPR_ASSERT(ghints);
287
288 const NdrArrayHints* hints = (const NdrArrayHints*)ghints;
289
290 return ndr_write_uconformant_array(context, s, hints->count, ndr_RPC_UNICODE_STRING_descr(), v);
291}
292
293static const NdrMessageDescr RPC_UNICODE_STRING_Array_descr_s = {
294 NDR_ARITY_ARRAYOF,
295 sizeof(RPC_UNICODE_STRING),
296 ndr_read_RPC_UNICODE_STRING_Array,
297 ndr_write_RPC_UNICODE_STRING_Array,
298 NULL,
299 NULL
300};
301
302static NdrMessageType ndr_RPC_UNICODE_STRING_Array_descr(void)
303{
304 return &RPC_UNICODE_STRING_Array_descr_s;
305}
306
307/* ========================== KERB_RPC_INTERNAL_NAME ======================== */
308
309BOOL ndr_read_KERB_RPC_INTERNAL_NAME(NdrContext* context, wStream* s, const void* hints,
311{
312 WINPR_ASSERT(res);
313
314 union
315 {
316 RPC_UNICODE_STRING** ppstr;
317 void* pv;
318 } cnv;
319 cnv.ppstr = &res->Names;
320 NdrDeferredEntry names = { NDR_PTR_NULL, "KERB_RPC_INTERNAL_NAME.Names", &res->nameHints,
321 cnv.pv, ndr_RPC_UNICODE_STRING_Array_descr() };
322
323 UINT16 nameCount = 0;
324 WINPR_UNUSED(hints);
325
326 if (!ndr_read_uint16(context, s, &res->NameType) || !ndr_read_uint16(context, s, &nameCount))
327 return FALSE;
328
329 res->nameHints.count = nameCount;
330
331 return ndr_read_refpointer(context, s, &names.ptrId) && ndr_push_deferreds(context, &names, 1);
332}
333
334static BOOL ndr_descr_read_KERB_RPC_INTERNAL_NAME(NdrContext* context, wStream* s,
335 const void* hints, void* res)
336{
337 return ndr_read_KERB_RPC_INTERNAL_NAME(context, s, hints, res);
338}
339
340BOOL ndr_write_KERB_RPC_INTERNAL_NAME(NdrContext* context, wStream* s, const void* hints,
341 const KERB_RPC_INTERNAL_NAME* res)
342{
343 WINPR_UNUSED(context);
344 WINPR_UNUSED(s);
345 WINPR_UNUSED(hints);
346 WINPR_UNUSED(res);
347 WLog_ERR(TAG, "TODO: implement this");
348 return FALSE;
349}
350
351void ndr_dump_KERB_RPC_INTERNAL_NAME(wLog* logger, UINT32 lvl, size_t indentLevel,
352 const KERB_RPC_INTERNAL_NAME* obj)
353{
354 WINPR_UNUSED(indentLevel);
355 WINPR_UNUSED(obj);
356 WLog_Print(logger, lvl, "TODO: implement this");
357}
358
359static void ndr_descr_dump_KERB_RPC_INTERNAL_NAME(wLog* logger, UINT32 lvl, size_t indentLevel,
360 const void* obj)
361{
362 ndr_dump_KERB_RPC_INTERNAL_NAME(logger, lvl, indentLevel, obj);
363}
364
365void ndr_destroy_KERB_RPC_INTERNAL_NAME(NdrContext* context, const void* hints,
367{
368 WINPR_UNUSED(hints);
369 if (!obj)
370 return;
371
372 for (UINT32 i = 0; i < obj->nameHints.count; i++)
373 ndr_destroy_RPC_UNICODE_STRING(context, NULL, &obj->Names[i]);
374
375 free(obj->Names);
376 obj->Names = NULL;
377}
378
379static void ndr_descr_destroy_KERB_RPC_INTERNAL_NAME(NdrContext* context, const void* hints,
380 void* obj)
381{
382 ndr_destroy_KERB_RPC_INTERNAL_NAME(context, hints, obj);
383}
384
385static NdrMessageDescr KERB_RPC_INTERNAL_NAME_descr_s = { NDR_ARITY_SIMPLE,
387 ndr_descr_read_KERB_RPC_INTERNAL_NAME,
388 NULL,
389 ndr_descr_destroy_KERB_RPC_INTERNAL_NAME,
390 ndr_descr_dump_KERB_RPC_INTERNAL_NAME };
391
392NdrMessageType ndr_KERB_RPC_INTERNAL_NAME_descr(void)
393{
394 return &KERB_RPC_INTERNAL_NAME_descr_s;
395}
396
397/* ========================== KERB_RPC_ENCRYPTION_KEY ======================== */
398
399static const NdrFieldStruct KERB_RPC_ENCRYPTION_KEY_fields[] = {
400 { "reserved1", offsetof(KERB_RPC_ENCRYPTION_KEY, reserved1), NDR_NOT_POINTER, -1,
401 &ndr_uint32_descr_s },
402 { "reserved2", offsetof(KERB_RPC_ENCRYPTION_KEY, reserved2), NDR_NOT_POINTER, -1,
403 &ndr_uint32_descr_s },
404 { "reserved3", offsetof(KERB_RPC_ENCRYPTION_KEY, reserved3), NDR_NOT_POINTER, -1,
405 &ndr_KERB_RPC_OCTET_STRING_descr_s }
406};
407static const NdrStructDescr KERB_RPC_ENCRYPTION_KEY_struct = {
408 "KERB_RPC_ENCRYPTION_KEY", ARRAYSIZE(KERB_RPC_ENCRYPTION_KEY_fields),
409 KERB_RPC_ENCRYPTION_KEY_fields
410};
411
412RDPEAR_SIMPLE_MESSAGE_TYPE(KERB_RPC_ENCRYPTION_KEY)
413
414/* ========================== BuildEncryptedAuthDataReq ======================== */
415
416static const NdrFieldStruct BuildEncryptedAuthDataReq_fields[] = {
417 { "KeyUsage", offsetof(BuildEncryptedAuthDataReq, KeyUsage), NDR_NOT_POINTER, -1,
418 &ndr_uint32_descr_s },
419 { "key", offsetof(BuildEncryptedAuthDataReq, Key), NDR_POINTER_NON_NULL, -1,
420 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
421 { "plainAuthData", offsetof(BuildEncryptedAuthDataReq, PlainAuthData), NDR_POINTER_NON_NULL, -1,
422 &ndr_KERB_ASN1_DATA_descr_s }
423};
424static const NdrStructDescr BuildEncryptedAuthDataReq_struct = {
425 "BuildEncryptedAuthDataReq", ARRAYSIZE(BuildEncryptedAuthDataReq_fields),
426 BuildEncryptedAuthDataReq_fields
427};
428
429RDPEAR_SIMPLE_MESSAGE_TYPE(BuildEncryptedAuthDataReq)
430
431/* ========================== ComputeTgsChecksumReq ======================== */
432
433static const NdrFieldStruct ComputeTgsChecksumReq_fields[] = {
434 { "requestBody", offsetof(ComputeTgsChecksumReq, requestBody), NDR_POINTER_NON_NULL, -1,
435 &ndr_KERB_ASN1_DATA_descr_s },
436 { "key", offsetof(ComputeTgsChecksumReq, Key), NDR_POINTER_NON_NULL, -1,
437 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
438 { "ChecksumType", offsetof(ComputeTgsChecksumReq, ChecksumType), NDR_NOT_POINTER, -1,
439 &ndr_uint32_descr_s }
440};
441static const NdrStructDescr ComputeTgsChecksumReq_struct = {
442 "ComputeTgsChecksumReq", ARRAYSIZE(ComputeTgsChecksumReq_fields), ComputeTgsChecksumReq_fields
443};
444
445RDPEAR_SIMPLE_MESSAGE_TYPE(ComputeTgsChecksumReq)
446
447/* ========================== CreateApReqAuthenticatorReq ======================== */
448
449static const NdrFieldStruct CreateApReqAuthenticatorReq_fields[] = {
450 { "EncryptionKey", offsetof(CreateApReqAuthenticatorReq, EncryptionKey), NDR_POINTER_NON_NULL,
451 -1, &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
452 { "SequenceNumber", offsetof(CreateApReqAuthenticatorReq, SequenceNumber), NDR_NOT_POINTER, -1,
453 &ndr_uint32_descr_s },
454 { "ClientName", offsetof(CreateApReqAuthenticatorReq, ClientName), NDR_POINTER_NON_NULL, -1,
455 &KERB_RPC_INTERNAL_NAME_descr_s },
456 { "ClientRealm", offsetof(CreateApReqAuthenticatorReq, ClientRealm), NDR_POINTER_NON_NULL, -1,
457 &RPC_UNICODE_STRING_descr_s },
458 { "SkewTime", offsetof(CreateApReqAuthenticatorReq, SkewTime), NDR_POINTER_NON_NULL, -1,
459 &ndr_uint64_descr_s },
460 { "SubKey", offsetof(CreateApReqAuthenticatorReq, SubKey), NDR_POINTER, -1,
461 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
462 { "AuthData", offsetof(CreateApReqAuthenticatorReq, AuthData), NDR_POINTER_NON_NULL, -1,
463 &ndr_KERB_ASN1_DATA_descr_s },
464 { "GssChecksum", offsetof(CreateApReqAuthenticatorReq, GssChecksum), NDR_POINTER, -1,
465 &ndr_KERB_ASN1_DATA_descr_s },
466 { "KeyUsage", offsetof(CreateApReqAuthenticatorReq, KeyUsage), NDR_NOT_POINTER, -1,
467 &ndr_uint32_descr_s },
468};
469static const NdrStructDescr CreateApReqAuthenticatorReq_struct = {
470 "CreateApReqAuthenticatorReq", ARRAYSIZE(CreateApReqAuthenticatorReq_fields),
471 CreateApReqAuthenticatorReq_fields
472};
473
474RDPEAR_SIMPLE_MESSAGE_TYPE(CreateApReqAuthenticatorReq)
475
476/* ========================== CreateApReqAuthenticatorResp ======================== */
477
478static const NdrFieldStruct CreateApReqAuthenticatorResp_fields[] = {
479 { "AuthenticatorTime", offsetof(CreateApReqAuthenticatorResp, AuthenticatorTime),
480 NDR_NOT_POINTER, -1, &ndr_uint64_descr_s },
481 { "Authenticator", offsetof(CreateApReqAuthenticatorResp, Authenticator), NDR_NOT_POINTER, -1,
482 &ndr_KERB_ASN1_DATA_descr_s },
483 { "KerbProtocolError", offsetof(CreateApReqAuthenticatorResp, KerbProtocolError),
484 NDR_NOT_POINTER, -1, &ndr_uint32_descr_s },
485};
486
487static const NdrStructDescr CreateApReqAuthenticatorResp_struct = {
488 "CreateApReqAuthenticatorResp", ARRAYSIZE(CreateApReqAuthenticatorResp_fields),
489 CreateApReqAuthenticatorResp_fields
490};
491
492RDPEAR_SIMPLE_MESSAGE_TYPE(CreateApReqAuthenticatorResp)
493
494/* ========================== UnpackKdcReplyBodyReq ======================== */
495
496static const NdrFieldStruct UnpackKdcReplyBodyReq_fields[] = {
497 { "EncryptedData", offsetof(UnpackKdcReplyBodyReq, EncryptedData), NDR_POINTER_NON_NULL, -1,
498 &ndr_KERB_ASN1_DATA_descr_s },
499 { "Key", offsetof(UnpackKdcReplyBodyReq, Key), NDR_POINTER_NON_NULL, -1,
500 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
501 { "StrenghtenKey", offsetof(UnpackKdcReplyBodyReq, StrengthenKey), NDR_POINTER, -1,
502 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
503 { "Pdu", offsetof(UnpackKdcReplyBodyReq, Pdu), NDR_NOT_POINTER, -1, &ndr_uint32_descr_s },
504 { "KeyUsage", offsetof(UnpackKdcReplyBodyReq, KeyUsage), NDR_NOT_POINTER, -1,
505 &ndr_uint32_descr_s },
506};
507
508static const NdrStructDescr UnpackKdcReplyBodyReq_struct = {
509 "UnpackKdcReplyBodyReq", ARRAYSIZE(UnpackKdcReplyBodyReq_fields), UnpackKdcReplyBodyReq_fields
510};
511
512RDPEAR_SIMPLE_MESSAGE_TYPE(UnpackKdcReplyBodyReq)
513
514/* ========================== UnpackKdcReplyBodyResp ======================== */
515
516static const NdrFieldStruct UnpackKdcReplyBodyResp_fields[] = {
517 { "KerbProtocolError", offsetof(UnpackKdcReplyBodyResp, KerbProtocolError), NDR_NOT_POINTER, -1,
518 &ndr_uint32_descr_s },
519 { "ReplyBody", offsetof(UnpackKdcReplyBodyResp, ReplyBody), NDR_NOT_POINTER, -1,
520 &ndr_KERB_ASN1_DATA_descr_s }
521};
522
523static const NdrStructDescr UnpackKdcReplyBodyResp_struct = {
524 "UnpackKdcReplyBodyResp", ARRAYSIZE(UnpackKdcReplyBodyResp_fields),
525 UnpackKdcReplyBodyResp_fields
526};
527
528RDPEAR_SIMPLE_MESSAGE_TYPE(UnpackKdcReplyBodyResp)
529
530/* ========================== DecryptApReplyReq ======================== */
531
532static const NdrFieldStruct DecryptApReplyReq_fields[] = {
533 { "EncryptedReply", offsetof(DecryptApReplyReq, EncryptedReply), NDR_POINTER_NON_NULL, -1,
534 &ndr_KERB_ASN1_DATA_descr_s },
535 { "Key", offsetof(DecryptApReplyReq, Key), NDR_POINTER_NON_NULL, -1,
536 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s }
537};
538
539static const NdrStructDescr DecryptApReplyReq_struct = { "DecryptApReplyReq",
540 ARRAYSIZE(DecryptApReplyReq_fields),
541 DecryptApReplyReq_fields };
542
543RDPEAR_SIMPLE_MESSAGE_TYPE(DecryptApReplyReq)
544
545/* ========================== PackApReplyReq ======================== */
546
547static const NdrFieldStruct PackApReplyReq_fields[] = {
548 { "Reply", offsetof(PackApReplyReq, Reply), NDR_POINTER_NON_NULL, -1,
549 &ndr_KERB_ASN1_DATA_descr_s },
550 { "ReplyBody", offsetof(PackApReplyReq, ReplyBody), NDR_POINTER_NON_NULL, -1,
551 &ndr_KERB_ASN1_DATA_descr_s },
552 { "SessionKey", offsetof(PackApReplyReq, SessionKey), NDR_POINTER_NON_NULL, -1,
553 &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s }
554};
555
556static const NdrStructDescr PackApReplyReq_struct = { "PackApReplyReq",
557 ARRAYSIZE(PackApReplyReq_fields),
558 PackApReplyReq_fields };
559
560RDPEAR_SIMPLE_MESSAGE_TYPE(PackApReplyReq)
561
562/* ========================== PackApReplyResp ======================== */
563
564static const NdrFieldStruct PackApReplyResp_fields[] = {
565 { "PackedReplySize", offsetof(PackApReplyResp, PackedReplyHints), NDR_NOT_POINTER, -1,
566 &ndr_uint32_descr_s },
567 { "PackedReply", offsetof(PackApReplyResp, PackedReply), NDR_POINTER_NON_NULL, 0,
568 &ndr_uint8Array_descr_s },
569};
570
571static const NdrStructDescr PackApReplyResp_struct = { "PackApReplyResp",
572 ARRAYSIZE(PackApReplyResp_fields),
573 PackApReplyResp_fields };
574
575RDPEAR_SIMPLE_MESSAGE_TYPE(PackApReplyResp)
2.2.2.1.8 BuildEncryptedAuthData
2.2.2.1.7 ComputeTgsChecksum
2.2.2.1.4 CreateApReqAuthenticator
2.2.2.1.4 CreateApReqAuthenticator
2.2.1.2.1 KERB_ASN1_DATA
2.2.1.2.8 KERB_RPC_ENCRYPTION_KEY
2.2.1.2.3 KERB_RPC_INTERNAL_NAME
2.2.1.2.2 KERB_RPC_OCTET_STRING
hints for a conformant array
Definition ndr.h:185
a deferred pointer
Definition ndr.h:115
descriptor of a field in a structure
Definition ndr.h:97
message descriptor
Definition ndr.h:76
structure descriptor
Definition ndr.h:107
2.3.10 RPC_UNICODE_STRING (MS-DTYP)
2.2.2.1.6 UnpackKdcReplyBody
2.2.2.1.6 UnpackKdcReplyBody