]> git.sesse.net Git - rdpsrv/blobdiff - secure.c
Add function for sending bitmap updates (not working yet :-/)
[rdpsrv] / secure.c
index fd96936e09bebc0cff5a93cc52bb4dd9f38c2965..724ff189bdc6e46518b07cfdd8b154ee827d3cc5 100644 (file)
--- a/secure.c
+++ b/secure.c
@@ -343,8 +343,10 @@ sec_send_to_channel(STREAM s, uint32 flags, uint16 channel)
 {
        int datalen;
 
+       DEBUG(("sending packet to channel %u", channel));
+       
        s_pop_layer(s, sec_hdr);
-       //if (!g_licence_issued || (flags & SEC_ENCRYPT))
+//     if (!g_licence_issued || (flags & SEC_ENCRYPT))
                out_uint32_le(s, flags);
 
        if (flags & SEC_ENCRYPT)
@@ -721,23 +723,33 @@ sec_recv(void)
 
        while ((s = mcs_recv(&channel)) != NULL)
        {
-               if (/*g_encryption || !g_licence_issued*/ 0)
+               if (/*g_encryption || !g_licence_issued*/ 1)
                {
                        in_uint32_le(s, sec_flags);
-
+                       printf("sec_flags=%x\n", sec_flags);
+                       
                        if (sec_flags & SEC_ENCRYPT)
                        {
+                               printf("encrypt\n");
                                in_uint8s(s, 8);        /* signature */
                                sec_decrypt(s->p, s->end - s->p);
                        }
 
                        if (sec_flags & SEC_LICENCE_NEG)
                        {
-                               licence_process(s);
+                               printf("SEC_LICENSE_NEG unknown\n");
+                               //licence_process(s);
                                continue;
                        }
+
+                       if (sec_flags & SEC_LOGON_INFO) 
+                       {
+                               printf("Received logon packet!\n");
+                               rdp_get_logon_info(s);
+                       }
                }
 
+               printf("Received MCS data on ch %u\n", channel);
                if (channel != MCS_GLOBAL_CHANNEL)
                {
                        channel_process(s, channel);