]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
10 years agoSourceFormat Enforcement
squidadm@squid-cache.org [Wed, 8 Oct 2014 15:31:21 +0000 (15:31 +0000)] 
SourceFormat Enforcement

10 years agoValidate server certificates without bumping: fix 'make distcheck' error
Christos Tsantilas [Wed, 8 Oct 2014 08:10:49 +0000 (11:10 +0300)] 
Validate server certificates without bumping: fix 'make distcheck' error

10 years agoValidate server certificates without bumping: fix compile error
Christos Tsantilas [Tue, 7 Oct 2014 17:26:33 +0000 (20:26 +0300)] 
Validate server certificates without bumping: fix compile error

Fix error: return-statement with a value, in function returning 'void'

10 years agosslproxy_cert_sign_hash configuration option
Christos Tsantilas [Tue, 7 Oct 2014 14:11:12 +0000 (17:11 +0300)] 
sslproxy_cert_sign_hash configuration option

Browser vendors will get rid of SSL certificates that use SHA-1 to generate
the hash that is then signed by the CA. For example, Google Chrome will start
to show an "insecure" sign for certificates that are valid after 1.1.2016 and
will generate a warning page for certificates that are valid after 1.1.2017 [1],
[2],[4]. Microsoft will block certificates with SHA-1 after 1.1.2017 [3].

This patch:
  1) Add a new configuration option to select the signing hash for
     generated certificates: sslproxy_cert_sign_hash.

  2) If sslproxy_cert_sign_hash is not set, then use the sha256 hash.

[1] https://groups.google.com/a/chromium.org/forum/#!msg/blink-dev/2-R4XziFc7A/YO0ZSrX_X4wJ
[2] https://code.google.com/p/chromium/issues/detail?id=401365
[3] http://blogs.technet.com/b/pki/archive/2013/11/12/sha1-deprecation-policy.aspx
[4] http://googleonlinesecurity.blogspot.ch/2014/09/gradually-sunsetting-sha-1.html

This is a Measurement Factory project

10 years agoCleanup CBDATA debugging messages
Amos Jeffries [Mon, 6 Oct 2014 19:38:03 +0000 (12:38 -0700)] 
Cleanup CBDATA debugging messages

* Remove duplicate labels from debug messages. function names are now
  automatically added.

* Add debug messages to display method used for freeing CBDATA.
  Whether the object was deleted, or placement destructor called.

10 years agoValidate server certificates without bumping
Christos Tsantilas [Mon, 6 Oct 2014 14:53:40 +0000 (17:53 +0300)] 
Validate server certificates without bumping

This patch add support for the "Validate server certificates without bumping"
use case described on the Peek and Splice wiki page:
    http://wiki.squid-cache.org/Features/SslPeekAndSplice

This patch send to the certificate validation helper the  certificates and
errors found in SslBump3 step, even if the splicing mode selected.
In the case the validation helper found errors in certificates an error
page returned to the http client.

The SSL error forwarding is controlled by ACLs along these lines:

   sslproxy_cert_error allow sslBoringErrors
   sslproxy_cert_error allow serversWithInvalidCerts
   sslproxy_cert_error deny all

This is a Measurement Factory project

10 years agoCleanup: restoreCapabilities() takes a bool parameter
Amos Jeffries [Sun, 5 Oct 2014 15:26:50 +0000 (08:26 -0700)] 
Cleanup: restoreCapabilities() takes a bool parameter

10 years agoRemove C++11'ism in rev.13604
Amos Jeffries [Sun, 5 Oct 2014 09:59:47 +0000 (02:59 -0700)] 
Remove C++11'ism in rev.13604

We are not quite going to require C++11 yet. Revert Helper::ChildConfig
default constructor to C++03 syntax.

10 years agoFix library dependency issue in rev.13604
Amos Jeffries [Sat, 4 Oct 2014 09:27:01 +0000 (02:27 -0700)] 
Fix library dependency issue in rev.13604

TODO: build true library dependency map and re-order all LDADD
statements according to the hierarchy found.

10 years agoWindows: remove alternative main()
Amos Jeffries [Fri, 3 Oct 2014 13:34:52 +0000 (06:34 -0700)] 
Windows: remove alternative main()

As a side effect this causes Windows builds to use the wrapper function
for handling exceptions.

10 years agoFix --enable-win32-service compile errors
Amos Jeffries [Fri, 3 Oct 2014 11:45:29 +0000 (04:45 -0700)] 
Fix --enable-win32-service compile errors

10 years agoWindows: add missing file permission definitions
Amos Jeffries [Thu, 2 Oct 2014 17:50:47 +0000 (10:50 -0700)] 
Windows: add missing file permission definitions

* initgroups() shim was building, but header not included correctly.

* POSIX 5.6 / 6.5 Protection Bits for group access do not exist in
  windows MinGW. Define as 0-bits until better API is found.

10 years agoAdd missing boilerplate for rev.13621
Amos Jeffries [Thu, 2 Oct 2014 12:12:52 +0000 (05:12 -0700)] 
Add missing boilerplate for rev.13621

