]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
SourceFormat Enforcement
authorSource Maintenance <squidadm@squid-cache.org>
Sun, 5 Feb 2017 06:12:19 +0000 (06:12 +0000)
committerSource Maintenance <squidadm@squid-cache.org>
Sun, 5 Feb 2017 06:12:19 +0000 (06:12 +0000)
src/security/PeerConnector.cc
src/security/PeerOptions.cc
src/security/Session.cc
src/security/forward.h
src/tests/stub_libsecurity.cc

index 9580891598a38085a4f01cc0df5880704c2c531d..bf1169def1a097806d7635f9d882eef06de62555 100644 (file)
@@ -415,10 +415,10 @@ Security::PeerConnector::handleNegotiateError(const int ret)
 
     switch (ret) {
     case GNUTLS_E_WARNING_ALERT_RECEIVED: {
-            auto alert = gnutls_alert_get(session.get());
-            debugs(83, DBG_IMPORTANT, "TLS ALERT: " << gnutls_alert_get_name(alert));
-        }
-        // drop through to next case
+        auto alert = gnutls_alert_get(session.get());
+        debugs(83, DBG_IMPORTANT, "TLS ALERT: " << gnutls_alert_get_name(alert));
+    }
+    // drop through to next case
 
     case GNUTLS_E_AGAIN:
     case GNUTLS_E_INTERRUPTED:
index 304821cf903c2a4b161758f944228b6e459c3ea2..070665f012404ebcaf271977a044d16791630789 100644 (file)
@@ -23,8 +23,8 @@ Security::PeerOptions Security::ProxyOutgoingConfig;
 
 Security::PeerOptions::PeerOptions()
 {
-     // init options consistent with an empty sslOptions
-     parseOptions();
+    // init options consistent with an empty sslOptions
+    parseOptions();
 }
 
 void
@@ -191,7 +191,7 @@ Security::PeerOptions::updateTlsVersionLimits()
         return;
     }
 
-     if (sslVersion > 2) {
+    if (sslVersion > 2) {
         // backward compatibility hack for sslversion= configuration
         // only use if tls-min-version=N.N is not present
         // values 0-2 for auto and SSLv2 are not supported any longer.
@@ -514,7 +514,7 @@ Security::PeerOptions::parseOptions()
         fatalf("Unknown TLS option '%s'", err);
     }
     parsedOptions = Security::ParsedOptions(op, [](gnutls_priority_t p) {
-            gnutls_priority_deinit(p);
+        gnutls_priority_deinit(p);
     });
 #endif
 }
index f9083f6b92eb1b6f288eaddfc86091a8e6387484..b34bdc2961adb8fc03863454761e0f5ee3424734 100644 (file)
@@ -92,9 +92,9 @@ Security::SessionPointer
 Security::NewSessionObject(const Security::ContextPointer &ctx)
 {
     Security::SessionPointer session(SSL_new(ctx.get()), [](SSL *p) {
-            debugs(83, 5, "SSL_free session=" << (void*)p);
-            SSL_free(p);
-        });
+        debugs(83, 5, "SSL_free session=" << (void*)p);
+        SSL_free(p);
+    });
     debugs(83, 5, "SSL_new session=" << (void*)session.get());
     return session;
 }
@@ -122,8 +122,8 @@ CreateSession(const Security::ContextPointer &ctx, const Comm::ConnectionPointer
     gnutls_session_t tmp;
     errCode = gnutls_init(&tmp, static_cast<unsigned int>(type) | GNUTLS_NONBLOCK);
     Security::SessionPointer session(tmp, [](gnutls_session_t p) {
-            debugs(83, 5, "gnutls_deinit session=" << (void*)p);
-            gnutls_deinit(p);
+        debugs(83, 5, "gnutls_deinit session=" << (void*)p);
+        gnutls_deinit(p);
     });
     debugs(83, 5, "gnutls_init " << (type == Security::Io::BIO_TO_SERVER ? "client" : "server" )<< " session=" << (void*)session.get());
     if (errCode != GNUTLS_E_SUCCESS) {
index e9866f6e9c2056bd52ae1cd9b7b6b86250234efe..f95f7b3638e8c5f74409ec5fb86b36c09a679f5b 100644 (file)
@@ -110,20 +110,20 @@ typedef std::unordered_set<Security::ErrorCode> Errors;
 
 namespace Io
 {
-    enum Type {
+enum Type {
 #if USE_OPENSSL
-        BIO_TO_CLIENT = 6000,
-        BIO_TO_SERVER
+    BIO_TO_CLIENT = 6000,
+    BIO_TO_SERVER
 #elif USE_GNUTLS
-        // NP: this is odd looking but correct.
-        // 'to-client' means we are a server, and vice versa.
-        BIO_TO_CLIENT = GNUTLS_SERVER,
-        BIO_TO_SERVER = GNUTLS_CLIENT
+    // NP: this is odd looking but correct.
+    // 'to-client' means we are a server, and vice versa.
+    BIO_TO_CLIENT = GNUTLS_SERVER,
+    BIO_TO_SERVER = GNUTLS_CLIENT
 #else
-        BIO_TO_CLIENT = 6000,
-        BIO_TO_SERVER
+    BIO_TO_CLIENT = 6000,
+    BIO_TO_SERVER
 #endif
-    };
+};
 
 } // namespace Io
 
index 0dcff346e7c2be621fb3983c199532dcc50a8b99..835c8cdc38e24045e330abcc787a361804c7a08f 100644 (file)
@@ -72,7 +72,7 @@ Security::PeerOptions::PeerOptions() {
 #if USE_OPENSSL
     parsedOptions = 0;
 #endif
-     STUB_NOP
+    STUB_NOP
 }
 void Security::PeerOptions::parse(char const*) STUB
 Security::ContextPointer Security::PeerOptions::createClientContext(bool) STUB_RETVAL(Security::ContextPointer())