summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Costen <tim.costen@isode.com>2019-10-29 10:25:18 (GMT)
committerKevin Smith <kevin.smith@isode.com>2019-10-29 11:52:59 (GMT)
commit943f4cd11f35573e1af91be578cd058fac34b670 (patch)
tree37c14ab65bf2eb3f965f34f5a3b7207c41d41553 /Swiften/TLS/OpenSSL/OpenSSLContext.cpp
parentbe7632881677da5267eb711c1f2823ac82d43d09 (diff)
downloadswift-943f4cd11f35573e1af91be578cd058fac34b670.zip
swift-943f4cd11f35573e1af91be578cd058fac34b670.tar.bz2
Comment out logging calls
Swift OpenSSLContext and OpenSSLCertificate contain a number of error, warning and info logging calls which have the effect of writing to stderr. This patch comments them out for now - a proper interface with a logging object being passed in etc will be added at a later date. JIRA: SWIFT-426 Bug: Release-notes: Manual: Test-information: Compiles OK. TLSTest runs OK. Change-Id: I2bc09ff32277c2b669317fcf9748358b2934db7c
Diffstat (limited to 'Swiften/TLS/OpenSSL/OpenSSLContext.cpp')
-rw-r--r--Swiften/TLS/OpenSSL/OpenSSLContext.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/Swiften/TLS/OpenSSL/OpenSSLContext.cpp b/Swiften/TLS/OpenSSL/OpenSSLContext.cpp
index b7cf178..7034733 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(warning) << "certVerifyCallback called but context.verifyCertCallback is unset" << std::endl;
+ //SWIFT_LOG(warning) << "certVerifyCallback called but context.verifyCertCallback is unset" << std::endl;
ret = 0;
@@ -252,3 +252,3 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
if (!sslctx) {
- SWIFT_LOG(error) << "verifyCallback: internal error" << std::endl;
+ //SWIFT_LOG(error) << "verifyCallback: internal error" << std::endl;
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(info) << "verifyCallback: no verification required" << std::endl;
+ //SWIFT_LOG(info) << "verifyCallback: no verification required" << std::endl;
// No verification requested
@@ -288,8 +288,8 @@ static int verifyCallback(int preverifyOk, X509_STORE_CTX* ctx)
}
- SWIFT_LOG(error) << "verifyCallback: verification error " <<
- X509_verify_cert_error_string(err) << " depth: " <<
- depth << " issuer: " << ((issuerString.length() > 0) ? issuerString : "<unknown>") << std::endl;
- } else {
- SWIFT_LOG(info) << "verifyCallback: SSL depth: " << depth << " Subject: " <<
- ((subjectString.length() > 0) ? subjectString : "<>") << std::endl;
+// SWIFT_LOG(error) << "verifyCallback: verification error " <<
+// X509_verify_cert_error_string(err) << " depth: " <<
+// depth << " issuer: " << ((issuerString.length() > 0) ? issuerString : "<unknown>") << std::endl;
+// } else {
+// SWIFT_LOG(info) << "verifyCallback: SSL depth: " << depth << " Subject: " <<
+// ((subjectString.length() > 0) ? subjectString : "<>") << std::endl;
}
@@ -307,3 +307,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (SSL_CTX_set_cipher_list(context_.get(), cipherSuites.c_str()) != 1 ) {
- SWIFT_LOG(error) << "Failed to set cipher-suites" << std::endl;
+// SWIFT_LOG(error) << "Failed to set cipher-suites" << std::endl;
return false;
@@ -318,3 +318,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
contextId.length()) != 1) {
- SWIFT_LOG(error) << "Failed to set context-id" << std::endl;
+// SWIFT_LOG(error) << "Failed to set context-id" << std::endl;
return false;
@@ -326,3 +326,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (scto <= 0) {
- SWIFT_LOG(error) << "Invalid value for session-cache-timeout" << std::endl;
+// SWIFT_LOG(error) << "Invalid value for session-cache-timeout" << std::endl;
return false;
@@ -331,3 +331,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (SSL_CTX_get_timeout(context_.get()) != scto) {
- SWIFT_LOG(error) << "Failed to set session-cache-timeout" << std::endl;
+// SWIFT_LOG(error) << "Failed to set session-cache-timeout" << std::endl;
return false;
@@ -373,3 +373,3 @@ bool OpenSSLContext::configure(const TLSOptions &options)
if (depth <= 0) {
- SWIFT_LOG(error) << "Invalid value for verify-depth" << std::endl;
+// SWIFT_LOG(error) << "Invalid value for verify-depth" << std::endl;
return false;
@@ -595,3 +595,3 @@ bool OpenSSLContext::setCertificateChain(const std::vector<std::shared_ptr<Certi
if (certificateChain.size() == 0) {
- SWIFT_LOG(warning) << "Trying to load empty certificate chain." << std::endl;
+// SWIFT_LOG(warning) << "Trying to load empty certificate chain." << std::endl;
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(warning) << "Trying to load empty certificate chain." << std::endl;
+// SWIFT_LOG(warning) << "Trying to load empty certificate chain." << std::endl;
return false;