10 years agoPortability: provide xstatvfs() shim for system call statvfs()
Amos Jeffries [Thu, 2 Oct 2014 12:07:26 +0000 (05:07 -0700)] 
Portability: provide xstatvfs() shim for system call statvfs()

statfs() and struct statfs have been deprecated for years. Hoewver the
POSIX statvfs replacements are still not universally available.

Remove deprecated statfs() and struct statfs usage from Squid. Although
they may still be used by the xstatvfs() compatibility wrapper if they
are the only available API.

10 years agoPolish peek-and-splice related code part2
Christos Tsantilas [Wed, 1 Oct 2014 12:46:44 +0000 (15:46 +0300)] 
Polish peek-and-splice related code part2

- Record SSL bump action in Ssl::ServerBump::act at step3

10 years agoPolish peek-and-splice related code
Christos Tsantilas [Wed, 1 Oct 2014 12:31:58 +0000 (15:31 +0300)] 
Polish peek-and-splice related code

 - Record SSL bump action at each bumping step in the Ssl::ServerBump.
   The new Ssl::ServerBump::act member added for this purpose.

 - Split Ssl::PeerConnector::checkForPeekAndSplice  to two methods
   (checkForPeekAndSplice and checkForPeekAndSpliceDone) add some
   documentation, and polish the code.

 - Polish  httpsSslBumpStep2AccessCheckDone function (client_side.cc file)

This is a Measurement Factory project

10 years agoWindows: getppid() is not supported.
Amos Jeffries [Tue, 30 Sep 2014 13:11:58 +0000 (06:11 -0700)] 
Windows: getppid() is not supported.

The PID and thus parent process PID concept is not available in Windows
and MinGW at least lacks the API mechanism.

This may re-open an issue with kid processes notifying the coordinator
when they are shutting down. If so we need to find an alternative
mechanism to replace this use of kill(getppid(), SIGUSR1)

10 years agoPolish: cleanup IDENT header
Amos Jeffries [Mon, 29 Sep 2014 13:41:03 +0000 (06:41 -0700)] 
Polish: cleanup IDENT header

10 years agoCleanup: convert AuthUserIP from CBDATA to MEMPROXY class
Amos Jeffries [Mon, 29 Sep 2014 09:24:20 +0000 (02:24 -0700)] 
Cleanup: convert AuthUserIP from CBDATA to MEMPROXY class

This object was not needing to be passed as callback arguments
but was using CBDATA type to gain memory pooling.

Converting to the correct pooling mechanism removes some more
uses of cbdataFree() and ensures the object and its members
destructors are called properly.

10 years agoCleanup: fix various uninitialized class members
Amos Jeffries [Mon, 29 Sep 2014 07:18:13 +0000 (00:18 -0700)] 
Cleanup: fix various uninitialized class members

Also, simplify some destructors. xfree() is faster than
safe_free() and both are ok in a destructor.

  Detected by Coverity Scan. Issue 740527, 740532, 740533,
    740534, 740563, 1241964

10 years agoCleanup: fix various uninitialized class members
Amos Jeffries [Mon, 29 Sep 2014 05:13:17 +0000 (22:13 -0700)] 
Cleanup: fix various uninitialized class members

Also, simplify some destructors. xfree() is faster than
safe_free() and both are ok in a destructor.

  Detected by Coverity Scan. Issue 971423, 11354441135445,
    123135312313541231355123135612345031241504,
    740531, 740566

10 years agoCleanup: use SBuf::npos instead of npos in SBuf::append()
Amos Jeffries [Sun, 28 Sep 2014 18:49:09 +0000 (11:49 -0700)] 
Cleanup: use SBuf::npos instead of npos in SBuf::append()

Small experiment. It is possible on some systems that std::npos / ::npos
is defined with a different integer size and value.
This may be what is confusing Coverity scan and producing buffer overrun
alerts in the append() c-string with default parameter case.

10 years agoCleanup: convert external_acl_format to ref-counted pooled object
Amos Jeffries [Sun, 28 Sep 2014 18:42:55 +0000 (11:42 -0700)] 
Cleanup: convert external_acl_format to ref-counted pooled object

CBDATA was used as a makeshift way to memory pool and ref-count these
objects. Do it properly now.

10 years agoFix various null dereferences
Amos Jeffries [Sun, 28 Sep 2014 18:35:47 +0000 (11:35 -0700)] 
Fix various null dereferences

Fairly rare occurances hard to hit but still possible. Any one of these
could crash Squid in their particular circumstances.

  Detected by Coverity Scan. Issue 1187972118797312320971241502.

10 years agoFix crash reading malformed config files
Amos Jeffries [Sun, 28 Sep 2014 16:38:44 +0000 (09:38 -0700)] 
Fix crash reading malformed config files

If ConfigParser::QuotedOrToEol() happend to return NULL. Which may happen
if there is no token before end of current file the auth module config
parser would crash.

  Detected by Coverity Scan. Issue 1222662.

