From: Source Maintenance Date: Sun, 5 Feb 2017 06:12:19 +0000 (+0000) Subject: SourceFormat Enforcement X-Git-Tag: M-staged-PR71~283 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed5f51200b5009b39811579b5df235028442fd46;p=thirdparty%2Fsquid.git SourceFormat Enforcement --- diff --git a/src/security/PeerConnector.cc b/src/security/PeerConnector.cc index 9580891598..bf1169def1 100644 --- a/src/security/PeerConnector.cc +++ b/src/security/PeerConnector.cc @@ -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: diff --git a/src/security/PeerOptions.cc b/src/security/PeerOptions.cc index 304821cf90..070665f012 100644 --- a/src/security/PeerOptions.cc +++ b/src/security/PeerOptions.cc @@ -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 } diff --git a/src/security/Session.cc b/src/security/Session.cc index f9083f6b92..b34bdc2961 100644 --- a/src/security/Session.cc +++ b/src/security/Session.cc @@ -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(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) { diff --git a/src/security/forward.h b/src/security/forward.h index e9866f6e9c..f95f7b3638 100644 --- a/src/security/forward.h +++ b/src/security/forward.h @@ -110,20 +110,20 @@ typedef std::unordered_set 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 diff --git a/src/tests/stub_libsecurity.cc b/src/tests/stub_libsecurity.cc index 0dcff346e7..835c8cdc38 100644 --- a/src/tests/stub_libsecurity.cc +++ b/src/tests/stub_libsecurity.cc @@ -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())