summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdwin Mons <edwin.mons@isode.com>2019-11-19 13:36:05 (GMT)
committerEdwin Mons <edwin.mons@isode.com>2019-11-19 13:58:45 (GMT)
commit261ba8d8595ed8cb90f9c4feb1d6ef642942bcba (patch)
treec7e60d473509db8c4dbff5aa83fbde963d8dd75e /Swiften/TLS/OpenSSL/OpenSSLContext.cpp
parent697ae6ae84512a744958b24118197ec7bfdbc1f0 (diff)
downloadswift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.zip
swift-261ba8d8595ed8cb90f9c4feb1d6ef642942bcba.tar.bz2
Remove std::endl from SWIFT_LOG calls
The std::endl is now added by ~Log, but only for output to stderr or a log file. Calls to the Android logging system or manually set callbacks will not include the newline in the logging output. JIRA: SWIFT-430 Test-Information: Unit tests pass on Debian 9 Checked that running Swift with logging to stderr still had a newline. Change-Id: I096fdba78a3b8f87db2097951c28c528592183e8
Diffstat (limited to 'Swiften/TLS/OpenSSL/OpenSSLContext.cpp')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index a183a75..86b0504 100644
--- a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
+++ b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
@@ -209,3 +209,3 @@ static int certVerifyCallback(X509_STORE_CTX* store_ctx, void* arg)
} else {
- SWIFT_LOG(debug) << "certVerifyCallback called but context.verifyCertCallback is unset" << std::endl;
+ SWIFT_LOG(debug) << "certVerifyCallback called but context.verifyCertCallback is unset";
ret = 0;
@@ -252,3 +252,3 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
if (!sslctx) {
- SWIFT_LOG(debug) << "verifyCallback: internal error" << std::endl;
+ SWIFT_LOG(debug) << "verifyCallback: internal error";
return preverifyOk;
@@ -257,3 +257,3 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
if (SSL_CTX_get_verify_mode(sslctx) == SSL_VERIFY_NONE) {
- SWIFT_LOG(debug) << "verifyCallback: no verification required" << std::endl;
+ SWIFT_LOG(debug) << "verifyCallback: no verification required";
// No verification requested
@@ -290,6 +290,6 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
X509_verify_cert_error_string(err) << " depth: " <<
- depth << " issuer: " << ((issuerString.length() > 0) ? issuerString : "<unknown>") << std::endl;
+ depth << " issuer: " << ((issuerString.length() > 0) ? issuerString : "<unknown>");
} else {
SWIFT_LOG(debug) << "verifyCallback: SSL depth: " << depth << " Subject: " <<
- ((subjectString.length() > 0) ? subjectString : "<>") << std::endl;
+ ((subjectString.length() > 0) ? subjectString : "<>");
}
@@ -307,3 +307,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (SSL_CTX_set_cipher_list(context_.get(), cipherSuites.c_str()) != 1 ) {
- SWIFT_LOG(debug) << "Failed to set cipher-suites" << std::endl;
+ SWIFT_LOG(debug) << "Failed to set cipher-suites";
return false;
@@ -318,3 +318,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
contextId.length()) != 1) {
- SWIFT_LOG(debug) << "Failed to set context-id" << std::endl;
+ SWIFT_LOG(debug) << "Failed to set context-id";
return false;
@@ -326,3 +326,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (scto <= 0) {
- SWIFT_LOG(debug) << "Invalid value for session-cache-timeout" << std::endl;
+ SWIFT_LOG(debug) << "Invalid value for session-cache-timeout";
return false;
@@ -331,3 +331,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (SSL_CTX_get_timeout(context_.get()) != scto) {
- SWIFT_LOG(debug) << "Failed to set session-cache-timeout" << std::endl;
+ SWIFT_LOG(debug) << "Failed to set session-cache-timeout";
return false;
@@ -373,3 +373,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (depth <= 0) {
- SWIFT_LOG(debug) << "Invalid value for verify-depth" << std::endl;
+ SWIFT_LOG(debug) << "Invalid value for verify-depth";
return false;
@@ -595,3 +595,3 @@ bool OpenSSLContext::setCertificateChain(const std::vector<std::shared_ptr<Certi
if (certificateChain.size() == 0) {
- SWIFT_LOG(debug) << "Trying to load empty certificate chain." << std::endl;
+ SWIFT_LOG(debug) << "Trying to load empty certificate chain.";
return false;
@@ -618,3 +618,3 @@ bool OpenSSLContext::setCertificateChain(const std::vector<std::shared_ptr<Certi
if (SSL_CTX_add_extra_chain_cert(context_.get(), openSSLCert->getInternalX509().get()) != 1) {
- SWIFT_LOG(debug) << "Trying to load empty certificate chain." << std::endl;
+ SWIFT_LOG(debug) << "Trying to load empty certificate chain.";
return false;