10 years agoDo not crash when sending %ssl::cert_subject to external ACL w/o certificate.
Christos Tsantilas [Fri, 26 Sep 2014 10:01:19 +0000 (13:01 +0300)] 
Do not crash when sending %ssl::cert_subject to external ACL w/o certificate.

An ACL check in ConnStateData::postHttpsAccept (e.g., when dealing with an
intercepted SSL connection) uses an HttpRequest object that is not yet linked
with the ConnStateData object. Do not blindly dereference the pointer to the
latter.

This is a Measurement Factory project

10 years agoFixes a squid crash when a foreign protocol client connected to an https_port
Christos Tsantilas [Fri, 26 Sep 2014 09:54:50 +0000 (12:54 +0300)] 
Fixes a squid crash when a foreign protocol client connected to an https_port

The Ssl::Bio::read will fail to recognize SSL protocol and will return "-1"
as readed SSL bytes. The Ssl::ClientBio::read must return error (-1)
in this case.

This is a Measurement Factory project

10 years agoSend selected SSL version and cipher to the certificate validation helper.
Christos Tsantilas [Fri, 26 Sep 2014 09:32:48 +0000 (12:32 +0300)] 
Send selected SSL version and cipher to the certificate validation helper.

This patch sends the selected cipher suite and the selected SSL/TLS version
to the certificate verification helper using the "proto_version=v" and
"cipher=c" key=value pairs.

This is a Measurement Factory project

10 years agoWindows: rename Ip::Address::*AddrInfo() methods
Amos Jeffries [Thu, 25 Sep 2014 13:33:18 +0000 (06:33 -0700)] 
Windows: rename Ip::Address::*AddrInfo() methods

On MinGW at least macro replacement appears to be case insensitive.
The lower-case freeaddrinfo/initaddrinfo system functions are defined
with macros, both in MinGW headers and Squid libcompat.

10 years agoPortability: do not explicitly name enum type in enumeration values
Amos Jeffries [Thu, 25 Sep 2014 10:34:22 +0000 (03:34 -0700)] 
Portability: do not explicitly name enum type in enumeration values

Some compilers (specifically MinGW at least) do not accept the name of
enum type being in the symbol where enumerated values are used.

ie. we must use Helper::Okay instead of Helper::ResultCode::Okay.

10 years agoSourceLayout: shuffle HelperChildConfig into libhelper.la
Amos Jeffries [Thu, 25 Sep 2014 06:50:32 +0000 (23:50 -0700)] 
SourceLayout: shuffle HelperChildConfig into libhelper.la

10 years agoSourceLayout: rename auth module files to match guidelines
Amos Jeffries [Wed, 24 Sep 2014 17:10:37 +0000 (10:10 -0700)] 
SourceLayout: rename auth module files to match guidelines

* Squid-3 coding guidelines require that files are named after the
  class(es) contained within. Rename the files containing auth Config
  classes to match.

* Remove the unused DefaultAuthenticateChildrenMax macros.

* simplify included headers in auth modules.

* alphabetize the order auth modules are detected.

10 years agoSourceLayout: shuffle helper protocol primitives to helper/libhelper.la
Amos Jeffries [Wed, 24 Sep 2014 14:07:55 +0000 (07:07 -0700)] 
SourceLayout: shuffle helper protocol primitives to helper/libhelper.la

* create namespace Helper in helper/libhelper.la and subdirectory

* shuffle HelperReply::Result_ to Helper::ResultCode in helper/ResultCode.h

* shuffle HelperReply to Helper::Reply in helper/Reply.*

* move helper_request to Helper::Request in helper/Request.h

* link to helper/forward.h for predefines

10 years agoCleanup: drop helper::flags.busy
Amos Jeffries [Tue, 23 Sep 2014 06:36:34 +0000 (23:36 -0700)] 
Cleanup: drop helper::flags.busy

The helper::stats.pending value can be used as a direct alternative and
is already maintained by both stateless and stateful helpers.

10 years agoFix missing flag initialization in rev.13570
Amos Jeffries [Tue, 23 Sep 2014 05:32:41 +0000 (22:32 -0700)] 
Fix missing flag initialization in rev.13570

This missing flag can cause traffic rejection on some systems if the
flag memory is left at 1 when initialized.

 Detected by Coverity Scan. Issue CID 1239292.

10 years agoCleanup: remove references to 'server-side'
Amos Jeffries [Mon, 22 Sep 2014 19:06:19 +0000 (12:06 -0700)] 
Cleanup: remove references to 'server-side'

10 years agoCleanup: rename ServerStateData to Client
Amos Jeffries [Mon, 22 Sep 2014 17:39:41 +0000 (10:39 -0700)] 
Cleanup: rename ServerStateData to Client

* rename class

* move Server.* to clients/Client.*

