aboutsummaryrefslogtreecommitdiff
path: root/source/QXmppConfiguration.cpp
diff options
context:
space:
mode:
authorJeremy Lainé <jeremy.laine@m4x.org>2010-02-11 08:04:05 +0000
committerJeremy Lainé <jeremy.laine@m4x.org>2010-02-11 08:04:05 +0000
commit4e325a8574e4823d8b9ef270974d7514ec5d396e (patch)
treedc3f8aebbee378c4652f1c0b7449a17f28bd4ffb /source/QXmppConfiguration.cpp
parent1fceaa86f263122c90fd9e7e3a85cb05a0fc505f (diff)
downloadqxmpp-4e325a8574e4823d8b9ef270974d7514ec5d396e.tar.gz
add a configuration item to decide whether to ignore SSL errors (issue #42)
Diffstat (limited to 'source/QXmppConfiguration.cpp')
-rw-r--r--source/QXmppConfiguration.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/source/QXmppConfiguration.cpp b/source/QXmppConfiguration.cpp
index 279cbe65..0ab584cc 100644
--- a/source/QXmppConfiguration.cpp
+++ b/source/QXmppConfiguration.cpp
@@ -32,6 +32,7 @@ QXmppConfiguration::QXmppConfiguration() : m_port(5222),
m_keepAlivePingsInterval(100),
m_autoReconnectionEnabled(true),
m_useSASLAuthentication(true),
+ m_ignoreSslErrors(true),
m_streamSecurityMode(QXmppConfiguration::TLSEnabled),
m_nonSASLAuthMechanism(QXmppConfiguration::NonSASLDigest),
m_SASLAuthMechanism(QXmppConfiguration::SASLDigestMD5)
@@ -133,6 +134,22 @@ void QXmppConfiguration::setAutoReconnectionEnabled(bool value)
m_autoReconnectionEnabled = value;
}
+/// Returns whether SSL errors (such as certificate validation errors)
+/// are to be ignored when connecting to the XMPP server.
+
+bool QXmppConfiguration::getIgnoreSslErrors() const
+{
+ return m_ignoreSslErrors;
+}
+
+/// Specifies whether SSL errors (such as certificate validation errors)
+/// are to be ignored when connecting to an XMPP server.
+
+void QXmppConfiguration::setIgnoreSslErrors(bool value)
+{
+ m_ignoreSslErrors = value;
+}
+
/// Returns the type of authentication system specified by the user.
/// \return true if SASL was specified else false. If the specified
/// system is not available QXmpp will resort to the other one.