Strongly bind security objects to connection object
There is already an implicit connection between them, so let's make
it explicit. This allows easy lookup outside of the processMsg() function.
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index c90f49e..b943c10 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -67,8 +67,9 @@
static LogWriter vlog("TLS");
-CSecurityTLS::CSecurityTLS(bool _anon) : session(0), anon_cred(0),
- cert_cred(0), anon(_anon), fis(0), fos(0)
+CSecurityTLS::CSecurityTLS(CConnection* cc, bool _anon)
+ : CSecurity(cc), session(NULL), anon_cred(NULL), cert_cred(NULL),
+ anon(_anon), fis(NULL), fos(NULL)
{
cafile = X509CA.getData();
crlfile = X509CRL.getData();
@@ -137,7 +138,7 @@
gnutls_global_deinit();
}
-bool CSecurityTLS::processMsg(CConnection* cc)
+bool CSecurityTLS::processMsg()
{
rdr::InStream* is = cc->getInStream();
rdr::OutStream* os = cc->getOutStream();