From 3c5be39e92ef06902a5c502616ec052381345f7a Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Wed, 21 Jul 2010 09:27:34 +0000 Subject: [PATCH] [Development] Rename CSecurityTLSBase class to CSecurityTLS. git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4110 3789f03b-4d11-0410-bbf8-ca57d06f2519 --- ...{CSecurityTLSBase.cxx => CSecurityTLS.cxx} | 20 +++++++++---------- .../{CSecurityTLSBase.h => CSecurityTLS.h} | 10 +++++----- common/rfb/Makefile.am | 4 ++-- common/rfb/Security.cxx | 10 +++++----- 4 files changed, 22 insertions(+), 22 deletions(-) rename common/rfb/{CSecurityTLSBase.cxx => CSecurityTLS.cxx} (91%) rename common/rfb/{CSecurityTLSBase.h => CSecurityTLS.h} (88%) diff --git a/common/rfb/CSecurityTLSBase.cxx b/common/rfb/CSecurityTLS.cxx similarity index 91% rename from common/rfb/CSecurityTLSBase.cxx rename to common/rfb/CSecurityTLS.cxx index bc9d3f52..7b2456db 100644 --- a/common/rfb/CSecurityTLSBase.cxx +++ b/common/rfb/CSecurityTLS.cxx @@ -27,7 +27,7 @@ #error "This header should not be compiled without HAVE_GNUTLS defined" #endif -#include +#include #include #include #include @@ -41,8 +41,8 @@ using namespace rfb; -StringParameter CSecurityTLSBase::x509ca("x509ca", "X509 CA certificate", "", ConfViewer); -StringParameter CSecurityTLSBase::x509crl("x509crl", "X509 CRL file", "", ConfViewer); +StringParameter CSecurityTLS::x509ca("x509ca", "X509 CA certificate", "", ConfViewer); +StringParameter CSecurityTLS::x509crl("x509crl", "X509 CRL file", "", ConfViewer); static LogWriter vlog("TLS"); @@ -53,7 +53,7 @@ static void debug_log(int level, const char* str) } #endif -void CSecurityTLSBase::initGlobal() +void CSecurityTLS::initGlobal() { static bool globalInitDone = false; @@ -69,14 +69,14 @@ void CSecurityTLSBase::initGlobal() } } -CSecurityTLSBase::CSecurityTLSBase(bool _anon) : session(0), anon_cred(0), +CSecurityTLS::CSecurityTLS(bool _anon) : session(0), anon_cred(0), anon(_anon), fis(0), fos(0) { cafile = x509ca.getData(); crlfile = x509crl.getData(); } -void CSecurityTLSBase::shutdown() +void CSecurityTLS::shutdown() { if (session) gnutls_bye(session, GNUTLS_SHUT_RDWR); @@ -100,7 +100,7 @@ void CSecurityTLSBase::shutdown() } -CSecurityTLSBase::~CSecurityTLSBase() +CSecurityTLS::~CSecurityTLS() { shutdown(); @@ -113,7 +113,7 @@ CSecurityTLSBase::~CSecurityTLSBase() delete[] crlfile; } -bool CSecurityTLSBase::processMsg(CConnection* cc) +bool CSecurityTLS::processMsg(CConnection* cc) { rdr::InStream* is = cc->getInStream(); rdr::OutStream* os = cc->getOutStream(); @@ -159,7 +159,7 @@ bool CSecurityTLSBase::processMsg(CConnection* cc) return true; } -void CSecurityTLSBase::setParam() +void CSecurityTLS::setParam() { static const int kx_anon_priority[] = { GNUTLS_KX_ANON_DH, 0 }; static const int kx_priority[] = { GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA, @@ -187,7 +187,7 @@ void CSecurityTLSBase::setParam() } } -void CSecurityTLSBase::checkSession() +void CSecurityTLS::checkSession() { int status; const gnutls_datum *cert_list; diff --git a/common/rfb/CSecurityTLSBase.h b/common/rfb/CSecurityTLS.h similarity index 88% rename from common/rfb/CSecurityTLSBase.h rename to common/rfb/CSecurityTLS.h index b9432640..de8615ae 100644 --- a/common/rfb/CSecurityTLSBase.h +++ b/common/rfb/CSecurityTLS.h @@ -19,8 +19,8 @@ * USA. */ -#ifndef __C_SECURITY_TLSBASE_H__ -#define __C_SECURITY_TLSBASE_H__ +#ifndef __C_SECURITY_TLS_H__ +#define __C_SECURITY_TLS_H__ #ifdef HAVE_CONFIG_H #include @@ -38,10 +38,10 @@ #include namespace rfb { - class CSecurityTLSBase : public CSecurity { + class CSecurityTLS : public CSecurity { public: - CSecurityTLSBase(bool _anon); - virtual ~CSecurityTLSBase(); + CSecurityTLS(bool _anon); + virtual ~CSecurityTLS(); virtual bool processMsg(CConnection* cc); virtual int getType() const { return anon ? secTypeTLSNone : secTypeX509None; } virtual const char* description() const diff --git a/common/rfb/Makefile.am b/common/rfb/Makefile.am index b8ddca45..78c959f0 100644 --- a/common/rfb/Makefile.am +++ b/common/rfb/Makefile.am @@ -1,8 +1,8 @@ noinst_LTLIBRARIES = librfb.la -VENCRYPT_HDRS = CSecurityTLSBase.h SSecurityTLS.h +VENCRYPT_HDRS = CSecurityTLS.h SSecurityTLS.h -VENCRYPT_SRCS = CSecurityTLSBase.cxx SSecurityTLS.cxx +VENCRYPT_SRCS = CSecurityTLS.cxx SSecurityTLS.cxx HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h \ CMsgHandler.h CMsgReader.h CMsgReaderV3.h CMsgWriter.h \ diff --git a/common/rfb/Security.cxx b/common/rfb/Security.cxx index 18fc56fa..b7ce7149 100644 --- a/common/rfb/Security.cxx +++ b/common/rfb/Security.cxx @@ -39,7 +39,7 @@ #include #include #ifdef HAVE_GNUTLS -#include +#include #include #endif #include @@ -151,16 +151,16 @@ CSecurity* Security::GetCSecurity(U32 secType) #ifdef HAVE_GNUTLS case secTypeTLSNone: return new CSecurityStack(secTypeTLSNone, "TLS with no password", - new CSecurityTLSBase(true)); + new CSecurityTLS(true)); case secTypeTLSVnc: return new CSecurityStack(secTypeTLSVnc, "TLS with VNCAuth", - new CSecurityTLSBase(true), new CSecurityVncAuth()); + new CSecurityTLS(true), new CSecurityVncAuth()); case secTypeX509None: return new CSecurityStack(secTypeX509None, "X509 with no password", - new CSecurityTLSBase(false)); + new CSecurityTLS(false)); case secTypeX509Vnc: return new CSecurityStack(secTypeX509None, "X509 with VNCAuth", - new CSecurityTLSBase(false), new CSecurityVncAuth()); + new CSecurityTLS(false), new CSecurityVncAuth()); #endif } -- 2.39.5