summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMichal Toman <mtoman@redhat.com>2010-07-13 18:53:39 +0200
committerKarel Klic <kklic@redhat.com>2010-07-13 18:53:39 +0200
commitd56eb7e6f0d3c1f5df52daedbea5654e1c714fd2 (patch)
tree4bd9a19e30f367fa0e0c5a7ef2f43bb64838269e /lib
parent13ea287d7d81d9d9dba957228652e1d8dc36388e (diff)
downloadabrt-d56eb7e6f0d3c1f5df52daedbea5654e1c714fd2.tar.gz
abrt-d56eb7e6f0d3c1f5df52daedbea5654e1c714fd2.tar.xz
abrt-d56eb7e6f0d3c1f5df52daedbea5654e1c714fd2.zip
changing NoSSLVerify to SSLVerify in bugzilla plugin
Diffstat (limited to 'lib')
-rw-r--r--lib/Plugins/Bugzilla.GTKBuilder4
-rw-r--r--lib/Plugins/Bugzilla.conf4
-rw-r--r--lib/Plugins/Bugzilla.cpp22
-rw-r--r--lib/Plugins/Bugzilla.h2
-rw-r--r--lib/Utils/abrt_xmlrpc.cpp6
5 files changed, 19 insertions, 19 deletions
diff --git a/lib/Plugins/Bugzilla.GTKBuilder b/lib/Plugins/Bugzilla.GTKBuilder
index a071bd7b..cabdd06a 100644
--- a/lib/Plugins/Bugzilla.GTKBuilder
+++ b/lib/Plugins/Bugzilla.GTKBuilder
@@ -131,8 +131,8 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="conf_NoSSLVerify">
- <property name="label" translatable="yes">No SSL verify</property>
+ <object class="GtkCheckButton" id="conf_SSLVerify">
+ <property name="label" translatable="yes">SSL verify</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
diff --git a/lib/Plugins/Bugzilla.conf b/lib/Plugins/Bugzilla.conf
index bd83a08e..4eebd994 100644
--- a/lib/Plugins/Bugzilla.conf
+++ b/lib/Plugins/Bugzilla.conf
@@ -2,8 +2,8 @@ Enabled = yes
# Bugzilla URL
BugzillaURL = https://bugzilla.redhat.com/
-# yes means that ssl certificates will not be checked
-NoSSLVerify = no
+# yes means that ssl certificates will be checked
+SSLVerify = yes
# your login has to exist, if you don have any, please create one
Login =
# your password
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp
index 1f2d4412..b0268ee4 100644
--- a/lib/Plugins/Bugzilla.cpp
+++ b/lib/Plugins/Bugzilla.cpp
@@ -98,7 +98,7 @@ namespace {
struct ctx: public abrt_xmlrpc_conn {
xmlrpc_env env;
- ctx(const char* url, bool no_ssl_verify): abrt_xmlrpc_conn(url, no_ssl_verify)
+ ctx(const char* url, bool ssl_verify): abrt_xmlrpc_conn(url, ssl_verify)
{ xmlrpc_env_init(&env); }
~ctx() { xmlrpc_env_clean(&env); }
@@ -624,20 +624,20 @@ static map_plugin_settings_t parse_settings(const map_plugin_settings_t& pSettin
}
plugin_settings["Password"] = it->second;
- it = pSettings.find("NoSSLVerify");
+ it = pSettings.find("SSLVerify");
if (it == end)
{
plugin_settings.clear();
return plugin_settings;
}
- plugin_settings["NoSSLVerify"] = it->second;
+ plugin_settings["SSLVerify"] = it->second;
VERB1 log("User settings ok, using them instead of defaults");
return plugin_settings;
}
CReporterBugzilla::CReporterBugzilla() :
- m_bNoSSLVerify(false),
+ m_bSSLVerify(true),
m_sBugzillaURL("https://bugzilla.redhat.com"),
m_sBugzillaXMLRPC("https://bugzilla.redhat.com"XML_RPC_SUFFIX),
m_bRatingRequired(true)
@@ -655,7 +655,7 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData,
std::string Password;
std::string BugzillaXMLRPC;
std::string BugzillaURL;
- bool NoSSLVerify;
+ bool SSLVerify;
map_plugin_settings_t settings = parse_settings(pSettings);
/* if parse_settings fails it returns an empty map so we need to use defaults */
if (!settings.empty())
@@ -664,7 +664,7 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData,
Password = settings["Password"];
BugzillaXMLRPC = settings["BugzillaXMLRPC"];
BugzillaURL = settings["BugzillaURL"];
- NoSSLVerify = string_to_bool(settings["NoSSLVerify"].c_str());
+ SSLVerify = string_to_bool(settings["SSLVerify"].c_str());
}
else
{
@@ -672,7 +672,7 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData,
Password = m_sPassword;
BugzillaXMLRPC = m_sBugzillaXMLRPC;
BugzillaURL = m_sBugzillaURL;
- NoSSLVerify = m_bNoSSLVerify;
+ SSLVerify = m_bSSLVerify;
}
if ((Login == "") || (Password == ""))
@@ -685,7 +685,7 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData,
const std::string& duphash = get_crash_data_item_content(pCrashData, CD_DUPHASH);
const char *release = get_crash_data_item_content_or_NULL(pCrashData, FILENAME_RELEASE);
- ctx bz_server(BugzillaXMLRPC.c_str(), NoSSLVerify);
+ ctx bz_server(BugzillaXMLRPC.c_str(), SSLVerify);
update_client(_("Logging into bugzilla..."));
bz_server.login(Login.c_str(), Password.c_str());
@@ -953,10 +953,10 @@ void CReporterBugzilla::SetSettings(const map_plugin_settings_t& pSettings)
{
m_sPassword = it->second;
}
- it = pSettings.find("NoSSLVerify");
+ it = pSettings.find("SSLVerify");
if (it != end)
{
- m_bNoSSLVerify = string_to_bool(it->second.c_str());
+ m_bSSLVerify = string_to_bool(it->second.c_str());
}
}
@@ -966,7 +966,7 @@ const map_plugin_settings_t& CReporterBugzilla::GetSettings()
m_pSettings["BugzillaURL"] = m_sBugzillaURL;
m_pSettings["Login"] = m_sLogin;
m_pSettings["Password"] = m_sPassword;
- m_pSettings["NoSSLVerify"] = m_bNoSSLVerify ? "yes" : "no";
+ m_pSettings["SSLVerify"] = m_bSSLVerify ? "yes" : "no";
m_pSettings["RatingRequired"] = m_bRatingRequired ? "yes" : "no";
return m_pSettings;
diff --git a/lib/Plugins/Bugzilla.h b/lib/Plugins/Bugzilla.h
index e2090a2a..a4c9a01e 100644
--- a/lib/Plugins/Bugzilla.h
+++ b/lib/Plugins/Bugzilla.h
@@ -25,7 +25,7 @@
class CReporterBugzilla : public CReporter
{
private:
- bool m_bNoSSLVerify;
+ bool m_bSSLVerify;
std::string m_sBugzillaURL;
std::string m_sBugzillaXMLRPC;
std::string m_sLogin;
diff --git a/lib/Utils/abrt_xmlrpc.cpp b/lib/Utils/abrt_xmlrpc.cpp
index 0157c2d5..ac2654ed 100644
--- a/lib/Utils/abrt_xmlrpc.cpp
+++ b/lib/Utils/abrt_xmlrpc.cpp
@@ -40,7 +40,7 @@ void throw_if_xml_fault_occurred(xmlrpc_env *env)
}
}
-void abrt_xmlrpc_conn::new_xmlrpc_client(const char* url, bool no_ssl_verify)
+void abrt_xmlrpc_conn::new_xmlrpc_client(const char* url, bool ssl_verify)
{
m_pClient = NULL;
m_pServer_info = NULL;
@@ -55,8 +55,8 @@ void abrt_xmlrpc_conn::new_xmlrpc_client(const char* url, bool no_ssl_verify)
struct xmlrpc_curl_xportparms curlParms;
memset(&curlParms, 0, sizeof(curlParms));
/* curlParms.network_interface = NULL; - done by memset */
- curlParms.no_ssl_verifypeer = no_ssl_verify;
- curlParms.no_ssl_verifyhost = no_ssl_verify;
+ curlParms.no_ssl_verifypeer = !ssl_verify;
+ curlParms.no_ssl_verifyhost = !ssl_verify;
#ifdef VERSION
curlParms.user_agent = PACKAGE_NAME"/"VERSION;
#else