From 40cde82f161a4891fb396e4f73087a9de7a5a978 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sun, 6 Feb 2005 03:15:53 +0000 Subject: [PATCH] Fixed (?) and enabled RDP5 encryption. --- rdp.c | 4 ++-- rdp5.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rdp.c b/rdp.c index 538e053..4ea3698 100644 --- a/rdp.c +++ b/rdp.c @@ -154,7 +154,7 @@ void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned hei int length = 10*2 + width*height*3 + 5; - s = rdp5_init(length, 0); + s = rdp5_init(length, 1); out_uint8(s, 1); // process bitmap update out_uint16_le(s, 10*2 + width*height*3 + 2); // RDP5 chunk length @@ -174,7 +174,7 @@ void rdp_send_bitmap_update(unsigned x, unsigned y, unsigned width, unsigned hei out_uint8p(s, data, width*height*3); s_mark_end(s); - rdp5_send(s, 0); + rdp5_send(s, 1); } #define EXPECT16(value) { in_uint16_le(s, unknown); if (unknown != (value)) printf("Unknown value on code line %u; expected 0x%x, got 0x%x\n", __LINE__, (value), unknown); } diff --git a/rdp5.c b/rdp5.c index 1612643..ac544b8 100644 --- a/rdp5.c +++ b/rdp5.c @@ -55,7 +55,7 @@ rdp5_send(STREAM s, BOOL encryption) out_uint8(s, datalen & 0xff); if (encryption) { - datalen -= 8; + datalen -= 11; sec_sign(s->p, 8, sec_sign_key, rc4_key_len, s->p + 8, datalen); sec_encrypt(s->p + 8, datalen); -- 2.39.2