Blame SOURCES/fix-issue-530-NLA-password-asked-after-certificate-r.patch

24c59a
From 3941b9078775c31e37b8b4bd89cee06beac3aef1 Mon Sep 17 00:00:00 2001
24c59a
From: =?UTF-8?q?Rapha=C3=ABl=20Rigo?= <devel-freerdp@syscall.eu>
24c59a
Date: Tue, 10 Apr 2012 22:24:08 +0200
24c59a
Subject: [PATCH 2/5] fix issue #530 "NLA password asked after certificate
24c59a
 refusal" close connection when the certificate is not trusted
24c59a
24c59a
---
24c59a
 libfreerdp-core/tls.c | 5 ++++-
24c59a
 1 file changed, 4 insertions(+), 1 deletion(-)
24c59a
24c59a
diff --git a/libfreerdp-core/tls.c b/libfreerdp-core/tls.c
24c59a
index 942b430..b05100e 100644
24c59a
--- a/libfreerdp-core/tls.c
24c59a
+++ b/libfreerdp-core/tls.c
24c59a
@@ -80,8 +80,11 @@ boolean tls_connect(rdpTls* tls)
24c59a
 		return false;
24c59a
 	}
24c59a
 
24c59a
-	if (!tls_verify_certificate(tls, tls->cert, tls->settings->hostname))
24c59a
+	if (!tls_verify_certificate(tls, tls->cert, tls->settings->hostname)) {
24c59a
+		printf("tls_connect: certificate not trusted, aborting.\n");
24c59a
 		tls_disconnect(tls);
24c59a
+		return false;
24c59a
+	}
24c59a
 
24c59a
 	return true;
24c59a
 }
24c59a
-- 
24c59a
2.5.5
24c59a