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-2000 |
Copyright (C) Matthew Chapman 1999-2001 |
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 |
28 |
static uint8 licence_key[16]; |
static uint8 licence_key[16]; |
29 |
static uint8 licence_sign_key[16]; |
static uint8 licence_sign_key[16]; |
30 |
|
|
31 |
|
BOOL licence_issued = False; |
32 |
|
|
33 |
/* Generate a session key and RC4 keys, given client and server randoms */ |
/* Generate a session key and RC4 keys, given client and server randoms */ |
34 |
void |
void |
35 |
licence_generate_keys(uint8 *client_key, uint8 *server_key, uint8 *client_rsa) |
licence_generate_keys(uint8 *client_key, uint8 *server_key, uint8 *client_rsa) |
142 |
in_uint16_le(s, tokenlen); |
in_uint16_le(s, tokenlen); |
143 |
if (tokenlen != LICENCE_TOKEN_SIZE) |
if (tokenlen != LICENCE_TOKEN_SIZE) |
144 |
{ |
{ |
145 |
ERROR("token len %d\n", tokenlen); |
error("token len %d\n", tokenlen); |
146 |
return False; |
return False; |
147 |
} |
} |
148 |
|
|
213 |
if (check != 0) |
if (check != 0) |
214 |
return; |
return; |
215 |
|
|
216 |
|
licence_issued = True; |
217 |
|
|
218 |
/* We should save the licence here */ |
/* We should save the licence here */ |
|
STATUS("Server issued licence.\n"); |
|
219 |
} |
} |
220 |
|
|
221 |
/* Process a licence packet */ |
/* Process a licence packet */ |
245 |
break; |
break; |
246 |
|
|
247 |
default: |
default: |
248 |
NOTIMP("licence tag 0x%x\n", tag); |
unimpl("licence tag 0x%x\n", tag); |
249 |
} |
} |
250 |
} |
} |