diff options
author | Idan Freiberg <speidy@gmail.com> | 2014-07-17 14:29:23 +0300 |
---|---|---|
committer | Idan Freiberg <speidy@gmail.com> | 2014-07-17 14:29:23 +0300 |
commit | 7ab1d887aecf7883b1254cd97ecfee02de45b74a (patch) | |
tree | f67d58c85f7b3ca33d1158efabebd2457b0cb46d /libxrdp/xrdp_sec.c | |
parent | f0b6c6b1d178419ae82ad1c8ea2d74c97cc2f27b (diff) | |
download | xrdp-proprietary-7ab1d887aecf7883b1254cd97ecfee02de45b74a.tar.gz xrdp-proprietary-7ab1d887aecf7883b1254cd97ecfee02de45b74a.zip |
libxrdp: work on TLS support
Diffstat (limited to 'libxrdp/xrdp_sec.c')
-rw-r--r-- | libxrdp/xrdp_sec.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libxrdp/xrdp_sec.c b/libxrdp/xrdp_sec.c index c908c081..ef1b94f9 100644 --- a/libxrdp/xrdp_sec.c +++ b/libxrdp/xrdp_sec.c @@ -277,7 +277,8 @@ xrdp_sec_create(struct xrdp_rdp *owner, struct trans *trans, int crypt_level, self->fastpath_layer = xrdp_fastpath_create(self, trans); self->chan_layer = xrdp_channel_create(self, self->mcs_layer); //TODO: add cert to config - self->tls = xrdp_tls_create(trans, "/opt/xrdpdev/etc/xrdp/pkey.pem", "/opt/xrdpdev/etc/xrdp/cert.pem"); + self->tls = xrdp_tls_create(trans, "/opt/xrdpdev/etc/xrdp/pkey.pem", + "/opt/xrdpdev/etc/xrdp/cert.pem"); DEBUG((" out xrdp_sec_create")); return self; } @@ -1857,7 +1858,7 @@ xrdp_sec_out_mcs_data(struct xrdp_sec *self) ud_ptr = s->p; /* User Data */ out_uint16_le(s, SEC_TAG_SRV_INFO); - if (self->mcs_layer->iso_layer->selectedProtocol != -1) + if (self->mcs_layer->iso_layer->rdpNegData) { out_uint16_le(s, 12); /* len */ } @@ -1869,7 +1870,7 @@ xrdp_sec_out_mcs_data(struct xrdp_sec *self) out_uint8(s, 0); out_uint8(s, 8); out_uint8(s, 0); - if (self->mcs_layer->iso_layer->selectedProtocol != -1) + if (self->mcs_layer->iso_layer->rdpNegData) { /* ReqeustedProtocol */ out_uint32_le(s, self->mcs_layer->iso_layer->selectedProtocol); @@ -1952,6 +1953,14 @@ xrdp_sec_out_mcs_data(struct xrdp_sec *self) out_uint8a(s, self->pub_sig, 64); /* pub sig */ out_uint8s(s, 8); /* pad */ } + else if (self->rsa_key_bytes == 0) /* no security */ + { + g_writeln("xrdp_sec_out_mcs_data: using no security"); + out_uint16_le(s, SEC_TAG_SRV_CRYPT); + out_uint16_le(s, 12); /* len is 12 */ + out_uint32_le(s, self->crypt_method); + out_uint32_le(s, self->crypt_level); + } else { LLOGLN(0, ("xrdp_sec_out_mcs_data: error")); |