diff options
author | Remko Tronçon <git@el-tramo.be> | 2012-12-13 13:35:53 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2013-04-06 20:22:02 (GMT) |
commit | 9eff25182d1bea576d1910200909384ce79d90fe (patch) | |
tree | f5dadbce5fa2c37c34fcc6bb32550e6930abce14 /Swiften/Client/ClientSession.cpp | |
parent | e9f2f7675b11ce36b3f66250156b78fae524a351 (diff) | |
download | swift-9eff25182d1bea576d1910200909384ce79d90fe.zip swift-9eff25182d1bea576d1910200909384ce79d90fe.tar.bz2 |
Make IDN implementation abstract.
Change-Id: I4c64f954ddeca7147d729b8be07237baa15c1795
Diffstat (limited to 'Swiften/Client/ClientSession.cpp')
-rw-r--r-- | Swiften/Client/ClientSession.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Swiften/Client/ClientSession.cpp b/Swiften/Client/ClientSession.cpp index 48e38b9..c5a5c23 100644 --- a/Swiften/Client/ClientSession.cpp +++ b/Swiften/Client/ClientSession.cpp @@ -56,10 +56,12 @@ namespace Swift { ClientSession::ClientSession( const JID& jid, - boost::shared_ptr<SessionStream> stream) : + boost::shared_ptr<SessionStream> stream, + IDNConverter* idnConverter) : localJID(jid), state(Initial), stream(stream), + idnConverter(idnConverter), allowPLAINOverNonTLS(false), useStreamCompression(true), useTLS(UseTLSWhenAvailable), @@ -224,7 +226,7 @@ void ClientSession::handleElement(boost::shared_ptr<Element> element) { plus &= !finishMessage.empty(); } s << boost::uuids::random_generator()(); - SCRAMSHA1ClientAuthenticator* scramAuthenticator = new SCRAMSHA1ClientAuthenticator(s.str(), plus); + SCRAMSHA1ClientAuthenticator* scramAuthenticator = new SCRAMSHA1ClientAuthenticator(s.str(), plus, idnConverter); if (plus) { scramAuthenticator->setTLSChannelBindingData(finishMessage); } @@ -378,7 +380,7 @@ void ClientSession::handleTLSEncrypted() { checkTrustOrFinish(certificateChain, verificationError); } else { - ServerIdentityVerifier identityVerifier(localJID); + ServerIdentityVerifier identityVerifier(localJID, idnConverter); if (!certificateChain.empty() && identityVerifier.certificateVerifies(certificateChain[0])) { continueAfterTLSEncrypted(); } |