/[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 207 by matthewc, Thu Sep 26 14:26:46 2002 UTC revision 214 by matthewc, Sun Oct 6 13:57:39 2002 UTC
# Line 23  Line 23 
23    
24  extern char username[16];  extern char username[16];
25  extern char hostname[16];  extern char hostname[16];
 extern BOOL licence;  
26    
27  static uint8 licence_key[16];  static uint8 licence_key[16];
28  static uint8 licence_sign_key[16];  static uint8 licence_sign_key[16];
# Line 250  licence_process_authreq(STREAM s) Line 249  licence_process_authreq(STREAM s)
249          memcpy(sealed_buffer + LICENCE_TOKEN_SIZE, hwid, LICENCE_HWID_SIZE);          memcpy(sealed_buffer + LICENCE_TOKEN_SIZE, hwid, LICENCE_HWID_SIZE);
250          sec_sign(out_sig, 16, licence_sign_key, 16, sealed_buffer, sizeof(sealed_buffer));          sec_sign(out_sig, 16, licence_sign_key, 16, sealed_buffer, sizeof(sealed_buffer));
251    
         /* Deliberately break signature if licencing disabled */  
         if (!licence)  
                 memset(out_sig, 0, sizeof(out_sig));  
   
252          /* Now encrypt the HWID */          /* Now encrypt the HWID */
253          RC4_set_key(&crypt_key, 16, licence_key);          RC4_set_key(&crypt_key, 16, licence_key);
254          RC4(&crypt_key, LICENCE_HWID_SIZE, hwid, crypt_hwid);          RC4(&crypt_key, LICENCE_HWID_SIZE, hwid, crypt_hwid);

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

  ViewVC Help
Powered by ViewVC 1.1.26