10 years agoCleanup: remove unnecessary class helper_stateful_request
Amos Jeffries [Fri, 19 Sep 2014 17:58:17 +0000 (10:58 -0700)] 
Cleanup: remove unnecessary class helper_stateful_request

* combine class helper_stateful_request into helper_request.

* add constructor for helper_request. replacing duplicated setup logics.

* add destructor for helper_request. replacing helperRequestFree() and
  helperStatefulFree().

10 years agoPortability: add shim for memrchr() and detect direct.h
Amos Jeffries [Fri, 19 Sep 2014 17:52:22 +0000 (10:52 -0700)] 
Portability: add shim for memrchr() and detect direct.h

Windows requires direct.h to define the chdir(), chroot(), cwd() and
related system calls.

memrchr() is not always defined but required by SBuf. Provide a local
implementation for systems that need it.

10 years agoFix various Kerberos issues
Markus Moeller [Wed, 17 Sep 2014 13:21:07 +0000 (06:21 -0700)] 
Fix various Kerberos issues

* Fix error_message detection and use.

* Fix library detection

* Fix spelling typo

* Change handling of principals in keytab for kerberos_ldap_group.

10 years agoAdd missing include after rev.13586
Amos Jeffries [Mon, 15 Sep 2014 13:29:34 +0000 (06:29 -0700)] 
Add missing include after rev.13586

10 years agoWindows: MinGW does not define system function death()
Amos Jeffries [Mon, 15 Sep 2014 12:46:55 +0000 (05:46 -0700)] 
Windows: MinGW does not define system function death()

... try using raise() instead as used by other exception cases.

Also, fix include file order and wrapping to match squid-3 coding
guidelines and available HAVE_ macro wrappers.

10 years agoPrep for 3.4.8
Amos Jeffries [Mon, 15 Sep 2014 08:06:58 +0000 (01:06 -0700)] 
Prep for 3.4.8

10 years agoWindows: fix various compile issues
Amos Jeffries [Mon, 15 Sep 2014 04:46:04 +0000 (21:46 -0700)] 
Windows: fix various compile issues

* syntax error typo from SBuf conversion of service_name

* add several missing includes

* fix macro wrapper around mswsock.h

* in ipc_win2.cc fix parameter error for memset() and several potential
  buffer overruns by removing magic number parameters on buffer size.

* fdd_table entry is not a HANDLE but a function pointer

10 years agoWindows: Fix error displaying helper name on pipe close errors
Amos Jeffries [Mon, 15 Sep 2014 02:54:33 +0000 (19:54 -0700)] 
Windows: Fix error displaying helper name on pipe close errors

The helper name string is not directly available to the HelperServerBase
methods for closing pipes. Pass it from the method callers as needed and
drop logging of the command line details.

10 years agoCygwin: re-enable /etc/resolv.conf parsing
Amos Jeffries [Mon, 15 Sep 2014 01:21:36 +0000 (18:21 -0700)] 
Cygwin: re-enable /etc/resolv.conf parsing

idnsParseResolvConf() had been disabled for all windows builds. Cygwin
does provide this system config file.

Also, instead of seeding #if/#endif wrappers around always call the
function and just wrap its internals away from Windows builds that do
not supply the necessary config file.

10 years agoPortability: rename BodyPipe member to avoid clash with pipe() macro
Amos Jeffries [Mon, 15 Sep 2014 00:57:29 +0000 (17:57 -0700)] 
Portability: rename BodyPipe member to avoid clash with pipe() macro

Our Windows compatibility layer defines pipe() as a macro. On MinGW at
least the precompiler makes no distinction between parameterless macro
pipe() and pipe variables.
Use thePipe for member naming and aPipe for function local variables.

10 years agoWindows: fix mapping between POSIX and Windows socket types
Amos Jeffries [Mon, 15 Sep 2014 00:53:05 +0000 (17:53 -0700)] 
Windows: fix mapping between POSIX and Windows socket types

MinGW at least still defines several socket structure fields with size_t
instead of socklen_t. In order to maintain the POSIX API definition in
appearance we need to cast these types to their POSIX variant regardless
of whether size_t or socklen_t is used.

10 years agoWindows: Various fixes for CMSG API emulation
Amos Jeffries [Sun, 14 Sep 2014 14:15:01 +0000 (07:15 -0700)] 
Windows: Various fixes for CMSG API emulation

* Windows defines CMSG_DATA macro name for uses unrelated to the BSD
  socket CMSG mechanism. Define SQUID_CMSG_DATA as a generic replacement.

* MinGW provides a wrapper layer emulating the BSD socket CMSG mechanism
  in the form of WSA_CMG_* macros for the BSD struct types.
  Detect and use those wrapper macros when available.

10 years agoCleanup: wrap some C-includes with protective macros
Amos Jeffries [Sun, 14 Sep 2014 14:04:27 +0000 (07:04 -0700)] 
Cleanup: wrap some C-includes with protective macros

Squid-3 guidelines require that C-header includes should be wrapped
and the absence of wrapping causes build errors on Windows at least for
these ones.

