summaryrefslogtreecommitdiffstats
path: root/libxrdp/xrdp_rdp.c
diff options
context:
space:
mode:
authorjsorg71 <jsorg71>2006-04-14 03:02:02 +0000
committerjsorg71 <jsorg71>2006-04-14 03:02:02 +0000
commit8fd2618101c5559b694938427c7519e33ee3ea02 (patch)
tree587648c52f3c69716a59c76d1de704c072f68a1e /libxrdp/xrdp_rdp.c
parentab61191620ba5dbb88758802eff69686db513163 (diff)
downloadxrdp-proprietary-8fd2618101c5559b694938427c7519e33ee3ea02.tar.gz
xrdp-proprietary-8fd2618101c5559b694938427c7519e33ee3ea02.zip
added medium and high rdp encryption via xrdp.ini
Diffstat (limited to 'libxrdp/xrdp_rdp.c')
-rw-r--r--libxrdp/xrdp_rdp.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c
index 39aa8896..3aebcb28 100644
--- a/libxrdp/xrdp_rdp.c
+++ b/libxrdp/xrdp_rdp.c
@@ -87,6 +87,21 @@ xrdp_rdp_read_config(struct xrdp_client_info* client_info)
client_info->use_bitmap_comp = 1;
}
}
+ else if (g_strncasecmp(item, "crypt_level", 255) == 0)
+ {
+ if (g_strncasecmp(value, "low", 255) == 0)
+ {
+ client_info->crypt_level = 1;
+ }
+ else if (g_strncasecmp(value, "medium", 255) == 0)
+ {
+ client_info->crypt_level = 2;
+ }
+ else if (g_strncasecmp(value, "high", 255) == 0)
+ {
+ client_info->crypt_level = 3;
+ }
+ }
}
list_delete(items);
list_delete(values);
@@ -104,9 +119,10 @@ xrdp_rdp_create(struct xrdp_session* session, int sck)
self = (struct xrdp_rdp*)g_malloc(sizeof(struct xrdp_rdp), 1);
self->session = session;
self->share_id = 66538;
- self->sec_layer = xrdp_sec_create(self, sck);
/* read ini settings */
xrdp_rdp_read_config(&self->client_info);
+ /* create sec layer */
+ self->sec_layer = xrdp_sec_create(self, sck, self->client_info.crypt_level);
/* default 8 bit v1 color bitmap cache entries and size */
self->client_info.cache1_entries = 600;
self->client_info.cache1_size = 256;
@@ -221,7 +237,7 @@ xrdp_rdp_send(struct xrdp_rdp* self, struct stream* s, int pdu_type)
out_uint16_le(s, len);
out_uint16_le(s, 0x10 | pdu_type);
out_uint16_le(s, self->mcs_channel);
- if (xrdp_sec_send(self->sec_layer, s, 0) != 0)
+ if (xrdp_sec_send(self->sec_layer, s) != 0)
{
DEBUG(("out xrdp_rdp_send error\r\n"));
return 1;
@@ -250,7 +266,7 @@ xrdp_rdp_send_data(struct xrdp_rdp* self, struct stream* s,
out_uint8(s, data_pdu_type);
out_uint8(s, 0);
out_uint16_le(s, 0);
- if (xrdp_sec_send(self->sec_layer, s, 0) != 0)
+ if (xrdp_sec_send(self->sec_layer, s) != 0)
{
DEBUG(("out xrdp_rdp_send_data error\r\n"));
return 1;