Browse Source

Add an option to ignore SSL errors

isand
Bohdan Horbeshko 5 months ago
parent
commit
7f8111a39e
2 changed files with 10 additions and 1 deletions
  1. +1
    -0
      config.yaml.sample
  2. +9
    -1
      src/main.cpp

+ 1
- 0
config.yaml.sample View File

@ -1,3 +1,4 @@
xmpp_account:
jid: johndoe@fbi.gov
password: bushhidthefacts
ignore_ssl_errors: false

+ 9
- 1
src/main.cpp View File

@ -21,8 +21,16 @@ int main(int argc, char** argv)
auto config_xmpp = config["xmpp_account"];
auto jid = QString(config_xmpp["jid"].as<std::string>().c_str());
auto password = QString(config_xmpp["password"].as<std::string>().c_str());
auto ignore_ssl_errors = config_xmpp["ignore_ssl_errors"]
? config_xmpp["ignore_ssl_errors"].as<bool>()
: false;
client.connectToServer(jid, password);
QXmppConfiguration qxconf;
qxconf.setJid(jid);
qxconf.setPassword(password);
qxconf.setIgnoreSslErrors(ignore_ssl_errors);
client.connectToServer(qxconf);
app.exec();
}

Loading…
Cancel
Save