10 years agoBoilerplate: update CONTRIBUTORS contacts
Amos Jeffries [Sun, 14 Sep 2014 12:10:55 +0000 (05:10 -0700)] 
Boilerplate: update CONTRIBUTORS contacts

10 years agoFix various ICMP handling issues in Squid pinger
Amos Jeffries [Sun, 14 Sep 2014 04:36:57 +0000 (16:36 +1200)] 
Fix various ICMP handling issues in Squid pinger

* ICMP code type logging display could over-read the registered type
  string arrays.

* Malformed ICMP packets were accepted into processing with undefined
  and potentially nasty results.

Both sets of flaws can result in pinger segmentation fault and halting
the Squid functionality relying on pinger for correct operation.

 Thanks to the OpenSUSE project for analysis and resolution of these.

10 years agoFix typo in rev.13574
Amos Jeffries [Sun, 14 Sep 2014 03:51:50 +0000 (15:51 +1200)] 
Fix typo in rev.13574

10 years agoBoilerplate: update copyright reference for kerberos_ldap_group/support_ldap.cc
Amos Jeffries [Sun, 14 Sep 2014 03:11:33 +0000 (20:11 -0700)] 
Boilerplate: update copyright reference for kerberos_ldap_group/support_ldap.cc

10 years agoSource Maintenance: fix various maintenance script issues
Amos Jeffries [Sat, 13 Sep 2014 16:46:45 +0000 (04:46 +1200)] 
Source Maintenance: fix various maintenance script issues

* ensure auto-generated .list are sorted, instead of ad-hoc system
  dependent ordering which can cause needless updates.

* grep only paths with *.* (usually files) instead of all items in each
  directory. This avoids scanning sub-directory indexes with grep, which
  produces fatal errors on some systems.

* add check for Squid Software Foundation copyright blurb and highlight
  files needing attention.

10 years agoBoilerplate: update copyright blurbs on packaging and utility scripts
Amos Jeffries [Sat, 13 Sep 2014 15:04:00 +0000 (03:04 +1200)] 
Boilerplate: update copyright blurbs on packaging and utility scripts

Includes boilerplates on debug analysis and proxy maintenance scripts.

* Updates CONTRIBUTORS with missing authorship details.

* Updates CREDITS with missing copyright details from associated helpers
  and other third-party code embeded in Squid.

10 years agoBoilerplate: update copyright blurbs on src/
Amos Jeffries [Sat, 13 Sep 2014 13:59:43 +0000 (01:59 +1200)] 
Boilerplate: update copyright blurbs on src/

10 years agoBoilerplate: update copyright blurbs on Squid helpers
Amos Jeffries [Sat, 13 Sep 2014 13:31:49 +0000 (01:31 +1200)] 
Boilerplate: update copyright blurbs on Squid helpers

10 years agoBoilerplate: update copyright blurbs for Squid tools
Amos Jeffries [Sat, 13 Sep 2014 13:20:21 +0000 (01:20 +1200)] 
Boilerplate: update copyright blurbs for Squid tools

10 years agoBoilerplate: copyright blurb updates for test-suite
Amos Jeffries [Fri, 12 Sep 2014 23:00:48 +0000 (11:00 +1200)] 
Boilerplate: copyright blurb updates for test-suite

10 years agoFix off by one in snmp subsystem
Sebastian Krahmer [Fri, 12 Sep 2014 22:39:05 +0000 (16:39 -0600)] 
Fix off by one in snmp subsystem

10 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 3 Sep 2014 00:15:15 +0000 (18:15 -0600)] 
SourceFormat Enforcement

10 years ago%<tt (total server time) is not computed in some cases
Christos Tsantilas [Tue, 2 Sep 2014 14:54:01 +0000 (17:54 +0300)] 
%<tt (total server time) is not computed in some cases

The total server time is not computed for CONNECT requests.
An other example case is when server-first bumping mode is used and squid
connects to SSL peer, but connection terminated before the SSL handshake
completes.

This is a Measurement Factory project

10 years agoBoilerplate: move 'AUTHOR: Guido Serassio' texts
Amos Jeffries [Tue, 2 Sep 2014 14:44:28 +0000 (07:44 -0700)] 
Boilerplate: move 'AUTHOR: Guido Serassio' texts

with permission.

Also, remove some joint authorship claims where all authors have given
permission for the move.

10 years agoSupport receiving PROXY protocol version 1 and 2.
Amos Jeffries [Tue, 2 Sep 2014 13:35:46 +0000 (06:35 -0700)] 
Support receiving PROXY protocol version 1 and 2.

PROXY protocol has been developed by Willy Tarreau of HAProxy for
communicating original src and dst IP:port details between proxies and
load balancers in a protocol-agnostic way.

stunnel, HAProxy and some other HTTP proxying software are already
enabled and by adding support to Squid we can effectively chain these
proxies without having to rely on X-Forwarded-For headers.

