diff options
author | speidy <speidy@gmail.com> | 2013-09-25 18:07:20 +0300 |
---|---|---|
committer | speidy <speidy@gmail.com> | 2013-09-25 18:07:20 +0300 |
commit | 24e4b8c937745ccd6855ce6e3d92c36a6f262c28 (patch) | |
tree | 888247cd929ab288ad924b5345199d55d549e4eb /libxrdp | |
parent | 9bf2d0dc60541832eb6280523ef1533d95143671 (diff) | |
download | xrdp-proprietary-24e4b8c937745ccd6855ce6e3d92c36a6f262c28.tar.gz xrdp-proprietary-24e4b8c937745ccd6855ce6e3d92c36a6f262c28.zip |
libxrdp: work on RDP negotiation part
Diffstat (limited to 'libxrdp')
-rw-r--r-- | libxrdp/xrdp_iso.c | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/libxrdp/xrdp_iso.c b/libxrdp/xrdp_iso.c index bd6c106e..99920702 100644 --- a/libxrdp/xrdp_iso.c +++ b/libxrdp/xrdp_iso.c @@ -59,30 +59,39 @@ xrdp_iso_recv_rdpnegreq(struct xrdp_iso *self, struct stream *s, int *requestedP *requestedProtocol = 0; + DEBUG((" in xrdp_iso_recv_rdpnegreq")); + in_uint8(s, type); if (type != RDP_NEG_REQ) { + DEBUG((" xrdp_iso_recv_rdpnegreq: type: %x",type)); return 1; } in_uint8(s, flags); - if (type != 0x0) + if (flags != 0x0) { + DEBUG((" xrdp_iso_recv_rdpnegreq: flags: %x",flags)); return 1; } - in_uint16_be(s, len); - if (len != 0x8) // fixed length + in_uint16_le(s, len); + if (len != 8) // fixed length { + DEBUG((" xrdp_iso_recv_rdpnegreq: length: %x",len)); return 1; } - in_uint32_be(s, *requestedProtocol); - if (requestedProtocol != PROTOCOL_RDP || PROTOCOL_SSL || PROTOCOL_HYBRID || PROTOCOL_HYBRID_EX) - { - return 1; - } + in_uint32_le(s, *requestedProtocol); + + //TODO: think of protocol verification logic +// if (requestedProtocol != PROTOCOL_RDP || PROTOCOL_SSL || PROTOCOL_HYBRID || PROTOCOL_HYBRID_EX) +// { +// DEBUG((" xrdp_iso_recv_rdpnegreq: wrong requestedProtocol: %x",requestedProtocol)); +// return 1; +// } + DEBUG((" out xrdp_iso_recv_rdpnegreq")); return 0; } /*****************************************************************************/ |