X-Git-Url: https://git.sesse.net/?p=rdpsrv;a=blobdiff_plain;f=secure.c;h=f32a081ebd893b4a24483213829d7e6ad9aca77a;hp=9147cbc21ba3b8903adc967866da4fa977af69e9;hb=7bea59be496181e0a9968cbaa1640e5a935a8cea;hpb=63fa9a9043d4a58ee7994e669bcc566f09bc9e9b diff --git a/secure.c b/secure.c index 9147cbc..f32a081 100644 --- a/secure.c +++ b/secure.c @@ -343,6 +343,8 @@ sec_send_to_channel(STREAM s, uint32 flags, uint16 channel) { int datalen; +// DEBUG(("sending packet to channel %u\n", channel)); + s_pop_layer(s, sec_hdr); // if (!g_licence_issued || (flags & SEC_ENCRYPT)) out_uint32_le(s, flags); @@ -743,7 +745,22 @@ sec_recv(void) if (sec_flags & SEC_LOGON_INFO) { printf("Received logon packet!\n"); + rdp_get_logon_info(s); + } + if (sec_flags & SEC_CLIENT_RANDOM) { + uint32 length; + + printf("Receiving the client random!\n"); + in_uint32_le(s, length); + if (length != SEC_MODULUS_SIZE + SEC_PADDING_SIZE) { + error("Client random was wrong size, %u bytes\n", length); + } + in_uint8a(s, sec_crypted_random, SEC_MODULUS_SIZE); + in_uint8s(s, SEC_PADDING_SIZE); + if (!s_check_end(s)) { + error("Junk after client random\n"); + } } }