This patch adds http_port mode flag (require-proxy-header) to signal the
protocol is in use, parsing and processing logics for the PROXY protocol
headers on new connections, and the proxy_protocol_access control to
manage inbound connections.
 The indirect client security/trust model remains unchanged. As do all
HTTP related logics on the connection once PROXY protocol header has
been received.

Furture Work:
 * support sending PROXY protocol to cache_peers
 * support receiving PROXY protocol on https_port
 * rework the PROXY parse logics as a Parser-NG child parser.

10 years agoFix libsquid-parser.la duplications after trunk merge
Amos Jeffries [Tue, 2 Sep 2014 12:12:07 +0000 (05:12 -0700)] 
Fix libsquid-parser.la duplications after trunk merge

10 years agoRevert AsyncJob::Start() from clientNegotiateSSL()
Amos Jeffries [Tue, 2 Sep 2014 01:49:58 +0000 (18:49 -0700)] 
Revert AsyncJob::Start() from clientNegotiateSSL()

Peek-n-splice code updates made it wrong. The original code should work
now even with PROXY protocol, which is not supported on HTTPS ports
anyway.

10 years agoMerge from trunk
Amos Jeffries [Tue, 2 Sep 2014 01:08:58 +0000 (18:08 -0700)] 
Merge from trunk

10 years agoDocs: Add proxy-protocol.txt latest version
Amos Jeffries [Tue, 2 Sep 2014 00:57:38 +0000 (17:57 -0700)] 
Docs: Add proxy-protocol.txt latest version

10 years agoFixed build by removing the COPYING entry made stale by r13568.
Alex Rousskov [Fri, 29 Aug 2014 19:32:50 +0000 (13:32 -0600)] 
Fixed build by removing the COPYING entry made stale by r13568.

10 years agoBoilerplate: update authorship contributions by Markus Moeller
Amos Jeffries [Fri, 29 Aug 2014 15:12:04 +0000 (08:12 -0700)] 
Boilerplate: update authorship contributions by Markus Moeller

 With permission.

./helpers/negotiate_auth/kerberos/COPYRIGHT
- remove, since it duplicates the Squid top level COPYRIGHT file.

./lib/base64.c
- removing the inaccurate line "AUTHOR: Markus Moeller", since other
  authors (myself at least) have adjusted that code as well.

./src/peer_proxy_negotiate_auth.h
- removing the line: "AUTHOR: Markus Moeller (markus_moeller at
  compuserve.com)"

./src/peer_proxy_negotiate_auth.cc
- removing the "Hosted at" line as inaccurate, the file is hosted in
  Squid repository, launchpad and elsewhere.

- replacing the license blurb with Squid Software Foundation blurb
  (remains GPLv2+).

10 years agoBoilerplate: update copyright blurbs for Basic authentication helpers
Amos Jeffries [Fri, 29 Aug 2014 14:04:29 +0000 (07:04 -0700)] 
Boilerplate: update copyright blurbs for Basic authentication helpers

* added Squid Software Foundation blurbs

* updated CONTRIBUTORS with missing authors

* updated CREDITS with missing licenses

* removed duplicate GPL license in helpers/basic_auth/SMB/COPYING-2.0

* removed obsolete file helpers/basic_auth/MSNT/byteorder.h

10 years agoClose active pconns after their *_port goes away on reconfigure.
Christos Tsantilas [Fri, 29 Aug 2014 06:59:17 +0000 (09:59 +0300)] 
Close active pconns after their *_port goes away on reconfigure.

This change reduces what may be perceived as reconfigure memory leaks
related to *_port options. Before this change, a single persistent
connection could continue to receive new requests (and tie no longer
globally accessible PortCfg-related structures) for hours.

TODO: Close already idle pconns as well.

10 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 29 Aug 2014 00:14:34 +0000 (18:14 -0600)] 
SourceFormat Enforcement

10 years agoBoilerplate: update copyright blurbs on libmisc* libraries
Amos Jeffries [Thu, 28 Aug 2014 16:10:38 +0000 (09:10 -0700)] 
Boilerplate: update copyright blurbs on libmisc* libraries

* add Squid Software Foundation blurbs

* update CONTRIBUTORS with missing authors

* update CREDITS to match current reality

10 years agoBoilerplate: update copyright blurbs on lib/snmplib
Amos Jeffries [Thu, 28 Aug 2014 15:10:54 +0000 (08:10 -0700)] 
Boilerplate: update copyright blurbs on lib/snmplib

* Add Squid Software Foundation blurbs

* update CREDITS to meet Carnegie Mellon license requirements

10 years agoBoilerplate: update copyright blurb for lib/smblib
Amos Jeffries [Thu, 28 Aug 2014 14:44:55 +0000 (07:44 -0700)] 
Boilerplate: update copyright blurb for lib/smblib

* Add Squid Software Foundation blurbs

* update CONTRIBUTORS with missing authors (third-party)

* update CREDITS with missing lib/smblib details
 - also some missing lib/rfcnb details

