FreeRDP
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 
29 static char kerberosPackageName[] = {
30  'K', 0, 'e', 0, 'r', 0, 'b', 0, 'e', 0, 'r', 0, 'o', 0, 's', 0
31 };
32 static char ntlmPackageName[] = { 'N', 0, 'T', 0, 'L', 0, 'M', 0 };
33 
34 RdpEarPackageType 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 
47 wStream* 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  }
97 out:
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 
154 static 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 };
159 static const NdrStructDescr KERB_RPC_OCTET_STRING_struct = { "KERB_RPC_OCTET_STRING", 2,
160  KERB_RPC_OCTET_STRING_fields };
161 
162 RDPEAR_SIMPLE_MESSAGE_TYPE(KERB_RPC_OCTET_STRING)
163 
164 /* ============================= KERB_ASN1_DATA ============================== */
165 
166 static 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 };
173 static const NdrStructDescr KERB_ASN1_DATA_struct = { "KERB_ASN1_DATA",
174  ARRAYSIZE(KERB_ASN1_DATA_fields),
175  KERB_ASN1_DATA_fields };
176 
177 RDPEAR_SIMPLE_MESSAGE_TYPE(KERB_ASN1_DATA)
178 
179 /* ============================ RPC_UNICODE_STRING ========================== */
180 
181 BOOL ndr_read_RPC_UNICODE_STRING(NdrContext* context, wStream* s, const void* hints,
182  RPC_UNICODE_STRING* res)
183 {
184  NdrDeferredEntry bufferDesc = { NDR_PTR_NULL, "RPC_UNICODE_STRING.Buffer", &res->lenHints,
185  &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 
201 static 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 
207 #if 0
208 BOOL ndr_write_RPC_UNICODE_STRING(NdrContext* context, wStream* s, const void* hints,
209  const RPC_UNICODE_STRING* res)
210 {
211  return ndr_write_uint32(context, s, res->lenHints.length) &&
212  ndr_write_uint32(context, s, res->lenHints.maxLength) /*&&
213  ndr_write_BYTE_ptr(context, s, (BYTE*)res->Buffer, res->Length)*/
214  ;
215 }
216 #endif
217 
218 void ndr_dump_RPC_UNICODE_STRING(wLog* logger, UINT32 lvl, size_t indentLevel,
219  const RPC_UNICODE_STRING* obj)
220 {
221  WINPR_UNUSED(indentLevel);
222  WLog_Print(logger, lvl, "\tLength=%d MaximumLength=%d", obj->lenHints.length,
223  obj->lenHints.maxLength);
224  winpr_HexLogDump(logger, lvl, obj->Buffer, obj->lenHints.length);
225 }
226 
227 static void ndr_descr_dump_RPC_UNICODE_STRING(wLog* logger, UINT32 lvl, size_t indentLevel,
228  const void* obj)
229 {
230  ndr_dump_RPC_UNICODE_STRING(logger, lvl, indentLevel, obj);
231 }
232 
233 void ndr_destroy_RPC_UNICODE_STRING(NdrContext* context, const void* hints, RPC_UNICODE_STRING* obj)
234 {
235  WINPR_UNUSED(context);
236  WINPR_UNUSED(hints);
237  if (!obj)
238  return;
239  free(obj->Buffer);
240  obj->Buffer = NULL;
241 }
242 
243 static void ndr_descr_destroy_RPC_UNICODE_STRING(NdrContext* context, const void* hints, void* obj)
244 {
245  ndr_destroy_RPC_UNICODE_STRING(context, hints, obj);
246 }
247 
248 static const NdrMessageDescr RPC_UNICODE_STRING_descr_s = { NDR_ARITY_SIMPLE,
249  sizeof(RPC_UNICODE_STRING),
250  ndr_descr_read_RPC_UNICODE_STRING,
251  /*ndr_write_RPC_UNICODE_STRING*/ NULL,
252  ndr_descr_destroy_RPC_UNICODE_STRING,
253  ndr_descr_dump_RPC_UNICODE_STRING };
254 
255 NdrMessageType ndr_RPC_UNICODE_STRING_descr(void)
256 {
257  return &RPC_UNICODE_STRING_descr_s;
258 }
259 
260 /* ========================= RPC_UNICODE_STRING_Array ======================== */
261 
262 static BOOL ndr_read_RPC_UNICODE_STRING_Array(NdrContext* context, wStream* s, const void* hints,
263  void* v)
264 {
265  WINPR_ASSERT(context);
266  WINPR_ASSERT(s);
267  WINPR_ASSERT(hints);
268  return ndr_read_uconformant_array(context, s, hints, ndr_RPC_UNICODE_STRING_descr(), v);
269 }
270 
271 static BOOL ndr_write_RPC_UNICODE_STRING_Array(NdrContext* context, wStream* s, const void* ghints,
272  const void* v)
273 {
274  WINPR_ASSERT(context);
275  WINPR_ASSERT(s);
276  WINPR_ASSERT(ghints);
277 
278  const NdrArrayHints* hints = (const NdrArrayHints*)ghints;
279 
280  return ndr_write_uconformant_array(context, s, hints->count, ndr_RPC_UNICODE_STRING_descr(), v);
281 }
282 
283 static const NdrMessageDescr RPC_UNICODE_STRING_Array_descr_s = {
284  NDR_ARITY_ARRAYOF,
285  sizeof(RPC_UNICODE_STRING),
286  ndr_read_RPC_UNICODE_STRING_Array,
287  ndr_write_RPC_UNICODE_STRING_Array,
288  NULL,
289  NULL
290 };
291 
292 static NdrMessageType ndr_RPC_UNICODE_STRING_Array_descr(void)
293 {
294  return &RPC_UNICODE_STRING_Array_descr_s;
295 }
296 
297 /* ========================== KERB_RPC_INTERNAL_NAME ======================== */
298 
299 BOOL ndr_read_KERB_RPC_INTERNAL_NAME(NdrContext* context, wStream* s, const void* hints,
301 {
302  WINPR_ASSERT(res);
303 
304  union
305  {
306  RPC_UNICODE_STRING** ppstr;
307  void* pv;
308  } cnv;
309  cnv.ppstr = &res->Names;
310  NdrDeferredEntry names = { NDR_PTR_NULL, "KERB_RPC_INTERNAL_NAME.Names", &res->nameHints,
311  cnv.pv, ndr_RPC_UNICODE_STRING_Array_descr() };
312 
313  UINT16 nameCount = 0;
314  WINPR_UNUSED(hints);
315 
316  if (!ndr_read_uint16(context, s, &res->NameType) || !ndr_read_uint16(context, s, &nameCount))
317  return FALSE;
318 
319  res->nameHints.count = nameCount;
320 
321  return ndr_read_refpointer(context, s, &names.ptrId) && ndr_push_deferreds(context, &names, 1);
322 }
323 
324 static BOOL ndr_descr_read_KERB_RPC_INTERNAL_NAME(NdrContext* context, wStream* s,
325  const void* hints, void* res)
326 {
327  return ndr_read_KERB_RPC_INTERNAL_NAME(context, s, hints, res);
328 }
329 
330 BOOL ndr_write_KERB_RPC_INTERNAL_NAME(NdrContext* context, wStream* s, const void* hints,
331  const KERB_RPC_INTERNAL_NAME* res)
332 {
333  WINPR_UNUSED(context);
334  WINPR_UNUSED(s);
335  WINPR_UNUSED(hints);
336  WINPR_UNUSED(res);
337  WLog_ERR(TAG, "TODO: implement this");
338  return FALSE;
339 }
340 
341 void ndr_dump_KERB_RPC_INTERNAL_NAME(wLog* logger, UINT32 lvl, size_t indentLevel,
342  const KERB_RPC_INTERNAL_NAME* obj)
343 {
344  WINPR_UNUSED(indentLevel);
345  WINPR_UNUSED(obj);
346  WLog_Print(logger, lvl, "TODO: implement this");
347 }
348 
349 static void ndr_descr_dump_KERB_RPC_INTERNAL_NAME(wLog* logger, UINT32 lvl, size_t indentLevel,
350  const void* obj)
351 {
352  ndr_dump_KERB_RPC_INTERNAL_NAME(logger, lvl, indentLevel, obj);
353 }
354 
355 void ndr_destroy_KERB_RPC_INTERNAL_NAME(NdrContext* context, const void* hints,
357 {
358  WINPR_UNUSED(hints);
359  if (!obj)
360  return;
361 
362  for (UINT32 i = 0; i < obj->nameHints.count; i++)
363  ndr_destroy_RPC_UNICODE_STRING(context, NULL, &obj->Names[i]);
364 
365  free(obj->Names);
366  obj->Names = NULL;
367 }
368 
369 static void ndr_descr_destroy_KERB_RPC_INTERNAL_NAME(NdrContext* context, const void* hints,
370  void* obj)
371 {
372  ndr_destroy_KERB_RPC_INTERNAL_NAME(context, hints, obj);
373 }
374 
375 static NdrMessageDescr KERB_RPC_INTERNAL_NAME_descr_s = { NDR_ARITY_SIMPLE,
376  sizeof(KERB_RPC_INTERNAL_NAME),
377  ndr_descr_read_KERB_RPC_INTERNAL_NAME,
378  NULL,
379  ndr_descr_destroy_KERB_RPC_INTERNAL_NAME,
380  ndr_descr_dump_KERB_RPC_INTERNAL_NAME };
381 
382 NdrMessageType ndr_KERB_RPC_INTERNAL_NAME_descr(void)
383 {
384  return &KERB_RPC_INTERNAL_NAME_descr_s;
385 }
386 
387 /* ========================== KERB_RPC_ENCRYPTION_KEY ======================== */
388 
389 static const NdrFieldStruct KERB_RPC_ENCRYPTION_KEY_fields[] = {
390  { "reserved1", offsetof(KERB_RPC_ENCRYPTION_KEY, reserved1), NDR_NOT_POINTER, -1,
391  &ndr_uint32_descr_s },
392  { "reserved2", offsetof(KERB_RPC_ENCRYPTION_KEY, reserved2), NDR_NOT_POINTER, -1,
393  &ndr_uint32_descr_s },
394  { "reserved3", offsetof(KERB_RPC_ENCRYPTION_KEY, reserved3), NDR_NOT_POINTER, -1,
395  &ndr_KERB_RPC_OCTET_STRING_descr_s }
396 };
397 static const NdrStructDescr KERB_RPC_ENCRYPTION_KEY_struct = {
398  "KERB_RPC_ENCRYPTION_KEY", ARRAYSIZE(KERB_RPC_ENCRYPTION_KEY_fields),
399  KERB_RPC_ENCRYPTION_KEY_fields
400 };
401 
402 RDPEAR_SIMPLE_MESSAGE_TYPE(KERB_RPC_ENCRYPTION_KEY)
403 
404 /* ========================== BuildEncryptedAuthDataReq ======================== */
405 
406 static const NdrFieldStruct BuildEncryptedAuthDataReq_fields[] = {
407  { "KeyUsage", offsetof(BuildEncryptedAuthDataReq, KeyUsage), NDR_NOT_POINTER, -1,
408  &ndr_uint32_descr_s },
409  { "key", offsetof(BuildEncryptedAuthDataReq, Key), NDR_POINTER_NON_NULL, -1,
410  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
411  { "plainAuthData", offsetof(BuildEncryptedAuthDataReq, PlainAuthData), NDR_POINTER_NON_NULL, -1,
412  &ndr_KERB_ASN1_DATA_descr_s }
413 };
414 static const NdrStructDescr BuildEncryptedAuthDataReq_struct = {
415  "BuildEncryptedAuthDataReq", ARRAYSIZE(BuildEncryptedAuthDataReq_fields),
416  BuildEncryptedAuthDataReq_fields
417 };
418 
419 RDPEAR_SIMPLE_MESSAGE_TYPE(BuildEncryptedAuthDataReq)
420 
421 /* ========================== ComputeTgsChecksumReq ======================== */
422 
423 static const NdrFieldStruct ComputeTgsChecksumReq_fields[] = {
424  { "requestBody", offsetof(ComputeTgsChecksumReq, requestBody), NDR_POINTER_NON_NULL, -1,
425  &ndr_KERB_ASN1_DATA_descr_s },
426  { "key", offsetof(ComputeTgsChecksumReq, Key), NDR_POINTER_NON_NULL, -1,
427  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
428  { "ChecksumType", offsetof(ComputeTgsChecksumReq, ChecksumType), NDR_NOT_POINTER, -1,
429  &ndr_uint32_descr_s }
430 };
431 static const NdrStructDescr ComputeTgsChecksumReq_struct = {
432  "ComputeTgsChecksumReq", ARRAYSIZE(ComputeTgsChecksumReq_fields), ComputeTgsChecksumReq_fields
433 };
434 
435 RDPEAR_SIMPLE_MESSAGE_TYPE(ComputeTgsChecksumReq)
436 
437 /* ========================== CreateApReqAuthenticatorReq ======================== */
438 
439 static const NdrFieldStruct CreateApReqAuthenticatorReq_fields[] = {
440  { "EncryptionKey", offsetof(CreateApReqAuthenticatorReq, EncryptionKey), NDR_POINTER_NON_NULL,
441  -1, &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
442  { "SequenceNumber", offsetof(CreateApReqAuthenticatorReq, SequenceNumber), NDR_NOT_POINTER, -1,
443  &ndr_uint32_descr_s },
444  { "ClientName", offsetof(CreateApReqAuthenticatorReq, ClientName), NDR_POINTER_NON_NULL, -1,
445  &KERB_RPC_INTERNAL_NAME_descr_s },
446  { "ClientRealm", offsetof(CreateApReqAuthenticatorReq, ClientRealm), NDR_POINTER_NON_NULL, -1,
447  &RPC_UNICODE_STRING_descr_s },
448  { "SkewTime", offsetof(CreateApReqAuthenticatorReq, SkewTime), NDR_POINTER_NON_NULL, -1,
449  &ndr_uint64_descr_s },
450  { "SubKey", offsetof(CreateApReqAuthenticatorReq, SubKey), NDR_POINTER, -1,
451  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
452  { "AuthData", offsetof(CreateApReqAuthenticatorReq, AuthData), NDR_POINTER_NON_NULL, -1,
453  &ndr_KERB_ASN1_DATA_descr_s },
454  { "GssChecksum", offsetof(CreateApReqAuthenticatorReq, GssChecksum), NDR_POINTER, -1,
455  &ndr_KERB_ASN1_DATA_descr_s },
456  { "KeyUsage", offsetof(CreateApReqAuthenticatorReq, KeyUsage), NDR_NOT_POINTER, -1,
457  &ndr_uint32_descr_s },
458 };
459 static const NdrStructDescr CreateApReqAuthenticatorReq_struct = {
460  "CreateApReqAuthenticatorReq", ARRAYSIZE(CreateApReqAuthenticatorReq_fields),
461  CreateApReqAuthenticatorReq_fields
462 };
463 
464 RDPEAR_SIMPLE_MESSAGE_TYPE(CreateApReqAuthenticatorReq)
465 
466 /* ========================== CreateApReqAuthenticatorResp ======================== */
467 
468 static const NdrFieldStruct CreateApReqAuthenticatorResp_fields[] = {
469  { "AuthenticatorTime", offsetof(CreateApReqAuthenticatorResp, AuthenticatorTime),
470  NDR_NOT_POINTER, -1, &ndr_uint64_descr_s },
471  { "Authenticator", offsetof(CreateApReqAuthenticatorResp, Authenticator), NDR_NOT_POINTER, -1,
472  &ndr_KERB_ASN1_DATA_descr_s },
473  { "KerbProtocolError", offsetof(CreateApReqAuthenticatorResp, KerbProtocolError),
474  NDR_NOT_POINTER, -1, &ndr_uint32_descr_s },
475 };
476 
477 static const NdrStructDescr CreateApReqAuthenticatorResp_struct = {
478  "CreateApReqAuthenticatorResp", ARRAYSIZE(CreateApReqAuthenticatorResp_fields),
479  CreateApReqAuthenticatorResp_fields
480 };
481 
482 RDPEAR_SIMPLE_MESSAGE_TYPE(CreateApReqAuthenticatorResp)
483 
484 /* ========================== UnpackKdcReplyBodyReq ======================== */
485 
486 static const NdrFieldStruct UnpackKdcReplyBodyReq_fields[] = {
487  { "EncryptedData", offsetof(UnpackKdcReplyBodyReq, EncryptedData), NDR_POINTER_NON_NULL, -1,
488  &ndr_KERB_ASN1_DATA_descr_s },
489  { "Key", offsetof(UnpackKdcReplyBodyReq, Key), NDR_POINTER_NON_NULL, -1,
490  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
491  { "StrenghtenKey", offsetof(UnpackKdcReplyBodyReq, StrengthenKey), NDR_POINTER, -1,
492  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s },
493  { "Pdu", offsetof(UnpackKdcReplyBodyReq, Pdu), NDR_NOT_POINTER, -1, &ndr_uint32_descr_s },
494  { "KeyUsage", offsetof(UnpackKdcReplyBodyReq, KeyUsage), NDR_NOT_POINTER, -1,
495  &ndr_uint32_descr_s },
496 };
497 
498 static const NdrStructDescr UnpackKdcReplyBodyReq_struct = {
499  "UnpackKdcReplyBodyReq", ARRAYSIZE(UnpackKdcReplyBodyReq_fields), UnpackKdcReplyBodyReq_fields
500 };
501 
502 RDPEAR_SIMPLE_MESSAGE_TYPE(UnpackKdcReplyBodyReq)
503 
504 /* ========================== UnpackKdcReplyBodyResp ======================== */
505 
506 static const NdrFieldStruct UnpackKdcReplyBodyResp_fields[] = {
507  { "KerbProtocolError", offsetof(UnpackKdcReplyBodyResp, KerbProtocolError), NDR_NOT_POINTER, -1,
508  &ndr_uint32_descr_s },
509  { "ReplyBody", offsetof(UnpackKdcReplyBodyResp, ReplyBody), NDR_NOT_POINTER, -1,
510  &ndr_KERB_ASN1_DATA_descr_s }
511 };
512 
513 static const NdrStructDescr UnpackKdcReplyBodyResp_struct = {
514  "UnpackKdcReplyBodyResp", ARRAYSIZE(UnpackKdcReplyBodyResp_fields),
515  UnpackKdcReplyBodyResp_fields
516 };
517 
518 RDPEAR_SIMPLE_MESSAGE_TYPE(UnpackKdcReplyBodyResp)
519 
520 /* ========================== DecryptApReplyReq ======================== */
521 
522 static const NdrFieldStruct DecryptApReplyReq_fields[] = {
523  { "EncryptedReply", offsetof(DecryptApReplyReq, EncryptedReply), NDR_POINTER_NON_NULL, -1,
524  &ndr_KERB_ASN1_DATA_descr_s },
525  { "Key", offsetof(DecryptApReplyReq, Key), NDR_POINTER_NON_NULL, -1,
526  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s }
527 };
528 
529 static const NdrStructDescr DecryptApReplyReq_struct = { "DecryptApReplyReq",
530  ARRAYSIZE(DecryptApReplyReq_fields),
531  DecryptApReplyReq_fields };
532 
533 RDPEAR_SIMPLE_MESSAGE_TYPE(DecryptApReplyReq)
534 
535 /* ========================== PackApReplyReq ======================== */
536 
537 static const NdrFieldStruct PackApReplyReq_fields[] = {
538  { "Reply", offsetof(PackApReplyReq, Reply), NDR_POINTER_NON_NULL, -1,
539  &ndr_KERB_ASN1_DATA_descr_s },
540  { "ReplyBody", offsetof(PackApReplyReq, ReplyBody), NDR_POINTER_NON_NULL, -1,
541  &ndr_KERB_ASN1_DATA_descr_s },
542  { "SessionKey", offsetof(PackApReplyReq, SessionKey), NDR_POINTER_NON_NULL, -1,
543  &ndr_KERB_RPC_ENCRYPTION_KEY_descr_s }
544 };
545 
546 static const NdrStructDescr PackApReplyReq_struct = { "PackApReplyReq",
547  ARRAYSIZE(PackApReplyReq_fields),
548  PackApReplyReq_fields };
549 
550 RDPEAR_SIMPLE_MESSAGE_TYPE(PackApReplyReq)
551 
552 /* ========================== PackApReplyResp ======================== */
553 
554 static const NdrFieldStruct PackApReplyResp_fields[] = {
555  { "PackedReplySize", offsetof(PackApReplyResp, PackedReplyHints), NDR_NOT_POINTER, -1,
556  &ndr_uint32_descr_s },
557  { "PackedReply", offsetof(PackApReplyResp, PackedReply), NDR_POINTER_NON_NULL, 0,
558  &ndr_uint8Array_descr_s },
559 };
560 
561 static const NdrStructDescr PackApReplyResp_struct = { "PackApReplyResp",
562  ARRAYSIZE(PackApReplyResp_fields),
563  PackApReplyResp_fields };
564 
565 RDPEAR_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
Definition: rdpear_common.h:95
hints for a conformant array
Definition: ndr.h:184
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