820 |
|
|
821 |
/* Receive secure transport packet */ |
/* Receive secure transport packet */ |
822 |
STREAM |
STREAM |
823 |
sec_recv(void) |
sec_recv(uint8 * rdpver) |
824 |
{ |
{ |
825 |
uint32 sec_flags; |
uint32 sec_flags; |
826 |
uint16 channel; |
uint16 channel; |
827 |
STREAM s; |
STREAM s; |
828 |
|
|
829 |
while ((s = mcs_recv(&channel)) != NULL) |
while ((s = mcs_recv(&channel, rdpver)) != NULL) |
830 |
{ |
{ |
831 |
|
if (rdpver != NULL) |
832 |
|
{ |
833 |
|
if (*rdpver != 3) |
834 |
|
{ |
835 |
|
if (*rdpver & 0x80) |
836 |
|
{ |
837 |
|
in_uint8s(s, 8); /* signature */ |
838 |
|
sec_decrypt(s->p, s->end - s->p); |
839 |
|
} |
840 |
|
return s; |
841 |
|
} |
842 |
|
} |
843 |
if (g_encryption || !g_licence_issued) |
if (g_encryption || !g_licence_issued) |
844 |
{ |
{ |
845 |
in_uint32_le(s, sec_flags); |
in_uint32_le(s, sec_flags); |