diff options
Diffstat (limited to 'kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp')
-rw-r--r-- | kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp index c825a2ca..b33048d1 100644 --- a/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp +++ b/kopete/protocols/jabber/libiris/iris/xmpp-core/simplesasl.cpp @@ -143,7 +143,7 @@ public: } }; -class SimpleSASLContext : public QCA_SASLContext +class SimpleSASLContext : public TQCA_SASLContext { public: // core props @@ -157,8 +157,8 @@ public: bool capable; int err; - QCA_SASLNeedParams need; - QCA_SASLNeedParams have; + TQCA_SASLNeedParams need; + TQCA_SASLNeedParams have; TQString user, authz, pass, realm; SimpleSASLContext() @@ -201,7 +201,7 @@ public: realm = TQString(); } - void setCoreProps(const TQString &_service, const TQString &_host, QCA_SASLHostPort *, QCA_SASLHostPort *) + void setCoreProps(const TQString &_service, const TQString &_host, TQCA_SASLHostPort *, TQCA_SASLHostPort *) { service = _service; host = _host; @@ -235,7 +235,7 @@ public: } } if(!capable || !haveMech) { - err = QCA::SASL::NoMech; + err = TQCA::SASL::NoMech; return false; } @@ -259,7 +259,7 @@ public: return Error; } - QCA_SASLNeedParams clientParamsNeeded() const + TQCA_SASLNeedParams clientParamsNeeded() const { return need; } @@ -352,7 +352,7 @@ public: TQCString cs(in_buf.data(), in_buf.size()+1); PropList in; if(!in.fromString(cs)) { - err = QCA::SASL::BadProto; + err = TQCA::SASL::BadProto; return Error; } @@ -371,16 +371,16 @@ public: // build 'response' TQCString X = user.utf8() + ':' + realm.utf8() + ':' + pass.utf8(); - TQByteArray Y = QCA::MD5::hash(X); + TQByteArray Y = TQCA::MD5::hash(X); TQCString tmp = TQCString(":") + nonce + ':' + cnonce + ':' + authz.utf8(); TQByteArray A1(Y.size() + tmp.length()); memcpy(A1.data(), Y.data(), Y.size()); memcpy(A1.data() + Y.size(), tmp.data(), tmp.length()); TQCString A2 = "AUTHENTICATE:" + uri; - TQCString HA1 = QCA::MD5::hashToString(A1).latin1(); - TQCString HA2 = QCA::MD5::hashToString(A2).latin1(); + TQCString HA1 = TQCA::MD5::hashToString(A1).latin1(); + TQCString HA2 = TQCA::MD5::hashToString(A2).latin1(); TQCString KD = HA1 + ':' + nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + HA2; - TQCString Z = QCA::MD5::hashToString(KD).latin1(); + TQCString Z = TQCA::MD5::hashToString(KD).latin1(); // build output PropList out; @@ -423,11 +423,11 @@ public: } }; -class QCASimpleSASL : public QCAProvider +class TQCASimpleSASL : public TQCAProvider { public: - QCASimpleSASL() {} - ~QCASimpleSASL() {} + TQCASimpleSASL() {} + ~TQCASimpleSASL() {} void init() { @@ -435,25 +435,25 @@ public: int qcaVersion() const { - return QCA_PLUGIN_VERSION; + return TQCA_PLUGIN_VERSION; } int capabilities() const { - return QCA::CAP_SASL; + return TQCA::CAP_SASL; } void *context(int cap) { - if(cap == QCA::CAP_SASL) + if(cap == TQCA::CAP_SASL) return new SimpleSASLContext; return 0; } }; -QCAProvider *createProviderSimpleSASL() +TQCAProvider *createProviderSimpleSASL() { - return (new QCASimpleSASL); + return (new TQCASimpleSASL); } } |