Browse Source

[Development] Rename SSecurityTLSBase source/class to SSecurityTLS.


git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4108 3789f03b-4d11-0410-bbf8-ca57d06f2519
tags/v1.0.90
Adam Tkac 14 years ago
parent
commit
21b61a5c03
4 changed files with 21 additions and 21 deletions
  1. 2
    2
      common/rfb/Makefile.am
  2. 9
    9
      common/rfb/SSecurityTLS.cxx
  3. 5
    5
      common/rfb/SSecurityTLS.h
  4. 5
    5
      common/rfb/Security.cxx

+ 2
- 2
common/rfb/Makefile.am View File

@@ -1,10 +1,10 @@
noinst_LTLIBRARIES = librfb.la

VENCRYPT_HDRS = CSecurityTLS.h CSecurityTLSBase.h CSecurityX509.h \
SSecurityTLSBase.h
SSecurityTLS.h

VENCRYPT_SRCS = CSecurityTLS.cxx CSecurityTLSBase.cxx CSecurityX509.cxx \
SSecurityTLSBase.cxx
SSecurityTLS.cxx

HDRS = Blacklist.h CapsContainer.h CapsList.h CConnection.h \
CMsgHandler.h CMsgReader.h CMsgReaderV3.h CMsgWriter.h \

common/rfb/SSecurityTLSBase.cxx → common/rfb/SSecurityTLS.cxx View File

@@ -27,7 +27,7 @@
#error "This source should not be compiled without HAVE_GNUTLS defined"
#endif

#include <rfb/SSecurityTLSBase.h>
#include <rfb/SSecurityTLS.h>
#include <rfb/SConnection.h>
#include <rfb/LogWriter.h>
#include <rfb/Exception.h>
@@ -39,10 +39,10 @@

using namespace rfb;

StringParameter SSecurityTLSBase::X509_CertFile
StringParameter SSecurityTLS::X509_CertFile
("x509cert", "specifies path to the x509 certificate in PEM format", "", ConfServer);

StringParameter SSecurityTLSBase::X509_KeyFile
StringParameter SSecurityTLS::X509_KeyFile
("x509key", "specifies path to the key of the x509 certificate in PEM format", "", ConfServer);

static LogWriter vlog("TLS");
@@ -54,7 +54,7 @@ static void debug_log(int level, const char* str)
}
#endif

void SSecurityTLSBase::initGlobal()
void SSecurityTLS::initGlobal()
{
static bool globalInitDone = false;

@@ -71,7 +71,7 @@ void SSecurityTLSBase::initGlobal()
}
}

SSecurityTLSBase::SSecurityTLSBase(bool _anon) : session(0), dh_params(0),
SSecurityTLS::SSecurityTLS(bool _anon) : session(0), dh_params(0),
anon_cred(0), cert_cred(0),
anon(_anon), fis(0), fos(0)
{
@@ -79,7 +79,7 @@ SSecurityTLSBase::SSecurityTLSBase(bool _anon) : session(0), dh_params(0),
keyfile = X509_KeyFile.getData();
}

void SSecurityTLSBase::shutdown()
void SSecurityTLS::shutdown()
{
if (session) {
if (gnutls_bye(session, GNUTLS_SHUT_RDWR) != GNUTLS_E_SUCCESS) {
@@ -112,7 +112,7 @@ void SSecurityTLSBase::shutdown()
}


SSecurityTLSBase::~SSecurityTLSBase()
SSecurityTLS::~SSecurityTLS()
{
shutdown();

@@ -125,7 +125,7 @@ SSecurityTLSBase::~SSecurityTLSBase()
delete[] certfile;
}

bool SSecurityTLSBase::processMsg(SConnection *sc)
bool SSecurityTLS::processMsg(SConnection *sc)
{
rdr::InStream* is = sc->getInStream();
rdr::OutStream* os = sc->getOutStream();
@@ -177,7 +177,7 @@ bool SSecurityTLSBase::processMsg(SConnection *sc)
return true;
}

void SSecurityTLSBase::setParams(gnutls_session session)
void SSecurityTLS::setParams(gnutls_session session)
{
static const int kx_anon_priority[] = { GNUTLS_KX_ANON_DH, 0 };
static const int kx_priority[] = { GNUTLS_KX_DHE_DSS, GNUTLS_KX_RSA,

common/rfb/SSecurityTLSBase.h → common/rfb/SSecurityTLS.h View File

@@ -19,8 +19,8 @@
* USA.
*/

#ifndef __S_SECURITY_TLSBASE_H__
#define __S_SECURITY_TLSBASE_H__
#ifndef __S_SECURITY_TLS_H__
#define __S_SECURITY_TLS_H__

#ifdef HAVE_CONFIG_H
#include <config.h>
@@ -38,10 +38,10 @@

namespace rfb {

class SSecurityTLSBase : public SSecurity {
class SSecurityTLS : public SSecurity {
public:
SSecurityTLSBase(bool _anon);
virtual ~SSecurityTLSBase();
SSecurityTLS(bool _anon);
virtual ~SSecurityTLS();
virtual bool processMsg(SConnection* sc);
virtual const char* getUserName() const {return 0;}
virtual int getType() const { return anon ? secTypeTLSNone : secTypeX509None;}

+ 5
- 5
common/rfb/Security.cxx View File

@@ -41,7 +41,7 @@
#ifdef HAVE_GNUTLS
#include <rfb/CSecurityTLS.h>
#include <rfb/CSecurityX509.h>
#include <rfb/SSecurityTLSBase.h>
#include <rfb/SSecurityTLS.h>
#endif
#include <rfb/util.h>

@@ -124,13 +124,13 @@ SSecurity* Security::GetSSecurity(U32 secType)
case secTypeVeNCrypt: return new SSecurityVeNCrypt(this);
#ifdef HAVE_GNUTLS
case secTypeTLSNone:
return new SSecurityStack(secTypeTLSNone, new SSecurityTLSBase(true));
return new SSecurityStack(secTypeTLSNone, new SSecurityTLS(true));
case secTypeTLSVnc:
return new SSecurityStack(secTypeTLSVnc, new SSecurityTLSBase(true), new SSecurityVncAuth());
return new SSecurityStack(secTypeTLSVnc, new SSecurityTLS(true), new SSecurityVncAuth());
case secTypeX509None:
return new SSecurityStack(secTypeX509None, new SSecurityTLSBase(false));
return new SSecurityStack(secTypeX509None, new SSecurityTLS(false));
case secTypeX509Vnc:
return new SSecurityStack(secTypeX509None, new SSecurityTLSBase(false), new SSecurityVncAuth());
return new SSecurityStack(secTypeX509None, new SSecurityTLS(false), new SSecurityVncAuth());
#endif
}


Loading…
Cancel
Save