licence_send_new_licence_request(null_data, null_data, g_username, g_hostname);
}
-/* Send a platform challange response packet */
+/* Send a platform challenge response packet */
static void
-licence_send_platform_challange_response(uint8 * token, uint8 * crypt_hwid, uint8 * signature)
+licence_send_platform_challenge_response(uint8 * token, uint8 * crypt_hwid, uint8 * signature)
{
uint32 sec_flags = SEC_LICENCE_NEG;
uint16 length = 58;
s = sec_init(sec_flags, length + 2);
- out_uint8(s, LICENCE_TAG_PLATFORM_CHALLANGE_RESPONSE);
+ out_uint8(s, LICENCE_TAG_PLATFORM_CHALLENGE_RESPONSE);
out_uint8(s, ((g_rdp_version >= RDP_V5) ? 3 : 2)); /* version */
out_uint16_le(s, length);
sec_send(s, sec_flags);
}
-/* Parse an platform challange request packet */
+/* Parse a platform challenge request packet */
static RD_BOOL
-licence_parse_platform_challange(STREAM s, uint8 ** token, uint8 ** signature)
+licence_parse_platform_challenge(STREAM s, uint8 ** token, uint8 ** signature)
{
uint16 tokenlen;
return s_check_end(s);
}
-/* Process a platform challange packet */
+/* Process a platform challenge packet */
static void
-licence_process_platform_challange(STREAM s)
+licence_process_platform_challenge(STREAM s)
{
uint8 *in_token = NULL, *in_sig;
uint8 out_token[LICENCE_TOKEN_SIZE], decrypt_token[LICENCE_TOKEN_SIZE];
void * crypt_key;
/* Parse incoming packet and save the encrypted token */
- licence_parse_platform_challange(s, &in_token, &in_sig);
+ licence_parse_platform_challenge(s, &in_token, &in_sig);
memcpy(out_token, in_token, LICENCE_TOKEN_SIZE);
/* Decrypt the token. It should read TEST in Unicode. */
ssl_rc4_crypt(crypt_key, (char *)hwid, (char *)crypt_hwid, LICENCE_HWID_SIZE);
ssl_rc4_info_delete(crypt_key);
- licence_send_platform_challange_response(out_token, crypt_hwid, out_sig);
+ licence_send_platform_challenge_response(out_token, crypt_hwid, out_sig);
}
/* Process a new licence packet */
return;
}
- /* handle error codes, for now, jsut report them */
+ /* handle error codes, for now, just report them */
switch (error_code)
{
case 0x6: // ERR_NO_LICENSE_SERVER
break;
}
- /* handle error codes, for now, jsut report them */
+ /* handle error codes, for now, just report them */
switch (error_info)
{
default:
licence_process_request(s);
break;
- case LICENCE_TAG_PLATFORM_CHALLANGE:
- licence_process_platform_challange(s);
+ case LICENCE_TAG_PLATFORM_CHALLENGE:
+ licence_process_platform_challenge(s);
break;
case LICENCE_TAG_NEW_LICENCE: