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