From 4e325a8574e4823d8b9ef270974d7514ec5d396e Mon Sep 17 00:00:00 2001 From: Jeremy Lainé Date: Thu, 11 Feb 2010 08:04:05 +0000 Subject: add a configuration item to decide whether to ignore SSL errors (issue #42) --- source/QXmppConfiguration.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/QXmppConfiguration.cpp') 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. -- cgit v1.2.3