From 66ecabb647d8be54e32a5291702ca034255724e0 Mon Sep 17 00:00:00 2001 From: Dan Bungert Date: Mon, 28 Oct 2013 16:59:02 -0600 Subject: [PATCH] Final cleanups - merge ready. --- client/X11/cli/xfreerdp.c | 2 -- libfreerdp/core/connection.c | 8 ------- libfreerdp/core/gateway/rpc_client.c | 2 -- libfreerdp/core/nla.c | 1 - libfreerdp/core/transport.c | 31 +--------------------------- libfreerdp/crypto/tls.c | 2 -- 6 files changed, 1 insertion(+), 45 deletions(-) diff --git a/client/X11/cli/xfreerdp.c b/client/X11/cli/xfreerdp.c index dcaf5dbfd..8e39158c2 100644 --- a/client/X11/cli/xfreerdp.c +++ b/client/X11/cli/xfreerdp.c @@ -42,8 +42,6 @@ int main(int argc, char* argv[]) rdpSettings* settings; RDP_CLIENT_ENTRY_POINTS clientEntryPoints; - setvbuf(stderr, NULL, _IONBF, 0); - ZeroMemory(&clientEntryPoints, sizeof(RDP_CLIENT_ENTRY_POINTS)); clientEntryPoints.Size = sizeof(RDP_CLIENT_ENTRY_POINTS); clientEntryPoints.Version = RDP_CLIENT_INTERFACE_VERSION; diff --git a/libfreerdp/core/connection.c b/libfreerdp/core/connection.c index f941f219f..97030a760 100644 --- a/libfreerdp/core/connection.c +++ b/libfreerdp/core/connection.c @@ -209,14 +209,6 @@ BOOL rdp_client_connect(rdpRdp* rdp) nego_set_cookie(rdp->nego, cookie); free(cookie); - - /* - settings->RdpSecurity = TRUE; - settings->TlsSecurity = TRUE; - settings->NlaSecurity = FALSE; - settings->ExtSecurity = FALSE; - */ - } else { diff --git a/libfreerdp/core/gateway/rpc_client.c b/libfreerdp/core/gateway/rpc_client.c index b9ce57122..502ea9dad 100644 --- a/libfreerdp/core/gateway/rpc_client.c +++ b/libfreerdp/core/gateway/rpc_client.c @@ -432,14 +432,12 @@ RPC_PDU* rpc_recv_dequeue_pdu(rdpRpc* rpc) pdu = (RPC_PDU*) Queue_Dequeue(rpc->client->ReceiveQueue); #ifdef WITH_DEBUG_TSG - /* if (pdu) { fprintf(stderr, "Receiving PDU (length: %d, CallId: %d)\n", pdu->s->length, pdu->CallId); winpr_HexDump(Stream_Buffer(pdu->s), Stream_Length(pdu->s)); fprintf(stderr, "\n"); } - */ #endif return pdu; diff --git a/libfreerdp/core/nla.c b/libfreerdp/core/nla.c index f0bfbd05a..34cbc3784 100644 --- a/libfreerdp/core/nla.c +++ b/libfreerdp/core/nla.c @@ -348,7 +348,6 @@ int credssp_client_authenticate(rdpCredssp* credssp) if (credssp_recv(credssp) < 0) return -1; - /* Verify Server Public Key Echo */ status = credssp_decrypt_public_key_echo(credssp); diff --git a/libfreerdp/core/transport.c b/libfreerdp/core/transport.c index 76c13f579..e87516472 100644 --- a/libfreerdp/core/transport.c +++ b/libfreerdp/core/transport.c @@ -106,11 +106,6 @@ BOOL transport_connect_rdp(rdpTransport* transport) long transport_bio_tsg_callback(BIO* bio, int mode, const char* argp, int argi, long argl, long ret) { - /* - printf("transport_bio_tsg_callback: mode: %d argp: %p argi: %d argl: %d ret: %d\n", - mode, argp, argi, argl, ret); - */ - return 1; } @@ -152,19 +147,16 @@ static int transport_bio_tsg_read(BIO* bio, char* buf, int size) static int transport_bio_tsg_puts(BIO* bio, const char* str) { -/* printf("transport_bio_tsg_puts: %d\n", strlen(str)); */ return 1; } static int transport_bio_tsg_gets(BIO* bio, char* str, int size) { -/* printf("transport_bio_tsg_gets: %d\n", size); */ return 1; } static long transport_bio_tsg_ctrl(BIO* bio, int cmd, long arg1, void* arg2) { -/* printf("transport_bio_tsg_ctrl: cmd: %d arg1: %d arg2: %p\n", cmd, arg1, arg2); */ if(cmd == BIO_CTRL_FLUSH) { return 1; } @@ -173,8 +165,6 @@ static long transport_bio_tsg_ctrl(BIO* bio, int cmd, long arg1, void* arg2) static int transport_bio_tsg_new(BIO* bio) { -/* printf("transport_bio_tsg_new\n"); */ - bio->init = 1; bio->num = 0; bio->ptr = NULL; @@ -185,7 +175,6 @@ static int transport_bio_tsg_new(BIO* bio) static int transport_bio_tsg_free(BIO* bio) { -/* printf("transport_bio_tsg_free\n"); */ return 1; } @@ -400,7 +389,7 @@ BOOL transport_accept_nla(rdpTransport* transport) if (transport->TlsIn == NULL) transport->TlsIn = tls_new(transport->settings); - + if (transport->TlsOut == NULL) transport->TlsOut = transport->TlsIn; @@ -496,24 +485,6 @@ UINT32 nla_header_length(wStream* s) return length; } -char *want(rdpTls *tls) -{ - int what = SSL_want(tls->ssl); - switch(what) - { - case SSL_NOTHING: - return "NOTHING"; - case SSL_WRITING: - return "WRITING"; - case SSL_READING: - return "READING"; - case SSL_X509_LOOKUP: - return "X509_LOOKUP"; - default: - return "UNKNOWN"; - } -} - int transport_read_layer(rdpTransport* transport, UINT8* data, int bytes) { int read = 0; diff --git a/libfreerdp/crypto/tls.c b/libfreerdp/crypto/tls.c index c3e60e205..17d41699a 100644 --- a/libfreerdp/crypto/tls.c +++ b/libfreerdp/crypto/tls.c @@ -99,8 +99,6 @@ SecPkgContext_Bindings* tls_get_channel_bindings(X509* cert) static void tls_ssl_info_callback(const SSL* ssl, int type, int val) { -/* printf("tls_ssl_info_callback: type: %d val: %d\n", type, val); */ - if (type & SSL_CB_HANDSHAKE_START) {