From: Christos Tsantilas Date: Fri, 13 May 2016 10:27:54 +0000 (+0300) Subject: run formatter X-Git-Tag: SQUID_4_0_11~29^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fde0b2caccf18b0fca5722982d7032b10c8dd700;p=thirdparty%2Fsquid.git run formatter --- diff --git a/src/client_side.cc b/src/client_side.cc index 5a03e00592..62e426ba94 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -3137,7 +3137,7 @@ ConnStateData::switchToHttps(HttpRequest *request, Ssl::BumpMode bumpServerMode) // Fix timeout to request_start_timeout typedef CommCbMemFunT TimeoutDialer; AsyncCall::Pointer timeoutCall = JobCallback(33, 5, - TimeoutDialer, this, ConnStateData::requestTimeout); + TimeoutDialer, this, ConnStateData::requestTimeout); commSetConnTimeout(clientConnection, Config.Timeout.request_start_timeout, timeoutCall); // Also reset receivedFirstByte_ flag to allow this timeout work in the case we have // a bumbed "connect" request on non transparent port. @@ -3208,7 +3208,6 @@ ConnStateData::spliceOnError(const err_type err) return false; } - void ConnStateData::startPeekAndSplice(const bool unsupportedProtocol) { if (unsupportedProtocol) { @@ -3329,7 +3328,7 @@ ConnStateData::startPeekAndSpliceDone() bio->setReadBufData(inBuf); bio->hold(true); - // Here squid should have all of the client hello message so the + // Here squid should have all of the client hello message so the // Squid_SSL_accept should return 0; // This block exist only to force openSSL parse client hello and detect // ERR_SECURE_ACCEPT_FAIL error, which should be checked and splice if required. diff --git a/src/debug.cc b/src/debug.cc index cd6b17dd80..3d3216a30c 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -810,7 +810,7 @@ Raw::printHex(std::ostream &os) const const auto savedFlags = os.flags(); // std::ios_base::fmtflags os << std::hex; std::for_each(data_, data_ + size_, - [&os](const char &c) { os << std::setw(2) << static_cast(c); }); + [&os](const char &c) { os << std::setw(2) << static_cast(c); }); os.flags(savedFlags); os.fill(savedFill); } diff --git a/src/parser/BinaryTokenizer.cc b/src/parser/BinaryTokenizer.cc index 57384a587d..0bf042ab65 100644 --- a/src/parser/BinaryTokenizer.cc +++ b/src/parser/BinaryTokenizer.cc @@ -203,3 +203,4 @@ Parser::BinaryTokenizer::pstring24(const char *description) return area(length, ".octets"); return SBuf(); } + diff --git a/src/parser/BinaryTokenizer.h b/src/parser/BinaryTokenizer.h index c94077f3bb..6309990f7c 100644 --- a/src/parser/BinaryTokenizer.h +++ b/src/parser/BinaryTokenizer.h @@ -145,3 +145,4 @@ BinaryTokenizerContext::success() { } /* namespace Parser */ #endif // SQUID_PARSER_BINARY_TOKENIZER_H + diff --git a/src/security/Handshake.cc b/src/security/Handshake.cc index 6fe3fa5a23..09e80183ef 100644 --- a/src/security/Handshake.cc +++ b/src/security/Handshake.cc @@ -17,7 +17,7 @@ #include namespace Security { -/* +/* * The types below represent various SSL and TLS protocol elements. Most names * are based on RFC 5264 and RFC 6066 terminology. Objects of these explicit * types are stored or passed around. Other protocol elements are simply parsed @@ -285,7 +285,7 @@ Security::HandshakeParser::parseChangeCipherCpecMessage() Must(currentContentType == ContentType::ctChangeCipherSpec); // We are currently ignoring Change Cipher Spec Protocol messages. skipMessage("ChangeCipherCpec msg"); - + // Everything after the ChangeCipherCpec message may be encrypted. // Continuing parsing is pointless. Stop here. ressumingSession = true; @@ -313,28 +313,28 @@ Security::HandshakeParser::parseHandshakeMessage() const Handshake message(tkMessages); switch (message.msg_type) { - case HandshakeType::hskClientHello: - Must(state < atHelloReceived); - Security::HandshakeParser::parseClientHelloHandshakeMessage(message.msg_body); - state = atHelloReceived; - done = "ClientHello"; - return; - case HandshakeType::hskServerHello: - Must(state < atHelloReceived); - parseServerHelloHandshakeMessage(message.msg_body); - state = atHelloReceived; - return; - case HandshakeType::hskCertificate: - Must(state < atCertificatesReceived); - parseServerCertificates(message.msg_body); - state = atCertificatesReceived; - return; - case HandshakeType::hskServerHelloDone: - Must(state < atHelloDoneReceived); - // zero-length - state = atHelloDoneReceived; - done = "ServerHelloDone"; - return; + case HandshakeType::hskClientHello: + Must(state < atHelloReceived); + Security::HandshakeParser::parseClientHelloHandshakeMessage(message.msg_body); + state = atHelloReceived; + done = "ClientHello"; + return; + case HandshakeType::hskServerHello: + Must(state < atHelloReceived); + parseServerHelloHandshakeMessage(message.msg_body); + state = atHelloReceived; + return; + case HandshakeType::hskCertificate: + Must(state < atCertificatesReceived); + parseServerCertificates(message.msg_body); + state = atCertificatesReceived; + return; + case HandshakeType::hskServerHelloDone: + Must(state < atHelloDoneReceived); + // zero-length + state = atHelloDoneReceived; + done = "ServerHelloDone"; + return; } debugs(83, 5, "ignoring " << message.msg_body.length() << "-byte type-" << message.msg_type << " handshake message"); @@ -447,10 +447,10 @@ Security::HandshakeParser::parseV23Ciphers(const SBuf &raw) Parser::BinaryTokenizer tk(raw); while (!tk.atEnd()) { // RFC 6101 Appendix E, RFC 5246 Appendix E2 - // Unlike TLS, ciphers in SSLv23 Hellos are 3 bytes long and come in + // Unlike TLS, ciphers in SSLv23 Hellos are 3 bytes long and come in // two versions: v2 and v3. The two versions may co-exist in a single // SSLv23 Hello. Only v3 ciphers have a first byte value of zero. - // The ciphers are needed for our peeking/staring code that + // The ciphers are needed for our peeking/staring code that // does not support SSLv2, so we ignore v2 ciphers. const uint8_t prefix = tk.uint8("prefix"); const uint16_t cipher = tk.uint16("cipher"); @@ -670,3 +670,4 @@ Security::SupportedExtensions() return Extensions(); // no extensions are supported without OpenSSL } #endif + diff --git a/src/security/Handshake.h b/src/security/Handshake.h index b2a116e343..4bb4c5b231 100644 --- a/src/security/Handshake.h +++ b/src/security/Handshake.h @@ -126,3 +126,4 @@ private: } #endif // SQUID_SECURITY_HANDSHAKE_H + diff --git a/src/ssl/bio.cc b/src/ssl/bio.cc index 529e91fe80..a81ea13265 100644 --- a/src/ssl/bio.cc +++ b/src/ssl/bio.cc @@ -251,7 +251,7 @@ Ssl::ServerBio::readAndGive(char *buf, const int size, BIO *table) return result; return giveBuffered(buf, size); } - + return Ssl::Bio::read(buf, size, table); } @@ -500,7 +500,6 @@ Ssl::ServerBio::resumingSession() return parser_.ressumingSession; } - /// initializes BIO table after allocation static int squid_bio_create(BIO *bi) @@ -620,7 +619,6 @@ squid_ssl_info(const SSL *ssl, int where, int ret) } } - void applyTlsDetailsToSSL(SSL *ssl, Security::TlsDetails::Pointer const &details, Ssl::BumpMode bumpMode) { @@ -683,3 +681,4 @@ applyTlsDetailsToSSL(SSL *ssl, Security::TlsDetails::Pointer const &details, Ssl } #endif // USE_OPENSSL +