Revision: 4275
http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4275&view=rev
Author: atkac
Date: 2011-02-09 14:09:10 +0000 (Wed, 09 Feb 2011)
Log Message:
-----------
[Bugfix] Call gnutls_bye only when handshake is completed.
Modified Paths:
--------------
trunk/common/rfb/CSecurityTLS.cxx
trunk/common/rfb/CSecurityTLS.h
Modified: trunk/common/rfb/CSecurityTLS.cxx
===================================================================
--- trunk/common/rfb/CSecurityTLS.cxx 2011-02-09 10:45:09 UTC (rev 4274)
+++ trunk/common/rfb/CSecurityTLS.cxx 2011-02-09 14:09:10 UTC (rev 4275)
@@ -116,11 +116,11 @@
x509crl.setDefaultStr(strdup(crlDefault.buf));
}
-void CSecurityTLS::shutdown()
+void CSecurityTLS::shutdown(bool needbye)
{
- if (session)
+ if (session && needbye)
if (gnutls_bye(session, GNUTLS_SHUT_RDWR) != GNUTLS_E_SUCCESS)
- throw Exception("gnutls_bye failed");
+ vlog.error("gnutls_bye failed");
if (anon_cred) {
gnutls_anon_free_client_credentials(anon_cred);
@@ -143,7 +143,7 @@
CSecurityTLS::~CSecurityTLS()
{
- shutdown();
+ shutdown(true);
if (fis)
delete fis;
@@ -191,7 +191,7 @@
if (err != GNUTLS_E_SUCCESS) {
vlog.error("TLS Handshake failed: %s\n", gnutls_strerror (err));
- shutdown();
+ shutdown(false);
throw AuthFailureException("TLS Handshake failed");
}
Modified: trunk/common/rfb/CSecurityTLS.h
===================================================================
--- trunk/common/rfb/CSecurityTLS.h 2011-02-09 10:45:09 UTC (rev 4274)
+++ trunk/common/rfb/CSecurityTLS.h 2011-02-09 14:09:10 UTC (rev 4275)
@@ -55,7 +55,7 @@
static UserMsgBox *msg;
protected:
- void shutdown();
+ void shutdown(bool needbye);
void freeResources();
void setParam();
void checkSession();
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits