Commit 130d4f66 authored by Xiangyu Bu's avatar Xiangyu Bu Committed by Facebook Github Bot

Break long lines in SSLContext.

Summary: Break a few long lines in folly::SSLContext.

Reviewed By: yfeldblum

Differential Revision: D5418517

fbshipit-source-id: fc2ac310d1f931a1f8a4af077aa5cde347b1042d
parent 7113180a
...@@ -230,7 +230,8 @@ void SSLContext::authenticate(bool checkPeerCert, bool checkPeerName, ...@@ -230,7 +230,8 @@ void SSLContext::authenticate(bool checkPeerCert, bool checkPeerName,
const std::string& peerName) { const std::string& peerName) {
int mode; int mode;
if (checkPeerCert) { 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; checkPeerName_ = checkPeerName;
peerFixedName_ = peerName; peerFixedName_ = peerName;
} else { } else {
...@@ -256,7 +257,8 @@ void SSLContext::loadCertificate(const char* path, const char* format) { ...@@ -256,7 +257,8 @@ void SSLContext::loadCertificate(const char* path, const char* format) {
throw std::runtime_error(reason); throw std::runtime_error(reason);
} }
} else { } 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) { ...@@ -296,7 +298,8 @@ void SSLContext::loadPrivateKey(const char* path, const char* format) {
throw std::runtime_error("SSL_CTX_use_PrivateKey_file: " + getErrors()); throw std::runtime_error("SSL_CTX_use_PrivateKey_file: " + getErrors());
} }
} else { } 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() { ...@@ -353,7 +356,8 @@ void SSLContext::randomize() {
RAND_poll(); RAND_poll();
} }
void SSLContext::passwordCollector(std::shared_ptr<PasswordCollector> collector) { void SSLContext::passwordCollector(
std::shared_ptr<PasswordCollector> collector) {
if (collector == nullptr) { if (collector == nullptr) {
LOG(ERROR) << "passwordCollector: ignore invalid password collector"; LOG(ERROR) << "passwordCollector: ignore invalid password collector";
return; return;
......
...@@ -602,7 +602,8 @@ class SSLContext { ...@@ -602,7 +602,8 @@ class SSLContext {
typedef std::shared_ptr<SSLContext> SSLContextPtr; typedef std::shared_ptr<SSLContext> SSLContextPtr;
std::ostream& operator<<(std::ostream& os, const folly::PasswordCollector& collector); std::ostream& operator<<(
std::ostream& os,
const folly::PasswordCollector& collector);
} // folly } // folly
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment