libfreerdp-core: adjust security level for TSG

This commit is contained in:
Marc-André Moreau 2012-11-14 23:21:00 -05:00
parent c6a998d2c3
commit c5b12e5c1e
2 changed files with 26 additions and 18 deletions

View File

@ -104,6 +104,11 @@ BOOL rdp_client_connect(rdpRdp* rdp)
cookie[cookie_length] = '\0';
nego_set_cookie(rdp->nego, cookie);
settings->RdpSecurity = TRUE;
settings->TlsSecurity = FALSE;
settings->NlaSecurity = FALSE;
settings->ExtSecurity = FALSE;
}
else
{

View File

@ -87,27 +87,27 @@ BOOL transport_connect_rdp(rdpTransport* transport)
BOOL transport_connect_tls(rdpTransport* transport)
{
if (transport->layer != TRANSPORT_LAYER_TSG)
if (transport->layer == TRANSPORT_LAYER_TSG)
return TRUE;
if (transport->TlsIn == NULL)
transport->TlsIn = tls_new(transport->settings);
if (transport->TlsOut == NULL)
transport->TlsOut = transport->TlsIn;
transport->layer = TRANSPORT_LAYER_TLS;
transport->TlsIn->sockfd = transport->TcpIn->sockfd;
if (tls_connect(transport->TlsIn) != TRUE)
{
if (transport->TlsIn == NULL)
transport->TlsIn = tls_new(transport->settings);
if (!connectErrorCode)
connectErrorCode = TLSCONNECTERROR;
if (transport->TlsOut == NULL)
transport->TlsOut = transport->TlsIn;
tls_free(transport->TlsIn);
transport->TlsIn = NULL;
transport->layer = TRANSPORT_LAYER_TLS;
transport->TlsIn->sockfd = transport->TcpIn->sockfd;
if (tls_connect(transport->TlsIn) != TRUE)
{
if (!connectErrorCode)
connectErrorCode = TLSCONNECTERROR;
tls_free(transport->TlsIn);
transport->TlsIn = NULL;
return FALSE;
}
return FALSE;
}
return TRUE;
@ -118,6 +118,9 @@ BOOL transport_connect_nla(rdpTransport* transport)
freerdp* instance;
rdpSettings* settings;
if (transport->layer == TRANSPORT_LAYER_TSG)
return TRUE;
if (!transport_connect_tls(transport))
return FALSE;