10 years agoBoilerplate: update copyright blurbs on lib/librfcnb
Amos Jeffries [Thu, 28 Aug 2014 05:07:21 +0000 (22:07 -0700)] 
Boilerplate: update copyright blurbs on lib/librfcnb

* Add Squid Software Foundation blurb

* Update CONTRIBUTORS with missing authors

* Update CREDITS with missing license blurb

10 years agoBoilerplate: update copyright blurbs for libprofiler
Amos Jeffries [Thu, 28 Aug 2014 04:52:01 +0000 (21:52 -0700)] 
Boilerplate: update copyright blurbs for libprofiler

10 years agoBoilerplate: update copyright blurbs on libntlmauth
Amos Jeffries [Thu, 28 Aug 2014 04:45:04 +0000 (21:45 -0700)] 
Boilerplate: update copyright blurbs on libntlmauth

10 years agoSourceFormat Enforcement
Automatic source maintenance [Thu, 28 Aug 2014 00:14:08 +0000 (18:14 -0600)] 
SourceFormat Enforcement

10 years agoPrep for 3.4.7 and 3.3.13
Amos Jeffries [Wed, 27 Aug 2014 14:08:10 +0000 (07:08 -0700)] 
Prep for 3.4.7 and 3.3.13

10 years agoSSL Peek and Splice
Christos Tsantilas [Wed, 27 Aug 2014 08:05:25 +0000 (11:05 +0300)] 
SSL Peek and Splice

The goal of this patch is to make SSL bumping decision after the origin server
name is known.

Peek and Splice peeks at the SSL client Hello message and SNI info if any
(bumping step 1), sends identical or a similar Hello message to the SSL server
 and peeks at the SSL server Hello message (bumping step 2), and finally
decides to proceed with splicing or bumping the connection (bumping step 3).

After the step 1 bumping step completes the SNI information is available and
after the step 2 bumping step completes the server certificate is available.

The ssl_bump access list evaluated on every bumping step to select the bumping
mode to use. The new acl "at_step" can be used to match the current bumping
step.

In most cases:
 - if the user select "peek" bumping mode at step2 then at step3 can select
   one of the "splice" or "terminate" modes.
 - If the user select "stare" bumping mode at step2 then at step 3 can select
   one of the "bump" or "terminate" modes.

If the squid built with the SQUID_USE_OPENSSL_HELLO_OVERWRITE_HACK and the
client uses openSSL library similar to the library used by squid then bumping
is possible after "peek" bumping mode selection and "splice" after "stare"
bumping mode selection.

The bump, terminate and splice are final decisions.

Example configurations:

acl step1 at_step  SslBump1
acl step2 at_step  SslBump2
acl step3 at_step  SslBump3

ssl_bump peek step1 all
ssl_bump splice step2 BANKS
ssl_bump peek step2 all
ssl_bump terminate step3 BLACKLIST
ssl_bump splice step3 all

This is a Measurement Factory project

10 years agomerge from trunk
Christos Tsantilas [Wed, 27 Aug 2014 07:38:09 +0000 (10:38 +0300)] 
merge from trunk

10 years agoIgnore Range headers with unidentifiable byte-range values
Amos Jeffries [Tue, 26 Aug 2014 15:48:43 +0000 (08:48 -0700)] 
Ignore Range headers with unidentifiable byte-range values

If squid is unable to determine the byte value for ranges, treat the
header as invalid.

10 years agomerge from trunk
Christos Tsantilas [Tue, 26 Aug 2014 09:01:27 +0000 (12:01 +0300)] 
merge from trunk

10 years agoFixes and polishing in response to Amos' squid-dev review dated 2014/08/19
Christos Tsantilas [Tue, 26 Aug 2014 08:21:27 +0000 (11:21 +0300)] 
Fixes and polishing in response to Amos' squid-dev review dated 2014/08/19

- Polishing changes
- Move src/acl/AtBumpStep*.[cc,h] files to src/acl/AtStep*.[cc,h]
- Convert Ssl::Bio::sslFeatures::serverName,
  Ssl::Bio::sslFeatures::HelloMesssage and Ssl::ServerBio::helloMsg members
  to SBuf

10 years agoBoilerplate: update copyright blurbs on lib/libTrie
Amos Jeffries [Tue, 26 Aug 2014 04:11:40 +0000 (21:11 -0700)] 
Boilerplate: update copyright blurbs on lib/libTrie

* add Squid Software Foundation blurb

* merged AUTHORS file content to CONTRIBUTORS.

* removed duplicate COPYING file. Squid main COPYING is newer and the
  library is no longer a standalone object.

* remvoed empty NEWS, README, Changelog files

* removed obsolete INSTALL file.
  - It documents the previously removed libTrie/configure.ac script.

10 years agoBoilerplate: update acinclude/ and configure.ac copyrights
Amos Jeffries [Tue, 26 Aug 2014 02:39:30 +0000 (19:39 -0700)] 
Boilerplate: update acinclude/ and configure.ac copyrights

* update CONTRIBUTORS with missing contributors

* update CREDITS with missing copyright licenses
 - remove outdated Treehouse Networks license on rfc3596.h rfc3596.cc
 - shuffle some entries for easier reading. Alphabetical by first source
   file path.

* split AX_WITH_PROG() macro into its own source file to clarify the
  license scope. It is provided as a standalone file by the author(s).

10 years agoBoilerplate: update authorship claims
Amos Jeffries [Tue, 26 Aug 2014 01:58:27 +0000 (18:58 -0700)] 
Boilerplate: update authorship claims

* Robert Collins actually gave permission to update a long time back.

* Duane Wessels permission to update now granted.

* UCSD authorship claims being left in place with CREDITS entry.

10 years agoBoilerplate: update copyright licenses on include/ sources
Amos Jeffries [Mon, 25 Aug 2014 15:47:04 +0000 (08:47 -0700)] 
Boilerplate: update copyright licenses on include/ sources

* add Squid Software Foundation blurb

* update CONTRIBUTORS with missing authors

* update CREDITS with missing license and copyright statements

 It looks a bit messy, but Carnegie Mellon Univeristy license requires
 that several very similar but unique copyright and license blurbs be
 documented unabreviated.

10 years agoBoilerplate: update copyright on compat/ library sources
Amos Jeffries [Mon, 25 Aug 2014 14:08:02 +0000 (07:08 -0700)] 
Boilerplate: update copyright on compat/ library sources

* add Squid Software Foundation boilerplate

* update CONTRIBUTORS with authors not already mentioned.

* update CREDITS with missing licenses.

10 years agoBoilerplate: make script quieter when re-scanning files
Amos Jeffries [Mon, 25 Aug 2014 14:01:56 +0000 (07:01 -0700)] 
Boilerplate: make script quieter when re-scanning files

When the copyright blurb is up to date we do not need to display the
entire file. Add a subfunction to only display the message, not file.

Also, note more claimants we need to contact about authorship claims.

10 years agoRelease Notes: add notice explaining copyright changes
Amos Jeffries [Mon, 25 Aug 2014 12:08:20 +0000 (05:08 -0700)] 
Release Notes: add notice explaining copyright changes

10 years agoBoilerplate copyright/license adjustment preparation
The Squid Software Foundation [Mon, 25 Aug 2014 11:25:54 +0000 (04:25 -0700)] 
Boilerplate copyright/license adjustment preparation

Squid-3 is now being administered by the Squid Software Foundation,
a non-profit organisation created for the purpose of providing
governance and representation for the Squid Project and community
of contributors.
  http://www.squid-cache.org/Foundation/

As such the Squid source code collection is being prefixed with a
new copyright blurb:

 * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
 *
 * Squid software is distributed under GPLv2+ license and includes
 * contributions from numerous individuals and organizations.
 * Please see the COPYING and CONTRIBUTORS files for details.

Existing copyright claims on specific source code files are being
preserved in-situ following this collection blurb.

With some exceptions where existing copyright owners have explicitly
given permission for their specific claim statements to be moved to
the CONTRIBUTORS file and assist removal of the inconsistent and
now often incorrect Harvest and Squid Project blurb(s).

This patch publishes the script and boilerplate text used to perform
this change of copyright marking for public review.

Also, adds some administrative polishing in preparation for the
blurb adjustments.

  This is a Squid Software Foundation project.

10 years agoCleanup: remove SQUID_NO_STRING_BUFFER_PROTECT and SQUID_UNIT_TEST macros
Amos Jeffries [Mon, 25 Aug 2014 04:53:57 +0000 (21:53 -0700)] 
Cleanup: remove SQUID_NO_STRING_BUFFER_PROTECT and SQUID_UNIT_TEST macros

These macros were used solely to prevent cppunit and operating system
includes from generating build errors and warnings via Squid protection
from unsafe use of sprintf, strdup and other allocator and string
functions.

The protection against these functions has long ago been move to
source-maintenance script instead of runtime checking. Making these
macros obsolete.

10 years agoRemove Robert Collins and UCLA from claimsOkayToMove
Amos Jeffries [Mon, 25 Aug 2014 04:22:47 +0000 (21:22 -0700)] 
Remove Robert Collins and UCLA from claimsOkayToMove

We are still awaiting on confirmed approval to move these. They can be
added later and sources re-scanned when that arrives.

10 years agoUpdate Squid Software Foundation blurb dates
Amos Jeffries [Mon, 25 Aug 2014 04:20:56 +0000 (21:20 -0700)] 
Update Squid Software Foundation blurb dates

10 years agoCleanup: remove goto from Vary: header failure recovery
Amos Jeffries [Sat, 23 Aug 2014 12:04:16 +0000 (05:04 -0700)] 
Cleanup: remove goto from Vary: header failure recovery

10 years agoCleanup: remove goto from logformat token parser
Amos Jeffries [Sat, 23 Aug 2014 11:17:32 +0000 (04:17 -0700)] 
Cleanup: remove goto from logformat token parser