]> git.sesse.net Git - rdpsrv/commitdiff
Demand a license instead of activity, Microsoft seems to provide that :-)
authorSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Feb 2005 23:28:38 +0000 (23:28 +0000)
committerSteinar H. Gunderson <sesse@samfundet.no>
Sat, 5 Feb 2005 23:28:38 +0000 (23:28 +0000)
secure.c

index 41347752218f9757e8e5a38b2448f88a72e46c76..573b77d3598112f35fe5e9bbbfa8c60cf05e4705 100644 (file)
--- a/secure.c
+++ b/secure.c
@@ -730,6 +730,18 @@ sec_process_mcs_data(STREAM s)
 
 extern unsigned char cacert[];
 
+unsigned char demand_license[] = {
+       0x01, 0x03, 0x86, 0x00, 0x9c, 0x6e, 0xef, 0x5a, 0x26, 0x45, 0x88, 0x86, 0x0e, 0xdf, 0xa4, 0x4a,
+       0x45, 0xc7, 0x5a, 0x4c, 0xec, 0x33, 0xff, 0x4c, 0xd8, 0x4b, 0xd2, 0x4e, 0xd2, 0x22, 0x16, 0xde,
+       0x1e, 0x5b, 0x06, 0x6e, 0x00, 0x00, 0x05, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x4d, 0x00, 0x69, 0x00,
+       0x63, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x66, 0x00, 0x74, 0x00, 0x20, 0x00,
+       0x43, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x70, 0x00, 0x6f, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00,
+       0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x41, 0x00, 0x30, 0x00,
+       0x32, 0x00, 0x00, 0x00, 0x0d, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0xf6, 0x00, 0x00,
+       0x01, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x0e, 0x00, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66,
+       0x74, 0x2e, 0x63, 0x6f, 0x6d, 0x00
+};
+
 /* Receive secure transport packet */
 STREAM
 sec_recv(void)
@@ -764,20 +776,16 @@ sec_recv(void)
                                printf("Received logon packet!\n");
                                rdp_get_logon_info(s);
                        
-                               // demand activity
+                               // demand a license
                                {
                                        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 = sec_init(sizeof(demand_license), SEC_LICENCE_NEG);
+                                       out_uint8p(s, demand_license, sizeof(demand_license));
                                        s_mark_end(s);
-                                       sec_send(s, g_encryption ? SEC_ENCRYPT : 0);
+                                       sec_send(s, SEC_LICENCE_NEG);
                                }
-
+                               
                                continue;
                        }