Commit e54feb42 authored by Pali Rohár's avatar Pali Rohár

libjingle: Enable SSL verification only for google server

SSL verification is working only for default XMPP server (when --s is not specified).
Default XMPP server is Google's one
parent 0f8e9882
diff --git a/protocols/jabber/googletalk/libjingle/talk/examples/call/call_main.cc b/protocols/jabber/googletalk/libjingle/talk/examples/call/call_main.cc
index 66602c4..04134ca 100644
--- a/protocols/jabber/googletalk/libjingle/talk/examples/call/call_main.cc
+++ b/protocols/jabber/googletalk/libjingle/talk/examples/call/call_main.cc
diff --git a/protocols/jabber/libjingle/talk/examples/call/call_main.cc b/protocols/jabber/libjingle/talk/examples/call/call_main.cc
index 66602c4..b456de0 100644
--- a/protocols/jabber/libjingle/talk/examples/call/call_main.cc
+++ b/protocols/jabber/libjingle/talk/examples/call/call_main.cc
@@ -200,6 +200,10 @@ void Print(const char* chars) {
fflush(stdout);
}
......@@ -13,12 +13,15 @@ index 66602c4..04134ca 100644
int main(int argc, char **argv) {
// This app has three threads. The main thread will run the XMPP client,
// which will print to the screen in its own thread. A second thread
@@ -360,7 +364,7 @@ int main(int argc, char **argv) {
@@ -360,7 +364,10 @@ int main(int argc, char **argv) {
xcs.set_server(talk_base::SocketAddress(host, port));
Print(("Logging in to " + server + " as " + jid.Str() + "\n").c_str());
- talk_base::InitializeSSL();
+ talk_base::InitializeSSL(SSLVerificationCallback);
+ if (server.empty())
+ talk_base::InitializeSSL();
+ else
+ talk_base::InitializeSSL(SSLVerificationCallback);
#ifdef ANDROID
InitAndroidMediaEngineFactory(AndroidMediaEngineFactory);
......@@ -364,7 +364,10 @@ int main(int argc, char **argv) {
xcs.set_server(talk_base::SocketAddress(host, port));
Print(("Logging in to " + server + " as " + jid.Str() + "\n").c_str());
talk_base::InitializeSSL(SSLVerificationCallback);
if (server.empty())
talk_base::InitializeSSL();
else
talk_base::InitializeSSL(SSLVerificationCallback);
#ifdef ANDROID
InitAndroidMediaEngineFactory(AndroidMediaEngineFactory);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment