]> git.sesse.net Git - rdpsrv/blobdiff - secure.c
Try to demand activity from the client on logon.
[rdpsrv] / secure.c
index 51e5f84c22062d965d3f6ea21a87ba34abd93049..41347752218f9757e8e5a38b2448f88a72e46c76 100644 (file)
--- a/secure.c
+++ b/secure.c
@@ -763,6 +763,22 @@ sec_recv(void)
                        {
                                printf("Received logon packet!\n");
                                rdp_get_logon_info(s);
+                       
+                               // demand activity
+                               {
+                                       STREAM s;
+
+                                       s = sec_init(g_encryption ? SEC_ENCRYPT : 0, 10);
+                                       out_uint16_le(s, 10);
+                                       out_uint16_le(s, (RDP_PDU_DEMAND_ACTIVE | 0x10));
+                                       out_uint16_le(s, 1001);
+
+                                       out_uint32_le(s, 0x103ea);
+                                       s_mark_end(s);
+                                       sec_send(s, g_encryption ? SEC_ENCRYPT : 0);
+                               }
+
+                               continue;
                        }
 
                        if (sec_flags & SEC_CLIENT_RANDOM) {
@@ -794,7 +810,7 @@ sec_recv(void)
                                printf("\n");
 
                                // now we can generate the keys
-                               sec_generate_keys(inr + SEC_RANDOM_SIZE, cacert, 8);
+                               sec_generate_keys(inr + SEC_RANDOM_SIZE, cacert, 1);
                                continue;
                        }
                }