From: Source Maintenance Date: Sat, 11 Apr 2015 12:12:06 +0000 (+0000) Subject: SourceFormat Enforcement X-Git-Tag: merge-candidate-3-v1~181 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de47229ea5dfb73aef431ca1c5b2e423484a6505;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/ssl/PeerConnector.cc b/src/ssl/PeerConnector.cc index 102cfc171f..cba2ef5667 100644 --- a/src/ssl/PeerConnector.cc +++ b/src/ssl/PeerConnector.cc @@ -582,7 +582,7 @@ Ssl::PeerConnector::handleNegotiateError(const int ret) // server resuming a previous (spliced) SSL session with the client, // then probably we are here because local SSL object does not know // anything about the session being resumed. - // + // if (srvBio->bumpMode() == Ssl::bumpPeek && (resumingSession = srvBio->resumingSession())) { // we currently splice all resumed sessions unconditionally if (const bool spliceResumed = true) { diff --git a/src/ssl/bio.cc b/src/ssl/bio.cc index 98195848f3..788c5db18f 100644 --- a/src/ssl/bio.cc +++ b/src/ssl/bio.cc @@ -505,8 +505,8 @@ Ssl::ServerBio::resumingSession() // is this a session resuming attempt using TLS tickets? if (clientFeatures.hasTlsTicket && - serverFeatures.tlsTicketsExtension && - serverFeatures.hasCcsOrNst) + serverFeatures.tlsTicketsExtension && + serverFeatures.hasCcsOrNst) return true; return false; @@ -796,7 +796,7 @@ Ssl::Bio::sslFeatures::checkForCcsOrNst(const unsigned char *msg, size_t size) const int msgSslVersion = (msg[1] << 8) | msg[2]; debugs(83, 7, "SSL Message Version :" << std::hex << std::setw(8) << std::setfill('0') << msgSslVersion); // Check for Change Cipher Spec message - // RFC5246 section 6.2.1 + // RFC5246 section 6.2.1 if (msgType == 0x14) {// Change Cipher Spec message found debugs(83, 7, "SSL Change Cipher Spec message found"); return true; @@ -840,7 +840,6 @@ Ssl::Bio::sslFeatures::get(const MemBuf &buf, bool record) helloMessage.append(buf.content(), buf.contentSize()); } - const unsigned char *msg = (const unsigned char *)buf.content(); #if defined(DO_SSLV23) if (msg[0] & 0x80) @@ -854,13 +853,13 @@ Ssl::Bio::sslFeatures::get(const MemBuf &buf, bool record) // Check for the Handshake/Message type // The type 2 is a ServerHello, the type 1 is a ClientHello - // RFC5246 section 7.4 + // RFC5246 section 7.4 if (msg[5] == 0x2) { // ServerHello message if (parseV3ServerHello(msg, (size_t)msgSize)) { hasCcsOrNst = checkForCcsOrNst(msg + msgSize, buf.contentSize() - msgSize); return true; } - } else if (msg[5] == 0x1) // ClientHello message, + } else if (msg[5] == 0x1) // ClientHello message, return parseV3Hello(msg, (size_t)msgSize); } @@ -895,9 +894,9 @@ Ssl::Bio::sslFeatures::parseV3ServerHello(const unsigned char *hello, size_t siz const size_t sessIdLen = (size_t)hello[43]; debugs(83, 7, "Session ID Length: " << sessIdLen); - // The size should be enough to hold at least the following - // 5 MsgHelloHeader + 4 (hello header) - // + 2 (SSL Version) + 32 (random) + 1 (sessionId length) + // The size should be enough to hold at least the following + // 5 MsgHelloHeader + 4 (hello header) + // + 2 (SSL Version) + 32 (random) + 1 (sessionId length) // + sessIdLength + 2 (cipher suite) + 1 (compression method) // = 47 + sessIdLength if (47 + sessIdLen > size) { @@ -973,9 +972,9 @@ Ssl::Bio::sslFeatures::parseV3Hello(const unsigned char *hello, size_t size) const size_t sessIDLen = (size_t)hello[43]; debugs(83, 7, "Session ID Length: " << sessIDLen); - // The size should be enough to hold at least the following - // 5 MsgHelloHeader + 4 (hello header) - // + 2 (SSL Version) + 32 (random) + 1 (sessionId length) + // The size should be enough to hold at least the following + // 5 MsgHelloHeader + 4 (hello header) + // + 2 (SSL Version) + 32 (random) + 1 (sessionId length) // + sessIdLength + 2 (cipher suite length) + 1 (compression method length) // = 47 + sessIdLength if (47 + sessIDLen > size) @@ -1043,7 +1042,7 @@ Ssl::Bio::sslFeatures::parseV3Hello(const unsigned char *hello, size_t size) } //The SNI extension has the type 0 (extType == 0) - // RFC6066 sections 3, 10.2 + // RFC6066 sections 3, 10.2 // The two first bytes indicates the length of the SNI data (should be extLen-2) // The next byte is the hostname type, it should be '0' for normal hostname (ext[2] == 0) // The 3rd and 4th bytes are the length of the hostname diff --git a/src/ssl/bio.h b/src/ssl/bio.h index 66a8eb5b6f..470896b9ec 100644 --- a/src/ssl/bio.h +++ b/src/ssl/bio.h @@ -75,7 +75,7 @@ public: bool hasTlsTicket; ///< whether a TLS ticket is included bool tlsStatusRequest; ///< whether the TLS status request extension is set SBuf tlsAppLayerProtoNeg; ///< The value of the TLS application layer protocol extension if it is enabled - /// whether Change Cipher Spec message included in ServerHello + /// whether Change Cipher Spec message included in ServerHello /// handshake message bool hasCcsOrNst; /// The client random number