summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_rdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'libxrdp/xrdp_rdp.c')
-rw-r--r--libxrdp/xrdp_rdp.c73
1 files changed, 5 insertions, 68 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index cdbb46a2..b357e954 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -1,7 +1,7 @@
/**
* xrdp: A Remote Desktop Protocol server.
*
- * Copyright (C) Jay Sorg 2004-2013
+ * Copyright (C) Jay Sorg 2004-2014
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -80,6 +80,10 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info)
{
client_info->crypt_level = 3;
}
+ else if (g_strcasecmp(value, "fips") == 0)
+ {
+ client_info->crypt_level = 4;
+ }
else
{
log_message(LOG_LEVEL_ALWAYS,"Warning: Your configured crypt level is"
@@ -483,69 +487,6 @@ xrdp_rdp_send_data_update_sync(struct xrdp_rdp *self)
}
/*****************************************************************************/
-static int APP_CC
-xrdp_rdp_parse_client_mcs_data(struct xrdp_rdp *self)
-{
- struct stream *p = (struct stream *)NULL;
- int i = 0;
-
- p = &(self->sec_layer->client_mcs_data);
- p->p = p->data;
- if (!s_check_rem(p, 31 + 2 + 2 + 120 + 2))
- {
- g_writeln("xrdp_rdp_parse_client_mcs_data: error");
- return 1;
- }
- in_uint8s(p, 31);
- in_uint16_le(p, self->client_info.width);
- in_uint16_le(p, self->client_info.height);
- in_uint8s(p, 120);
- self->client_info.bpp = 8;
- in_uint16_le(p, i);
-
- switch (i)
- {
- case 0xca01:
- if (!s_check_rem(p, 6 + 1))
- {
- return 1;
- }
- in_uint8s(p, 6);
- in_uint8(p, i);
-
- if (i > 8)
- {
- self->client_info.bpp = i;
- }
-
- break;
- case 0xca02:
- self->client_info.bpp = 15;
- break;
- case 0xca03:
- self->client_info.bpp = 16;
- break;
- case 0xca04:
- self->client_info.bpp = 24;
- break;
- }
-
- if (self->client_info.max_bpp > 0)
- {
- if (self->client_info.bpp > self->client_info.max_bpp)
- {
- self->client_info.bpp = self->client_info.max_bpp;
- }
- }
-
- p->p = p->data;
- DEBUG(("client width %d, client height %d bpp %d",
- self->client_info.width, self->client_info.height,
- self->client_info.bpp));
- return 0;
-}
-
-/*****************************************************************************/
int APP_CC
xrdp_rdp_incoming(struct xrdp_rdp *self)
{
@@ -555,19 +496,15 @@ xrdp_rdp_incoming(struct xrdp_rdp *self)
{
return 1;
}
-
self->mcs_channel = self->sec_layer->mcs_layer->userid +
MCS_USERCHANNEL_BASE;
- xrdp_rdp_parse_client_mcs_data(self);
DEBUG(("out xrdp_rdp_incoming mcs channel %d", self->mcs_channel));
-
g_strncpy(self->client_info.client_addr,
self->sec_layer->mcs_layer->iso_layer->tcp_layer->trans->addr,
sizeof(self->client_info.client_addr) - 1);
g_strncpy(self->client_info.client_port,
self->sec_layer->mcs_layer->iso_layer->tcp_layer->trans->port,
sizeof(self->client_info.client_port) - 1);
-
return 0;
}