diff options
| author | Jay Sorg <jay.sorg@gmail.com> | 2014-08-05 12:28:54 -0700 |
|---|---|---|
| committer | Jay Sorg <jay.sorg@gmail.com> | 2014-08-05 12:28:54 -0700 |
| commit | ffed34987515013e7fb258379ad3e94e677251f0 (patch) | |
| tree | f0570af47ee6837222120319d70d0eba389725c8 /libxrdp | |
| parent | 821bf3e2a58e7f8de641118e608f58517a1567fb (diff) | |
| download | xrdp-proprietary-ffed34987515013e7fb258379ad3e94e677251f0.tar.gz xrdp-proprietary-ffed34987515013e7fb258379ad3e94e677251f0.zip | |
added option to set rdp crypto level to none
Diffstat (limited to 'libxrdp')
| -rw-r--r-- | libxrdp/xrdp_rdp.c | 6 | ||||
| -rw-r--r-- | libxrdp/xrdp_sec.c | 19 |
2 files changed, 23 insertions, 2 deletions
diff --git a/libxrdp/xrdp_rdp.c b/libxrdp/xrdp_rdp.c index b4ef19a8..e0443a3b 100644 --- a/libxrdp/xrdp_rdp.c +++ b/libxrdp/xrdp_rdp.c @@ -76,7 +76,11 @@ xrdp_rdp_read_config(struct xrdp_client_info *client_info) } else if (g_strcasecmp(item, "crypt_level") == 0) { - if (g_strcasecmp(value, "low") == 0) + if (g_strcasecmp(value, "none") == 0) + { + client_info->crypt_level = 0; + } + else if (g_strcasecmp(value, "low") == 0) { client_info->crypt_level = 1; } diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index faaf9133..c3e2c674 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -1779,9 +1779,22 @@ xrdp_sec_process_mcs_data_CS_SECURITY(struct xrdp_sec *self, struct stream* s) found = 1; } } + if ((found == 0) && + (self->crypt_level == CRYPT_LEVEL_NONE)) + { + if (crypt_method == CRYPT_METHOD_NONE) + { + g_writeln(" client and server support none crypt, using " + "none crypt"); + self->crypt_method = CRYPT_METHOD_NONE; + self->crypt_level = CRYPT_LEVEL_NONE; + found = 1; + } + } if (found == 0) { - g_writeln(" no security"); + g_writeln(" can not find client / server agreed encryption method"); + return 1; } return 0; } @@ -2069,6 +2082,10 @@ xrdp_sec_init_rdp_security(struct xrdp_sec *self) { switch (self->rdp_layer->client_info.crypt_level) { + case 0: /* none */ + self->crypt_method = CRYPT_METHOD_NONE; + self->crypt_level = CRYPT_LEVEL_NONE; + break; case 1: /* low */ self->crypt_method = CRYPT_METHOD_40BIT; self->crypt_level = CRYPT_LEVEL_LOW; |
