diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2012-11-24 16:19:37 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-11-24 16:21:38 +0100 |
commit | 68b5e38626333b0c1c0396ef8b4b9221e425465a (patch) | |
tree | fa6a18bcf394cf95dbb901a8234ea399c4869e1f /kopete/protocols/jabber/libiris/qca/src | |
parent | b701e9bde1ec398e3c9a89ba8f4de08ab71cd1a7 (diff) | |
download | tdenetwork-68b5e38626333b0c1c0396ef8b4b9221e425465a.tar.gz tdenetwork-68b5e38626333b0c1c0396ef8b4b9221e425465a.zip |
Rename QCA to TQCA
Fix FTBFS
Diffstat (limited to 'kopete/protocols/jabber/libiris/qca/src')
-rw-r--r-- | kopete/protocols/jabber/libiris/qca/src/qca.cpp | 128 | ||||
-rw-r--r-- | kopete/protocols/jabber/libiris/qca/src/qca.h | 86 | ||||
-rw-r--r-- | kopete/protocols/jabber/libiris/qca/src/qcaprovider.h | 66 |
3 files changed, 140 insertions, 140 deletions
diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.cpp b/kopete/protocols/jabber/libiris/qca/src/qca.cpp index bad05fcd..26891798 100644 --- a/kopete/protocols/jabber/libiris/qca/src/qca.cpp +++ b/kopete/protocols/jabber/libiris/qca/src/qca.cpp @@ -40,12 +40,12 @@ #define PLUGIN_EXT "so" #endif -using namespace QCA; +using namespace TQCA; class ProviderItem { public: - QCAProvider *p; + TQCAProvider *p; TQString fname; static ProviderItem *load(const TQString &fname) @@ -60,8 +60,8 @@ public: delete lib; return 0; } - QCAProvider *(*createProvider)() = (QCAProvider *(*)())s; - QCAProvider *p = createProvider(); + TQCAProvider *(*createProvider)() = (TQCAProvider *(*)())s; + TQCAProvider *p = createProvider(); if(!p) { delete lib; return 0; @@ -71,7 +71,7 @@ public: return i; } - static ProviderItem *fromClass(QCAProvider *p) + static ProviderItem *fromClass(TQCAProvider *p) { ProviderItem *i = new ProviderItem(0, p); return i; @@ -95,7 +95,7 @@ private: TQLibrary *lib; bool init_done; - ProviderItem(TQLibrary *_lib, QCAProvider *_p) + ProviderItem(TQLibrary *_lib, TQCAProvider *_p) { lib = _lib; p = _p; @@ -142,7 +142,7 @@ static void plugin_scan() ProviderItem *i = ProviderItem::load(fname); if(!i) continue; - if(i->p->qcaVersion() != QCA_PLUGIN_VERSION) { + if(i->p->qcaVersion() != TQCA_PLUGIN_VERSION) { delete i; continue; } @@ -152,7 +152,7 @@ static void plugin_scan() } } -static void plugin_addClass(QCAProvider *p) +static void plugin_addClass(TQCAProvider *p) { ProviderItem *i = ProviderItem::fromClass(p); providerList.prepend(i); @@ -172,7 +172,7 @@ static int plugin_caps() return caps; } -TQString QCA::arrayToHex(const TQByteArray &a) +TQString TQCA::arrayToHex(const TQByteArray &a) { TQString out; for(int n = 0; n < (int)a.size(); ++n) { @@ -183,7 +183,7 @@ TQString QCA::arrayToHex(const TQByteArray &a) return out; } -TQByteArray QCA::hexToArray(const TQString &str) +TQByteArray TQCA::hexToArray(const TQString &str) { TQByteArray out(str.length() / 2); int at = 0; @@ -196,7 +196,7 @@ TQByteArray QCA::hexToArray(const TQString &str) return out; } -void QCA::init() +void TQCA::init() { if(qca_init) return; @@ -204,7 +204,7 @@ void QCA::init() providerList.setAutoDelete(true); } -bool QCA::isSupported(int capabilities) +bool TQCA::isSupported(int capabilities) { init(); @@ -221,12 +221,12 @@ bool QCA::isSupported(int capabilities) return false; } -void QCA::insertProvider(QCAProvider *p) +void TQCA::insertProvider(TQCAProvider *p) { plugin_addClass(p); } -void QCA::unloadAllPlugins() +void TQCA::unloadAllPlugins() { plugin_unloadall(); } @@ -236,7 +236,7 @@ static void *getContext(int cap) init(); // this call will also trip a scan for new plugins if needed - if(!QCA::isSupported(cap)) + if(!TQCA::isSupported(cap)) return 0; TQPtrListIterator<ProviderItem> it(providerList); @@ -271,10 +271,10 @@ public: c->reset(); } - QCA_HashContext *c; + TQCA_HashContext *c; }; -Hash::Hash(QCA_HashContext *c) +Hash::Hash(TQCA_HashContext *c) { d = new Private; d->c = c; @@ -340,14 +340,14 @@ public: err = false; } - QCA_CipherContext *c; + TQCA_CipherContext *c; int dir; int mode; TQByteArray key, iv; bool err; }; -Cipher::Cipher(QCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) +Cipher::Cipher(TQCA_CipherContext *c, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) { d = new Private; d->c = c; @@ -447,7 +447,7 @@ TQByteArray Cipher::final(bool *ok) // SHA1 //---------------------------------------------------------------------------- SHA1::SHA1() -:Hash((QCA_HashContext *)getContext(CAP_SHA1)) +:Hash((TQCA_HashContext *)getContext(CAP_SHA1)) { } @@ -456,7 +456,7 @@ SHA1::SHA1() // SHA256 //---------------------------------------------------------------------------- SHA256::SHA256() -:Hash((QCA_HashContext *)getContext(CAP_SHA256)) +:Hash((TQCA_HashContext *)getContext(CAP_SHA256)) { } @@ -465,7 +465,7 @@ SHA256::SHA256() // MD5 //---------------------------------------------------------------------------- MD5::MD5() -:Hash((QCA_HashContext *)getContext(CAP_MD5)) +:Hash((TQCA_HashContext *)getContext(CAP_MD5)) { } @@ -474,7 +474,7 @@ MD5::MD5() // BlowFish //---------------------------------------------------------------------------- BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) -:Cipher((QCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad) +:Cipher((TQCA_CipherContext *)getContext(CAP_BlowFish), dir, mode, key, iv, pad) { } @@ -483,7 +483,7 @@ BlowFish::BlowFish(int dir, int mode, const TQByteArray &key, const TQByteArray // TripleDES //---------------------------------------------------------------------------- TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) -:Cipher((QCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad) +:Cipher((TQCA_CipherContext *)getContext(CAP_TripleDES), dir, mode, key, iv, pad) { } @@ -492,7 +492,7 @@ TripleDES::TripleDES(int dir, int mode, const TQByteArray &key, const TQByteArra // AES128 //---------------------------------------------------------------------------- AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) -:Cipher((QCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad) +:Cipher((TQCA_CipherContext *)getContext(CAP_AES128), dir, mode, key, iv, pad) { } @@ -501,7 +501,7 @@ AES128::AES128(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, // AES256 //---------------------------------------------------------------------------- AES256::AES256(int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad) -:Cipher((QCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad) +:Cipher((TQCA_CipherContext *)getContext(CAP_AES256), dir, mode, key, iv, pad) { } @@ -522,13 +522,13 @@ public: delete c; } - QCA_RSAKeyContext *c; + TQCA_RSAKeyContext *c; }; RSAKey::RSAKey() { d = new Private; - d->c = (QCA_RSAKeyContext *)getContext(CAP_RSA); + d->c = (TQCA_RSAKeyContext *)getContext(CAP_RSA); } RSAKey::RSAKey(const RSAKey &from) @@ -685,13 +685,13 @@ public: delete c; } - QCA_CertContext *c; + TQCA_CertContext *c; }; Cert::Cert() { d = new Private; - d->c = (QCA_CertContext *)getContext(CAP_X509); + d->c = (TQCA_CertContext *)getContext(CAP_X509); } Cert::Cert(const Cert &from) @@ -712,7 +712,7 @@ Cert::~Cert() delete d; } -void Cert::fromContext(QCA_CertContext *ctx) +void Cert::fromContext(TQCA_CertContext *ctx) { delete d->c; d->c = ctx; @@ -746,18 +746,18 @@ TQString Cert::issuerString() const CertProperties Cert::subject() const { - TQValueList<QCA_CertProperty> list = d->c->subject(); + TQValueList<TQCA_CertProperty> list = d->c->subject(); CertProperties props; - for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<TQCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } CertProperties Cert::issuer() const { - TQValueList<QCA_CertProperty> list = d->c->issuer(); + TQValueList<TQCA_CertProperty> list = d->c->issuer(); CertProperties props; - for(TQValueList<QCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) + for(TQValueList<TQCA_CertProperty>::ConstIterator it = list.begin(); it != list.end(); ++it) props[(*it).var] = (*it).val; return props; } @@ -814,7 +814,7 @@ class TLS::Private public: Private() { - c = (QCA_TLSContext *)getContext(CAP_TLS); + c = (TQCA_TLSContext *)getContext(CAP_TLS); } ~Private() @@ -845,7 +845,7 @@ public: } Cert cert; - QCA_TLSContext *c; + TQCA_TLSContext *c; TQByteArray in, out, to_net, from_net; int bytesEncoded; bool tryMore; @@ -856,7 +856,7 @@ public: Cert ourCert; RSAKey ourKey; - TQPtrList<QCA_CertContext> store; + TQPtrList<TQCA_CertContext> store; }; TLS::TLS(TQObject *parent) @@ -966,7 +966,7 @@ const Cert & TLS::peerCertificate() const int TLS::certificateValidityResult() const { if(d->hostMismatch) - return QCA::TLS::HostMismatch; + return TQCA::TLS::HostMismatch; else return d->c->validityResult(); } @@ -982,12 +982,12 @@ void TLS::update() TQByteArray a; int r = d->c->shutdown(d->from_net, &a); d->from_net.resize(0); - if(r == QCA_TLSContext::Error) { + if(r == TQCA_TLSContext::Error) { reset(); error(ErrHandshake); return; } - if(r == QCA_TLSContext::Success) { + if(r == TQCA_TLSContext::Success) { d->from_net = d->c->unprocessed().copy(); done = true; } @@ -998,15 +998,15 @@ void TLS::update() TQByteArray a; int r = d->c->handshake(d->from_net, &a); d->from_net.resize(0); - if(r == QCA_TLSContext::Error) { + if(r == TQCA_TLSContext::Error) { reset(); error(ErrHandshake); return; } d->appendArray(&d->to_net, a); - if(r == QCA_TLSContext::Success) { - QCA_CertContext *cc = d->c->peerCertificate(); - if(cc && !d->host.isEmpty() && d->c->validityResult() == QCA::TLS::Valid) { + if(r == TQCA_TLSContext::Success) { + TQCA_CertContext *cc = d->c->peerCertificate(); + if(cc && !d->host.isEmpty() && d->c->validityResult() == TQCA::TLS::Valid) { if(!cc->matchesAddress(d->host)) d->hostMismatch = true; } @@ -1097,7 +1097,7 @@ class SASL::Private public: Private() { - c = (QCA_SASLContext *)getContext(CAP_SASL); + c = (TQCA_SASLContext *)getContext(CAP_SASL); } ~Private() @@ -1117,7 +1117,7 @@ public: int ext_ssf; bool tried; - QCA_SASLContext *c; + TQCA_SASLContext *c; TQHostAddress localAddr, remoteAddr; int localPort, remotePort; TQByteArray stepData; @@ -1241,7 +1241,7 @@ void SASL::setRemoteAddr(const TQHostAddress &addr, TQ_UINT16 port) bool SASL::startClient(const TQString &service, const TQString &host, const TQStringList &mechlist, bool allowClientSendFirst) { - QCA_SASLHostPort la, ra; + TQCA_SASLHostPort la, ra; if(d->localPort != -1) { la.addr = d->localAddr; la.port = d->localPort; @@ -1266,7 +1266,7 @@ bool SASL::startClient(const TQString &service, const TQString &host, const TQSt bool SASL::startServer(const TQString &service, const TQString &host, const TQString &realm, TQStringList *mechlist) { - QCA_SASLHostPort la, ra; + TQCA_SASLHostPort la, ra; if(d->localPort != -1) { la.addr = d->localAddr; la.port = d->localPort; @@ -1301,11 +1301,11 @@ void SASL::putServerFirstStep(const TQString &mech, const TQByteArray &clientIni void SASL::handleServerFirstStep(int r) { - if(r == QCA_SASLContext::Success) + if(r == TQCA_SASLContext::Success) authenticated(); - else if(r == QCA_SASLContext::Continue) + else if(r == TQCA_SASLContext::Continue) nextStep(d->c->result()); - else if(r == QCA_SASLContext::AuthCheck) + else if(r == TQCA_SASLContext::AuthCheck) tryAgain(); else error(ErrAuth); @@ -1360,16 +1360,16 @@ void SASL::tryAgain() r = d->c->tryAgain(); } - if(r == QCA_SASLContext::Error) { + if(r == TQCA_SASLContext::Error) { error(ErrAuth); return; } - else if(r == QCA_SASLContext::Continue) { + else if(r == TQCA_SASLContext::Continue) { d->tried = false; nextStep(d->c->result()); return; } - else if(r == QCA_SASLContext::AuthCheck) { + else if(r == TQCA_SASLContext::AuthCheck) { authCheck(d->c->username(), d->c->authzid()); return; } @@ -1383,13 +1383,13 @@ void SASL::tryAgain() else r = d->c->tryAgain(); - if(r == QCA_SASLContext::Error) { + if(r == TQCA_SASLContext::Error) { error(ErrAuth); return; } - else if(r == QCA_SASLContext::NeedParams) { + else if(r == TQCA_SASLContext::NeedParams) { //d->tried = false; - QCA_SASLNeedParams np = d->c->clientParamsNeeded(); + TQCA_SASLNeedParams np = d->c->clientParamsNeeded(); needParams(np.user, np.authzid, np.pass, np.realm); return; } @@ -1409,27 +1409,27 @@ void SASL::tryAgain() else r = d->c->tryAgain(); - if(r == QCA_SASLContext::Error) { + if(r == TQCA_SASLContext::Error) { error(ErrAuth); return; } - else if(r == QCA_SASLContext::NeedParams) { + else if(r == TQCA_SASLContext::NeedParams) { //d->tried = false; - QCA_SASLNeedParams np = d->c->clientParamsNeeded(); + TQCA_SASLNeedParams np = d->c->clientParamsNeeded(); needParams(np.user, np.authzid, np.pass, np.realm); return; } d->tried = false; - //else if(r == QCA_SASLContext::Continue) { + //else if(r == TQCA_SASLContext::Continue) { nextStep(d->c->result()); // return; //} } } - if(r == QCA_SASLContext::Success) + if(r == TQCA_SASLContext::Success) authenticated(); - else if(r == QCA_SASLContext::Error) + else if(r == TQCA_SASLContext::Error) error(ErrAuth); } diff --git a/kopete/protocols/jabber/libiris/qca/src/qca.h b/kopete/protocols/jabber/libiris/qca/src/qca.h index 4c27f047..73edb40d 100644 --- a/kopete/protocols/jabber/libiris/qca/src/qca.h +++ b/kopete/protocols/jabber/libiris/qca/src/qca.h @@ -18,8 +18,8 @@ * */ -#ifndef QCA_H -#define QCA_H +#ifndef TQCA_H +#define TQCA_H #include<tqstring.h> #include<tqcstring.h> @@ -29,38 +29,38 @@ #include<tqobject.h> #ifdef Q_OS_WIN32 -# ifndef QCA_STATIC -# ifdef QCA_MAKEDLL -# define QCA_EXPORT __declspec(dllexport) +# ifndef TQCA_STATIC +# ifdef TQCA_MAKEDLL +# define TQCA_EXPORT __declspec(dllexport) # else -# define QCA_EXPORT __declspec(dllimport) +# define TQCA_EXPORT __declspec(dllimport) # endif # endif #endif -#ifndef QCA_EXPORT -#define QCA_EXPORT +#ifndef TQCA_EXPORT +#define TQCA_EXPORT #endif #ifdef Q_OS_WIN32 -# ifdef QCA_PLUGIN_DLL -# define QCA_PLUGIN_EXPORT extern "C" __declspec(dllexport) +# ifdef TQCA_PLUGIN_DLL +# define TQCA_PLUGIN_EXPORT extern "C" __declspec(dllexport) # else -# define QCA_PLUGIN_EXPORT extern "C" __declspec(dllimport) +# define TQCA_PLUGIN_EXPORT extern "C" __declspec(dllimport) # endif #endif -#ifndef QCA_PLUGIN_EXPORT -#define QCA_PLUGIN_EXPORT extern "C" +#ifndef TQCA_PLUGIN_EXPORT +#define TQCA_PLUGIN_EXPORT extern "C" #endif class TQHostAddress; class TQStringList; -class QCAProvider; -class QCA_HashContext; -class QCA_CipherContext; -class QCA_CertContext; +class TQCAProvider; +class TQCA_HashContext; +class TQCA_CipherContext; +class TQCA_CertContext; -namespace QCA +namespace TQCA { enum { CAP_SHA1 = 0x0001, @@ -86,15 +86,15 @@ namespace QCA Decrypt = 0x0002 }; - QCA_EXPORT void init(); - QCA_EXPORT bool isSupported(int capabilities); - QCA_EXPORT void insertProvider(QCAProvider *); - QCA_EXPORT void unloadAllPlugins(); + TQCA_EXPORT void init(); + TQCA_EXPORT bool isSupported(int capabilities); + TQCA_EXPORT void insertProvider(TQCAProvider *); + TQCA_EXPORT void unloadAllPlugins(); - QCA_EXPORT TQString arrayToHex(const TQByteArray &); - QCA_EXPORT TQByteArray hexToArray(const TQString &); + TQCA_EXPORT TQString arrayToHex(const TQByteArray &); + TQCA_EXPORT TQByteArray hexToArray(const TQString &); - class QCA_EXPORT Hash + class TQCA_EXPORT Hash { public: Hash(const Hash &); @@ -106,7 +106,7 @@ namespace QCA TQByteArray final(); protected: - Hash(QCA_HashContext *); + Hash(TQCA_HashContext *); private: class Private; @@ -114,7 +114,7 @@ namespace QCA }; template <class T> - class QCA_EXPORT HashStatic + class TQCA_EXPORT HashStatic { public: HashStatic<T>() {} @@ -144,7 +144,7 @@ namespace QCA } }; - class QCA_EXPORT Cipher + class TQCA_EXPORT Cipher { public: Cipher(const Cipher &); @@ -158,7 +158,7 @@ namespace QCA TQByteArray final(bool *ok=0); protected: - Cipher(QCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad); + Cipher(TQCA_CipherContext *, int dir, int mode, const TQByteArray &key, const TQByteArray &iv, bool pad); private: class Private; @@ -166,7 +166,7 @@ namespace QCA }; template <class T> - class QCA_EXPORT CipherStatic + class TQCA_EXPORT CipherStatic { public: CipherStatic<T>() {} @@ -184,50 +184,50 @@ namespace QCA } }; - class QCA_EXPORT SHA1 : public Hash, public HashStatic<SHA1> + class TQCA_EXPORT SHA1 : public Hash, public HashStatic<SHA1> { public: SHA1(); }; - class QCA_EXPORT SHA256 : public Hash, public HashStatic<SHA256> + class TQCA_EXPORT SHA256 : public Hash, public HashStatic<SHA256> { public: SHA256(); }; - class QCA_EXPORT MD5 : public Hash, public HashStatic<MD5> + class TQCA_EXPORT MD5 : public Hash, public HashStatic<MD5> { public: MD5(); }; - class QCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish> + class TQCA_EXPORT BlowFish : public Cipher, public CipherStatic<BlowFish> { public: BlowFish(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; - class QCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES> + class TQCA_EXPORT TripleDES : public Cipher, public CipherStatic<TripleDES> { public: TripleDES(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; - class QCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128> + class TQCA_EXPORT AES128 : public Cipher, public CipherStatic<AES128> { public: AES128(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; - class QCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256> + class TQCA_EXPORT AES256 : public Cipher, public CipherStatic<AES256> { public: AES256(int dir=Encrypt, int mode=CBC, const TQByteArray &key=TQByteArray(), const TQByteArray &iv=TQByteArray(), bool pad=true); }; class RSA; - class QCA_EXPORT RSAKey + class TQCA_EXPORT RSAKey { public: RSAKey(); @@ -259,7 +259,7 @@ namespace QCA bool generate(unsigned int bits); }; - class QCA_EXPORT RSA + class TQCA_EXPORT RSA { public: RSA(); @@ -278,7 +278,7 @@ namespace QCA }; typedef TQMap<TQString, TQString> CertProperties; - class QCA_EXPORT Cert + class TQCA_EXPORT Cert { public: Cert(); @@ -308,10 +308,10 @@ namespace QCA Private *d; friend class TLS; - void fromContext(QCA_CertContext *); + void fromContext(TQCA_CertContext *); }; - class QCA_EXPORT TLS : public TQObject + class TQCA_EXPORT TLS : public TQObject { Q_OBJECT @@ -373,7 +373,7 @@ namespace QCA Private *d; }; - class QCA_EXPORT SASL : public TQObject + class TQCA_EXPORT SASL : public TQObject { Q_OBJECT diff --git a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h index 9f4fa1fb..a88b12aa 100644 --- a/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h +++ b/kopete/protocols/jabber/libiris/qca/src/qcaprovider.h @@ -1,5 +1,5 @@ /* - * qcaprovider.h - QCA Plugin API + * qcaprovider.h - TQCA Plugin API * Copyright (C) 2003 Justin Karneges * * This library is free software; you can redistribute it and/or @@ -18,8 +18,8 @@ * */ -#ifndef QCAPROVIDER_H -#define QCAPROVIDER_H +#ifndef TQCAPROVIDER_H +#define TQCAPROVIDER_H #include<tqglobal.h> #include<tqstring.h> @@ -28,13 +28,13 @@ #include<tqhostaddress.h> #include"qca.h" -#define QCA_PLUGIN_VERSION 1 +#define TQCA_PLUGIN_VERSION 1 -class QCAProvider +class TQCAProvider { public: - QCAProvider() {} - virtual ~QCAProvider() {} + TQCAProvider() {} + virtual ~TQCAProvider() {} virtual void init()=0; virtual int qcaVersion() const=0; @@ -42,23 +42,23 @@ public: virtual void *context(int cap)=0; }; -class QCA_HashContext +class TQCA_HashContext { public: - virtual ~QCA_HashContext() {} + virtual ~TQCA_HashContext() {} - virtual QCA_HashContext *clone()=0; + virtual TQCA_HashContext *clone()=0; virtual void reset()=0; virtual void update(const char *in, unsigned int len)=0; virtual void final(TQByteArray *out)=0; }; -class QCA_CipherContext +class TQCA_CipherContext { public: - virtual ~QCA_CipherContext() {} + virtual ~TQCA_CipherContext() {} - virtual QCA_CipherContext *clone()=0; + virtual TQCA_CipherContext *clone()=0; virtual int keySize()=0; virtual int blockSize()=0; virtual bool generateKey(char *out, int keysize=-1)=0; @@ -69,12 +69,12 @@ public: virtual bool final(TQByteArray *out)=0; }; -class QCA_RSAKeyContext +class TQCA_RSAKeyContext { public: - virtual ~QCA_RSAKeyContext() {} + virtual ~TQCA_RSAKeyContext() {} - virtual QCA_RSAKeyContext *clone() const=0; + virtual TQCA_RSAKeyContext *clone() const=0; virtual bool isNull() const=0; virtual bool havePublic() const=0; virtual bool havePrivate() const=0; @@ -89,18 +89,18 @@ public: virtual bool decrypt(const TQByteArray &in, TQByteArray *out, bool oaep)=0; }; -struct QCA_CertProperty +struct TQCA_CertProperty { TQString var; TQString val; }; -class QCA_CertContext +class TQCA_CertContext { public: - virtual ~QCA_CertContext() {} + virtual ~TQCA_CertContext() {} - virtual QCA_CertContext *clone() const=0; + virtual TQCA_CertContext *clone() const=0; virtual bool isNull() const=0; virtual bool createFromDER(const char *in, unsigned int len)=0; virtual bool createFromPEM(const char *in, unsigned int len)=0; @@ -110,22 +110,22 @@ public: virtual TQString serialNumber() const=0; virtual TQString subjectString() const=0; virtual TQString issuerString() const=0; - virtual TQValueList<QCA_CertProperty> subject() const=0; - virtual TQValueList<QCA_CertProperty> issuer() const=0; + virtual TQValueList<TQCA_CertProperty> subject() const=0; + virtual TQValueList<TQCA_CertProperty> issuer() const=0; virtual TQDateTime notBefore() const=0; virtual TQDateTime notAfter() const=0; virtual bool matchesAddress(const TQString &realHost) const=0; }; -class QCA_TLSContext +class TQCA_TLSContext { public: enum Result { Success, Error, Continue }; - virtual ~QCA_TLSContext() {} + virtual ~TQCA_TLSContext() {} virtual void reset()=0; - virtual bool startClient(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; - virtual bool startServer(const TQPtrList<QCA_CertContext> &store, const QCA_CertContext &cert, const QCA_RSAKeyContext &key)=0; + virtual bool startClient(const TQPtrList<TQCA_CertContext> &store, const TQCA_CertContext &cert, const TQCA_RSAKeyContext &key)=0; + virtual bool startServer(const TQPtrList<TQCA_CertContext> &store, const TQCA_CertContext &cert, const TQCA_RSAKeyContext &key)=0; virtual int handshake(const TQByteArray &in, TQByteArray *out)=0; virtual int shutdown(const TQByteArray &in, TQByteArray *out)=0; @@ -134,30 +134,30 @@ public: virtual bool eof() const=0; virtual TQByteArray unprocessed()=0; - virtual QCA_CertContext *peerCertificate() const=0; + virtual TQCA_CertContext *peerCertificate() const=0; virtual int validityResult() const=0; }; -struct QCA_SASLHostPort +struct TQCA_SASLHostPort { TQHostAddress addr; TQ_UINT16 port; }; -struct QCA_SASLNeedParams +struct TQCA_SASLNeedParams { bool user, authzid, pass, realm; }; -class QCA_SASLContext +class TQCA_SASLContext { public: enum Result { Success, Error, NeedParams, AuthCheck, Continue }; - virtual ~QCA_SASLContext() {} + virtual ~TQCA_SASLContext() {} // common virtual void reset()=0; - virtual void setCoreProps(const TQString &service, const TQString &host, QCA_SASLHostPort *local, QCA_SASLHostPort *remote)=0; + virtual void setCoreProps(const TQString &service, const TQString &host, TQCA_SASLHostPort *local, TQCA_SASLHostPort *remote)=0; virtual void setSecurityProps(bool noPlain, bool noActive, bool noDict, bool noAnon, bool reqForward, bool reqCreds, bool reqMutual, int ssfMin, int ssfMax, const TQString &_ext_authid, int _ext_ssf)=0; virtual int security() const=0; virtual int errorCond() const=0; @@ -169,7 +169,7 @@ public: virtual int serverFirstStep(const TQString &mech, const TQByteArray *in)=0; // get / set params - virtual QCA_SASLNeedParams clientParamsNeeded() const=0; + virtual TQCA_SASLNeedParams clientParamsNeeded() const=0; virtual void setClientParams(const TQString *user, const TQString *authzid, const TQString *pass, const TQString *realm)=0; virtual TQString username() const=0; virtual TQString authzid() const=0; |