server: send valid client license error pdu.

This commit is contained in:
Vic Lee
2011-08-20 21:41:40 +08:00
parent 11f10b2bb8
commit 15365b86af
3 changed files with 28 additions and 0 deletions

View File

@@ -250,6 +250,9 @@ boolean rdp_server_accept_client_info(rdpRdp* rdp, STREAM* s)
if (!rdp_read_client_info(rdp, s))
return False;
if (!license_send_valid_client_error_packet(rdp->license))
return False;
return True;
}

View File

@@ -827,6 +827,29 @@ void license_send_platform_challenge_response_packet(rdpLicense* license)
license_send(license, s, PLATFORM_CHALLENGE_RESPONSE);
}
/**
* Send Server License Error - Valid Client Packet.\n
* @msdn{cc241922}
* @param license license module
*/
boolean license_send_valid_client_error_packet(rdpLicense* license)
{
STREAM* s;
s = license_send_stream_init(license);
stream_write_uint32(s, STATUS_VALID_CLIENT); /* dwErrorCode */
stream_write_uint32(s, ST_NO_TRANSITION); /* dwStateTransition */
license_write_binary_blob(s, license->error_info);
license_send(license, s, ERROR_ALERT);
return True;
}
/**
* Instantiate new license module.
* @param rdp RDP module

View File

@@ -193,6 +193,8 @@ void license_send_new_license_request_packet(rdpLicense* license);
void license_write_platform_challenge_response_packet(rdpLicense* license, STREAM* s, uint8* mac_data);
void license_send_platform_challenge_response_packet(rdpLicense* license);
boolean license_send_valid_client_error_packet(rdpLicense* license);
rdpLicense* license_new(rdpRdp* rdp);
void license_free(rdpLicense* license);