/[rdesktop]/sourceforge.net/trunk/rdesktop/secure.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /sourceforge.net/trunk/rdesktop/secure.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 101 by astrand, Mon Aug 26 17:12:43 2002 UTC revision 207 by matthewc, Thu Sep 26 14:26:46 2002 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     Protocol services - RDP encryption and licensing     Protocol services - RDP encryption and licensing
4     Copyright (C) Matthew Chapman 1999-2001     Copyright (C) Matthew Chapman 1999-2002
5    
6     This program is free software; you can redistribute it and/or modify     This program is free software; you can redistribute it and/or modify
7     it under the terms of the GNU General Public License as published by     it under the terms of the GNU General Public License as published by
# Line 363  sec_send(STREAM s, uint32 flags) Line 363  sec_send(STREAM s, uint32 flags)
363    
364  /* Transfer the client random to the server */  /* Transfer the client random to the server */
365  static void  static void
366  sec_establish_key()  sec_establish_key(void)
367  {  {
368          uint32 length = SEC_MODULUS_SIZE + SEC_PADDING_SIZE;          uint32 length = SEC_MODULUS_SIZE + SEC_PADDING_SIZE;
369          uint32 flags = SEC_CLIENT_RANDOM;          uint32 flags = SEC_CLIENT_RANDOM;
# Line 425  sec_out_mcs_data(STREAM s) Line 425  sec_out_mcs_data(STREAM s)
425          out_uint32_le(s, 12);          out_uint32_le(s, 12);
426          out_uint8s(s, 64);      /* reserved? 4 + 12 doublewords */          out_uint8s(s, 64);      /* reserved? 4 + 12 doublewords */
427    
428          out_uint16(s, 0xca01);          out_uint16_le(s, 0xca01);
429          out_uint16(s, 0);          out_uint16(s, 0);
430    
431          /* Client encryption settings */          /* Client encryption settings */
432          out_uint16_le(s, SEC_TAG_CLI_CRYPT);          out_uint16_le(s, SEC_TAG_CLI_CRYPT);
433          out_uint16(s, 8);       /* length */          out_uint16_le(s, 8);    /* length */
434          out_uint32_le(s, encryption ? 0x3 : 0); /* encryption supported, 128-bit supported */          out_uint32_le(s, encryption ? 0x3 : 0); /* encryption supported, 128-bit supported */
435          s_mark_end(s);          s_mark_end(s);
436  }  }
# Line 584  sec_process_mcs_data(STREAM s) Line 584  sec_process_mcs_data(STREAM s)
584    
585  /* Receive secure transport packet */  /* Receive secure transport packet */
586  STREAM  STREAM
587  sec_recv()  sec_recv(void)
588  {  {
589          uint32 sec_flags;          uint32 sec_flags;
590          STREAM s;          STREAM s;
# Line 636  sec_connect(char *server) Line 636  sec_connect(char *server)
636    
637  /* Disconnect a connection */  /* Disconnect a connection */
638  void  void
639  sec_disconnect()  sec_disconnect(void)
640  {  {
641          mcs_disconnect();          mcs_disconnect();
642  }  }

Legend:
Removed from v.101  
changed lines
  Added in v.207

  ViewVC Help
Powered by ViewVC 1.1.26