/[rdesktop]/sourceforge.net/trunk/rdesktop/licence.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/licence.c

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

revision 706 by astrand, Tue Jun 1 08:06:02 2004 UTC revision 828 by stargo, Sun Mar 6 21:11:18 2005 UTC
# Line 1  Line 1 
1  /*  /*
2     rdesktop: A Remote Desktop Protocol client.     rdesktop: A Remote Desktop Protocol client.
3     RDP licensing negotiation     RDP licensing negotiation
4     Copyright (C) Matthew Chapman 1999-2002     Copyright (C) Matthew Chapman 1999-2005
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 19  Line 19 
19  */  */
20    
21  #include "rdesktop.h"  #include "rdesktop.h"
   
 #ifdef WITH_OPENSSL  
22  #include <openssl/rc4.h>  #include <openssl/rc4.h>
 #else  
 #include "crypto/rc4.h"  
 #endif  
23    
24  extern char g_username[16];  extern char g_username[16];
25  extern char hostname[16];  extern char g_hostname[16];
26    
27  static uint8 g_licence_key[16];  static uint8 g_licence_key[16];
28  static uint8 g_licence_sign_key[16];  static uint8 g_licence_sign_key[16];
# Line 56  static void Line 51  static void
51  licence_generate_hwid(uint8 * hwid)  licence_generate_hwid(uint8 * hwid)
52  {  {
53          buf_out_uint32(hwid, 2);          buf_out_uint32(hwid, 2);
54          strncpy((char *) (hwid + 4), hostname, LICENCE_HWID_SIZE - 4);          strncpy((char *) (hwid + 4), g_hostname, LICENCE_HWID_SIZE - 4);
55  }  }
56    
57  /* Present an existing licence to the server */  /* Present an existing licence to the server */
# Line 174  licence_process_demand(STREAM s) Line 169  licence_process_demand(STREAM s)
169                  return;                  return;
170          }          }
171    
172          licence_send_request(null_data, null_data, g_username, hostname);          licence_send_request(null_data, null_data, g_username, g_hostname);
173  }  }
174    
175  /* Send an authentication response packet */  /* Send an authentication response packet */

Legend:
Removed from v.706  
changed lines
  Added in v.828

  ViewVC Help
Powered by ViewVC 1.1.26