summaryrefslogtreecommitdiffstats
path: root/common/rfb/CSecurityTLS.cxx
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2018-09-21 15:31:11 +0200
committerPierre Ossman <ossman@cendio.se>2018-09-21 15:59:46 +0200
commitad2b3c4aa3db056b83f5d91564400e03f3239835 (patch)
treea81ce066072a3c5db0665e4e522d3fbfd1c221ea /common/rfb/CSecurityTLS.cxx
parent50aaed49b67e451cad63b3846989d13f083aad0a (diff)
downloadtigervnc-ad2b3c4aa3db056b83f5d91564400e03f3239835.tar.gz
tigervnc-ad2b3c4aa3db056b83f5d91564400e03f3239835.zip
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.
Diffstat (limited to 'common/rfb/CSecurityTLS.cxx')
-rw-r--r--common/rfb/CSecurityTLS.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/rfb/CSecurityTLS.cxx b/common/rfb/CSecurityTLS.cxx
index c90f49ec..b943c106 100644
--- a/common/rfb/CSecurityTLS.cxx
+++ b/common/rfb/CSecurityTLS.cxx
@@ -67,8 +67,9 @@ StringParameter CSecurityTLS::X509CRL("X509CRL", "X509 CRL file", "", ConfViewer
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 @@ CSecurityTLS::~CSecurityTLS()
gnutls_global_deinit();
}
-bool CSecurityTLS::processMsg(CConnection* cc)
+bool CSecurityTLS::processMsg()
{
rdr::InStream* is = cc->getInStream();
rdr::OutStream* os = cc->getOutStream();