From 130d4f661978a9d43a5d16fefed41dd2ea213505 Mon Sep 17 00:00:00 2001 From: Xiangyu Bu Date: Thu, 13 Jul 2017 17:58:22 -0700 Subject: [PATCH] Break long lines in SSLContext. Summary: Break a few long lines in folly::SSLContext. Reviewed By: yfeldblum Differential Revision: D5418517 fbshipit-source-id: fc2ac310d1f931a1f8a4af077aa5cde347b1042d --- folly/io/async/SSLContext.cpp | 12 ++++++++---- folly/io/async/SSLContext.h | 5 +++-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/folly/io/async/SSLContext.cpp b/folly/io/async/SSLContext.cpp index 5ef22353..1ccd7308 100644 --- a/folly/io/async/SSLContext.cpp +++ b/folly/io/async/SSLContext.cpp @@ -230,7 +230,8 @@ void SSLContext::authenticate(bool checkPeerCert, bool checkPeerName, const std::string& peerName) { int mode; if (checkPeerCert) { - mode = SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | SSL_VERIFY_CLIENT_ONCE; + mode = SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT | + SSL_VERIFY_CLIENT_ONCE; checkPeerName_ = checkPeerName; peerFixedName_ = peerName; } else { @@ -256,7 +257,8 @@ void SSLContext::loadCertificate(const char* path, const char* format) { throw std::runtime_error(reason); } } else { - throw std::runtime_error("Unsupported certificate format: " + std::string(format)); + throw std::runtime_error( + "Unsupported certificate format: " + std::string(format)); } } @@ -296,7 +298,8 @@ void SSLContext::loadPrivateKey(const char* path, const char* format) { throw std::runtime_error("SSL_CTX_use_PrivateKey_file: " + getErrors()); } } else { - throw std::runtime_error("Unsupported private key format: " + std::string(format)); + throw std::runtime_error( + "Unsupported private key format: " + std::string(format)); } } @@ -353,7 +356,8 @@ void SSLContext::randomize() { RAND_poll(); } -void SSLContext::passwordCollector(std::shared_ptr collector) { +void SSLContext::passwordCollector( + std::shared_ptr collector) { if (collector == nullptr) { LOG(ERROR) << "passwordCollector: ignore invalid password collector"; return; diff --git a/folly/io/async/SSLContext.h b/folly/io/async/SSLContext.h index 589fdafc..f6aa3794 100644 --- a/folly/io/async/SSLContext.h +++ b/folly/io/async/SSLContext.h @@ -602,7 +602,8 @@ class SSLContext { typedef std::shared_ptr SSLContextPtr; -std::ostream& operator<<(std::ostream& os, const folly::PasswordCollector& collector); - +std::ostream& operator<<( + std::ostream& os, + const folly::PasswordCollector& collector); } // folly -- 2.34.1