Commit 8aeaf2b8 authored by Yiming Jing's avatar Yiming Jing

fix misplaced parentheses

parent e291cf62
...@@ -67,11 +67,10 @@ static int ParseSSLProtocols(const std::string& str_protocol) { ...@@ -67,11 +67,10 @@ static int ParseSSLProtocols(const std::string& str_protocol) {
for (; sp; ++sp) { for (; sp; ++sp) {
butil::StringPiece protocol(sp.field(), sp.length()); butil::StringPiece protocol(sp.field(), sp.length());
protocol.trim_spaces(); protocol.trim_spaces();
if ( strncasecmp(protocol.data(), "SSLv3", protocol.size() == 0) if (strncasecmp(protocol.data(), "SSLv3", protocol.size()) == 0
|| strncasecmp(protocol.data(), "TLSv1", protocol.size() == 0) || strncasecmp(protocol.data(), "TLSv1", protocol.size()) == 0
|| strncasecmp(protocol.data(), "TLSv1.1", protocol.size() == 0)) { || strncasecmp(protocol.data(), "TLSv1.1", protocol.size()) == 0) {
LOG(ERROR) << "Uunsupported SSL/TLS protocol=" << protocol; LOG(WARNING) << "Ignored insecure SSL/TLS protocol=" << protocol;
return -1;
} else if (strncasecmp(protocol.data(), "TLSv1.2", protocol.size()) == 0) { } else if (strncasecmp(protocol.data(), "TLSv1.2", protocol.size()) == 0) {
protocol_flag |= TLSv1_2; protocol_flag |= TLSv1_2;
} else { } else {
......
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