Use rdp_read_security_header() to read security header.

This commit is contained in:
Pawel Jakub Dawidek 2012-01-24 15:57:06 +01:00
parent b3a4be0298
commit 4df52d7a42
2 changed files with 9 additions and 9 deletions

View File

@ -1793,20 +1793,20 @@ boolean rdp_recv_demand_active(rdpRdp* rdp, STREAM* s)
uint16 numberCapabilities;
uint16 lengthSourceDescriptor;
uint16 lengthCombinedCapabilities;
uint32 securityHeader;
uint16 securityFlags;
if (!rdp_read_header(rdp, s, &length, &channelId))
return false;
if (rdp->settings->encryption)
{
stream_read_uint32(s, securityHeader);
if (securityHeader & SEC_SECURE_CHECKSUM)
rdp_read_security_header(s, &securityFlags);
if (securityFlags & SEC_SECURE_CHECKSUM)
{
printf("Error: TODO\n");
return false;
}
if (securityHeader & SEC_ENCRYPT)
if (securityFlags & SEC_ENCRYPT)
{
if (!rdp_decrypt(rdp, s, length - 4))
{

View File

@ -635,7 +635,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
uint16 pduLength;
uint16 pduSource;
uint16 channelId;
uint32 securityHeader;
uint16 securityFlags;
if (!rdp_read_header(rdp, s, &length, &channelId))
{
@ -645,13 +645,13 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
if (rdp->settings->encryption)
{
stream_read_uint32(s, securityHeader);
if (securityHeader & SEC_SECURE_CHECKSUM)
rdp_read_security_header(s, &securityFlags);
if (securityFlags & SEC_SECURE_CHECKSUM)
{
printf("Error: TODO\n");
return false;
}
if (securityHeader & (SEC_ENCRYPT|SEC_REDIRECTION_PKT))
if (securityFlags & (SEC_ENCRYPT|SEC_REDIRECTION_PKT))
{
if (!rdp_decrypt(rdp, s, length - 4))
{
@ -659,7 +659,7 @@ static boolean rdp_recv_tpkt_pdu(rdpRdp* rdp, STREAM* s)
return false;
}
}
if (securityHeader & SEC_REDIRECTION_PKT)
if (securityFlags & SEC_REDIRECTION_PKT)
{
/*
* [MS-RDPBCGR] 2.2.13.2.1