]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
run formatter
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 13 May 2016 10:27:54 +0000 (13:27 +0300)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Fri, 13 May 2016 10:27:54 +0000 (13:27 +0300)
src/client_side.cc
src/debug.cc
src/parser/BinaryTokenizer.cc
src/parser/BinaryTokenizer.h
src/security/Handshake.cc
src/security/Handshake.h
src/ssl/bio.cc

index 5a03e00592b345dce4f3b29ccf425c87e9fa29e5..62e426ba9458f359879b14cd65f8e488e2ebd763 100644 (file)
@@ -3137,7 +3137,7 @@ ConnStateData::switchToHttps(HttpRequest *request, Ssl::BumpMode bumpServerMode)
     // Fix timeout to request_start_timeout
     typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> 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.
index cd6b17dd80f1d41e69e566834cc736d0e0893ad4..3d3216a30c7593186ef149caf7f36fb98386ad90 100644 (file)
@@ -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<uint8_t>(c); });
+    [&os](const char &c) { os << std::setw(2) << static_cast<uint8_t>(c); });
     os.flags(savedFlags);
     os.fill(savedFill);
 }
index 57384a587d553b734e82b762d50b00ea53a7eb00..0bf042ab65a53f150468f500a895b0331b736306 100644 (file)
@@ -203,3 +203,4 @@ Parser::BinaryTokenizer::pstring24(const char *description)
         return area(length, ".octets");
     return SBuf();
 }
+
index c94077f3bbafc72f19a19bffe8419dbada245c5d..6309990f7c3a2a1da0f2cd810ee5edfcd14ba158 100644 (file)
@@ -145,3 +145,4 @@ BinaryTokenizerContext::success() {
 } /* namespace Parser */
 
 #endif // SQUID_PARSER_BINARY_TOKENIZER_H
+
index 6fe3fa5a237c3d65dd7f0764b937011746db20ab..09e80183ef371b65f1f955acc802dc483b9fe343 100644 (file)
@@ -17,7 +17,7 @@
 #include <unordered_set>
 
 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
+
index b2a116e343626b18f645c966d95d36acc45d66a7..4bb4c5b23127dda07f921f7f1c667d4cab791f6e 100644 (file)
@@ -126,3 +126,4 @@ private:
 }
 
 #endif // SQUID_SECURITY_HANDSHAKE_H
+
index 529e91fe80ebb1f89f91435a3e8f283a15047a3b..a81ea132656b170849467413607005e757606de0 100644 (file)
@@ -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
+