Provide an adhoc option to let user pass the cert verif for some IRC servers

This commit is contained in:
Florent Le Coz
2015-11-05 02:17:19 +01:00
parent 06db9b366a
commit e8386bd14e
7 changed files with 87 additions and 11 deletions
+11
View File
@@ -962,3 +962,14 @@ void IrcClient::leave_dummy_channel(const std::string& exit_message)
this->dummy_channel.remove_all_users();
this->bridge->send_muc_leave(Iid("%"s + this->hostname), std::string(this->current_nick), exit_message, true);
}
#ifdef BOTAN_FOUND
bool IrcClient::abort_on_invalid_cert() const
{
#ifdef USE_DATABASE
auto options = Database::get_irc_server_options(this->bridge->get_bare_jid(), this->hostname);
return options.verifyCert.value();
#endif
return true;
}
#endif
+3
View File
@@ -52,6 +52,9 @@ public:
* complete messages from it.
*/
void parse_in_buffer(const size_t) override final;
#ifdef BOTAN_FOUND
virtual bool abort_on_invalid_cert() const override final;
#endif
/**
* Return the channel with this name, create it if it does not yet exist
*/