Blob Blame History Raw
From 3941b9078775c31e37b8b4bd89cee06beac3aef1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Rapha=C3=ABl=20Rigo?= <devel-freerdp@syscall.eu>
Date: Tue, 10 Apr 2012 22:24:08 +0200
Subject: [PATCH 2/5] fix issue #530 "NLA password asked after certificate
 refusal" close connection when the certificate is not trusted

---
 libfreerdp-core/tls.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libfreerdp-core/tls.c b/libfreerdp-core/tls.c
index 942b430..b05100e 100644
--- a/libfreerdp-core/tls.c
+++ b/libfreerdp-core/tls.c
@@ -80,8 +80,11 @@ boolean tls_connect(rdpTls* tls)
 		return false;
 	}
 
-	if (!tls_verify_certificate(tls, tls->cert, tls->settings->hostname))
+	if (!tls_verify_certificate(tls, tls->cert, tls->settings->hostname)) {
+		printf("tls_connect: certificate not trusted, aborting.\n");
 		tls_disconnect(tls);
+		return false;
+	}
 
 	return true;
 }
-- 
2.5.5