/[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 293 by astrand, Tue Jan 21 20:22:44 2003 UTC
# Line 19  Line 19 
19  */  */
20    
21  #include "rdesktop.h"  #include "rdesktop.h"
22    
23    #ifdef WITH_OPENSSL
24    #include <openssl/rc4.h>
25    #else
26  #include "crypto/rc4.h"  #include "crypto/rc4.h"
27    #endif
28    
29  extern char username[16];  extern char username[16];
30  extern char hostname[16];  extern char hostname[16];
 extern BOOL licence;  
31    
32  static uint8 licence_key[16];  static uint8 licence_key[16];
33  static uint8 licence_sign_key[16];  static uint8 licence_sign_key[16];
# Line 250  licence_process_authreq(STREAM s) Line 254  licence_process_authreq(STREAM s)
254          memcpy(sealed_buffer + LICENCE_TOKEN_SIZE, hwid, LICENCE_HWID_SIZE);          memcpy(sealed_buffer + LICENCE_TOKEN_SIZE, hwid, LICENCE_HWID_SIZE);
255          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));
256    
         /* Deliberately break signature if licencing disabled */  
         if (!licence)  
                 memset(out_sig, 0, sizeof(out_sig));  
   
257          /* Now encrypt the HWID */          /* Now encrypt the HWID */
258          RC4_set_key(&crypt_key, 16, licence_key);          RC4_set_key(&crypt_key, 16, licence_key);
259          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.293

  ViewVC Help
Powered by ViewVC 1.1.26