diff options
author | Kai Koehne <kai.koehne@theqtcompany.com> | 2014-12-08 13:35:47 +0100 |
---|---|---|
committer | Kai Koehne <kai.koehne@theqtcompany.com> | 2014-12-10 11:07:46 +0100 |
commit | f17d7a124f0fa817a7e1a2dda6f48098432c0dc0 (patch) | |
tree | ac5b4e3713af87a82add0cebc5a6628997435ed2 /src/network/ssl/qsslcontext_openssl.cpp | |
parent | 7d2357b0a8911191451fd89279ba30e5fd6ccb84 (diff) |
Use categorized logging for ssl code
Place all debug output into the 'qt.network.ssl' category.
This allows people to disable certain warnings at runtime.
Task-number: QTBUG-43173
Change-Id: Ide731fae3109f9cd7730cc096ee069a5b99d35f1
Reviewed-by: Richard J. Moore <rich@kde.org>
Diffstat (limited to 'src/network/ssl/qsslcontext_openssl.cpp')
-rw-r--r-- | src/network/ssl/qsslcontext_openssl.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp index c042d98056..92e726bc01 100644 --- a/src/network/ssl/qsslcontext_openssl.cpp +++ b/src/network/ssl/qsslcontext_openssl.cpp @@ -36,6 +36,7 @@ #include <QtNetwork/qsslsocket.h> #include <QtCore/qmutex.h> +#include "private/qssl_p.h" #include "private/qsslcontext_openssl_p.h" #include "private/qsslsocket_p.h" #include "private/qsslsocket_openssl_p.h" @@ -357,7 +358,7 @@ static int next_proto_cb(SSL *, unsigned char **out, unsigned char *outlen, ctx->status = QSslConfiguration::NextProtocolNegotiationUnsupported; break; default: - qWarning("OpenSSL sent unknown NPN status"); + qCWarning(lcSsl, "OpenSSL sent unknown NPN status"); } return SSL_TLSEXT_ERR_OK; @@ -384,7 +385,7 @@ SSL* QSslContext::createSsl() if (session) { // Try to resume the last session we cached if (!q_SSL_set_session(ssl, session)) { - qWarning("could not set SSL session"); + qCWarning(lcSsl, "could not set SSL session"); q_SSL_SESSION_free(session); session = 0; } @@ -396,8 +397,8 @@ SSL* QSslContext::createSsl() m_supportedNPNVersions.clear(); for (int a = 0; a < protocols.count(); ++a) { if (protocols.at(a).size() > 255) { - qWarning() << "TLS NPN extension" << protocols.at(a) - << "is too long and will be truncated to 255 characters."; + qCWarning(lcSsl) << "TLS NPN extension" << protocols.at(a) + << "is too long and will be truncated to 255 characters."; protocols[a] = protocols.at(a).left(255); } m_supportedNPNVersions.append(protocols.at(a).size()).append(protocols.at(a)); @@ -433,7 +434,7 @@ bool QSslContext::cacheSession(SSL* ssl) m_sessionASN1.resize(sessionSize); unsigned char *data = reinterpret_cast<unsigned char *>(m_sessionASN1.data()); if (!q_i2d_SSL_SESSION(session, &data)) - qWarning("could not store persistent version of SSL session"); + qCWarning(lcSsl, "could not store persistent version of SSL session"); m_sessionTicketLifeTimeHint = session->tlsext_tick_lifetime_hint; } } |