X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fcore%2Fcorenetwork.cpp;h=0fd68b16be6cb185924a812f365ac331a4003780;hb=770e7067c540d2e133464d7d614ca05c6075cdd3;hp=b3cbfc090ab858237d041bb9b3fa5f4aa2e3f444;hpb=4493458caaa821deb69a0cddf13beb98394977bb;p=quassel.git diff --git a/src/core/corenetwork.cpp b/src/core/corenetwork.cpp index b3cbfc09..0fd68b16 100644 --- a/src/core/corenetwork.cpp +++ b/src/core/corenetwork.cpp @@ -23,7 +23,7 @@ #include "core.h" #include "coresession.h" -#include "identity.h" +#include "coreidentity.h" #include "ircserverhandler.h" #include "userinputhandler.h" @@ -133,7 +133,7 @@ void CoreNetwork::connectToIrc(bool reconnecting) { qWarning() << "Server list empty, ignoring connect request!"; return; } - Identity *identity = identityPtr(); + CoreIdentity *identity = identityPtr(); if(!identity) { qWarning() << "Invalid identity configures, ignoring connect request!"; return; @@ -163,10 +163,16 @@ void CoreNetwork::connectToIrc(bool reconnecting) { #ifdef HAVE_SSL socket.setProtocol((QSsl::SslProtocol)server.sslVersion); - if(server.useSsl) + if(server.useSsl) { + CoreIdentity *identity = identityPtr(); + if(identity) { + socket.setLocalCertificate(identity->sslCert()); + socket.setPrivateKey(identity->sslKey()); + } socket.connectToHostEncrypted(server.host, server.port); - else + } else { socket.connectToHost(server.host, server.port); + } #else socket.connectToHost(server.host, server.port); #endif @@ -285,7 +291,7 @@ void CoreNetwork::socketInitialized() { return; #endif - Identity *identity = identityPtr(); + CoreIdentity *identity = identityPtr(); if(!identity) { qCritical() << "Identity invalid!"; disconnectFromIrc();