]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
8 years agoBug 4279: No response from proxy for FTP-download of non-existing file
Vitaly Lavrov [Tue, 13 Oct 2015 12:53:10 +0000 (05:53 -0700)] 
Bug 4279: No response from proxy for FTP-download of non-existing file

8 years agoBug 3574: crashes on reconfigure and startup
Amos Jeffries [Mon, 12 Oct 2015 01:38:02 +0000 (18:38 -0700)] 
Bug 3574: crashes on reconfigure and startup

When Squid receives a reconfigure signal before its signal handler
has been registered on startup it will crash with unhandled signal
exceptions. This can be triggered on system boot when a resolv.conf
alteration signal wins a race with the daemon service initialization.

 Register the reconfigure signal handler early and ignoring signals
 until initial squid.conf load has completed.

When Squid receives a reconfigure signal while it is already in the
process of reconfiguring, the two async sequences can interfere and
result in confusing fatal error or crashes.
 Only allowing one reconfigure sequence to be initiated at a time.

Also, if shutdown signal has been received while waiting for a
reconfigure to finish, let shutdown take precedence over any pending
reconfigure repeats.

 Based on work by Clint Byrum and D J Gardner, Ubuntu

8 years agoSourceFormat Enforcement
Source Maintenance [Sun, 11 Oct 2015 18:12:00 +0000 (18:12 +0000)] 
SourceFormat Enforcement

8 years agoRemove unnecessary sub-class AccessLogEntry::Private
Amos Jeffries [Sun, 11 Oct 2015 16:09:26 +0000 (09:09 -0700)] 
Remove unnecessary sub-class AccessLogEntry::Private

Use an accessor to locate the appropriate method string to display in a
consistent way instead.

8 years agoSupport logformat %macros in external_acl_type format
Amos Jeffries [Sun, 11 Oct 2015 14:08:47 +0000 (07:08 -0700)] 
Support logformat %macros in external_acl_type format

Update the external_acl_type helper interface to use libformat and thus
make any logformat token valid in its format parameter field.

As a result much of the logic surrounding format code parsing, display
and helper query generation has been completely dropped. What remains is
a basic parse loop handling backward compatibility for the unusual
%CERT_* token syntax, space delimiter and field default encodings.

Extensions to logformat resulting from the merger:

* adds \-escape encoding of output fields

* allows {arg} field to be placed before or after the format code.

* extended to accept the old external_acl_type %macros. But not
  documented, these are deprecated and only for backward compatibility.

* extended to support outputting formats without a format-name prefix
  as was required by the original logformat config lines.

The major side effect of this change is that these ACLs now require
AccessLogEntry to be filled out with state data, rather than just the
ACLChecklist object members.

The requires*() mechanism of ACLChecklist has been extended to catch
some cases resulting from missing the ALE entirely. But it cannot catch
the more subtle problem of data members inside the ALE being unset.
To try and catch those a syncAle() mechanism has been added that fills
out missing ALE members and prints out debug warnings about the action.

8 years agoTLS: shuffle EECDH configuration to libsecurity
Amos Jeffries [Sun, 11 Oct 2015 13:56:33 +0000 (06:56 -0700)] 
TLS: shuffle EECDH configuration to libsecurity

* add class ServerOptions to libsecurity to manage server specific
  configuration options. Based on class PeerOptions.

* shuffle the DH config parse and dump logics to ServerOptions

* shuffle the DH params pre-loading logic to ServerOptions

* add configuration warning when tls-dh= is used and overrides
  dhparams= logacy configuration. Also, auto-upgrade the config
  settings when dhparams= is dumped in mgr:config report.

8 years agoShuffle DH params parsing and pre-loading to libsecurity
Amos Jeffries [Sun, 11 Oct 2015 12:13:57 +0000 (05:13 -0700)] 
Shuffle DH params parsing and pre-loading to libsecurity

8 years agoDocs: release notes update
Amos Jeffries [Sun, 11 Oct 2015 07:08:32 +0000 (00:08 -0700)] 
Docs: release notes update

8 years agoBug 4347: compile errors with LibreSSL 2.3
Stuart Henderson [Sun, 11 Oct 2015 05:30:33 +0000 (22:30 -0700)] 
Bug 4347: compile errors with LibreSSL 2.3

8 years agoDocs: update https_port to reference http_port
Amos Jeffries [Sat, 10 Oct 2015 07:11:39 +0000 (00:11 -0700)] 
Docs: update https_port to reference http_port

8 years agoShuffle tls-dh= options to libsecurity
Amos Jeffries [Sat, 10 Oct 2015 06:59:12 +0000 (23:59 -0700)] 
Shuffle tls-dh= options to libsecurity

* create class ServerOptions derived from class PeerOptions to hold
  server-specific configuration settings.

* split DH, ECDH, and DH params settings during configuration instead of
  on every context initialization.

8 years agoMerge from trunk rev.14346
Amos Jeffries [Fri, 9 Oct 2015 09:24:02 +0000 (02:24 -0700)] 
Merge from trunk rev.14346

8 years agoMerge from trunk rev.14346
Amos Jeffries [Fri, 9 Oct 2015 09:23:22 +0000 (02:23 -0700)] 
Merge from trunk rev.14346

8 years agoFix build error with IDENT
Amos Jeffries [Fri, 9 Oct 2015 09:22:23 +0000 (02:22 -0700)] 
Fix build error with IDENT

8 years agoAdd tls-no-default-ca option to replace sslflags=NO_DEFAULT_CA
Amos Jeffries [Fri, 9 Oct 2015 06:02:01 +0000 (23:02 -0700)] 
Add tls-no-default-ca option to replace sslflags=NO_DEFAULT_CA

8 years agoShuffle the cafile= context logics to libsecurity class PeerOptions
Amos Jeffries [Fri, 9 Oct 2015 02:48:55 +0000 (19:48 -0700)] 
Shuffle the cafile= context logics to libsecurity class PeerOptions

* Rename the parameter tls-cafile= and allow multiple cafile= entries to
  be used in squid.conf.

* Document the capath= option as only supported by OpenSSL and LibreSSL.

* Add GnuTLS support for CA loading.
  Although at this point GnuTLS contexts are not yet created.

8 years agoDocs: release notes updates
Amos Jeffries [Fri, 9 Oct 2015 02:41:04 +0000 (19:41 -0700)] 
Docs: release notes updates

8 years agofix whitespace changes
Amos Jeffries [Fri, 9 Oct 2015 02:22:29 +0000 (19:22 -0700)] 
fix whitespace changes

8 years agoAdd syncAle() to reduce external ACL format transition problems
Amos Jeffries [Fri, 9 Oct 2015 02:13:00 +0000 (19:13 -0700)] 
Add syncAle() to reduce external ACL format transition problems

8 years ago%ssl::<cert_errors logformat code
Christos Tsantilas [Thu, 8 Oct 2015 17:20:27 +0000 (20:20 +0300)] 
%ssl::<cert_errors logformat code

The new %ssl::<cert_errors logformat code lists server certificate
validation errors detected by Squid (including OpenSSL and the
certificate validation helper components). The errors are listed in
the discovery order. By default, the error codes are separated by ':'.
Custom separators are also supported. For example:

  %{;}ssl::<cert_errors

This is a Measurement Factory project.

8 years agoSet default pid_filename based on service name
Amos Jeffries [Thu, 8 Oct 2015 12:44:41 +0000 (05:44 -0700)] 
Set default pid_filename based on service name

This makes pid_filename directive no longer need to be set explicitly to
the service name in multi-tenant installations. Unless the default value
has been replaced with --with-pidfile=Foo it will use the service name
as the .pid filename.

8 years agoMinor edits after audit
Amos Jeffries [Thu, 8 Oct 2015 12:22:22 +0000 (05:22 -0700)] 
Minor edits after audit

8 years agoMerge from trunk
Amos Jeffries [Sat, 3 Oct 2015 08:28:48 +0000 (01:28 -0700)] 
Merge from trunk

8 years agoMerge from trunk
Amos Jeffries [Sat, 3 Oct 2015 05:36:14 +0000 (22:36 -0700)] 
Merge from trunk

8 years agoUpdate release notes
Amos Jeffries [Sat, 3 Oct 2015 05:35:00 +0000 (22:35 -0700)] 
Update release notes

8 years agoShuffle CA verification config to libsecurity
Amos Jeffries [Sat, 3 Oct 2015 05:26:00 +0000 (22:26 -0700)] 
Shuffle CA verification config to libsecurity

8 years agoAdd shell slash-escaping to libformat quoting types
Amos Jeffries [Fri, 2 Oct 2015 11:52:54 +0000 (04:52 -0700)] 
Add shell slash-escaping to libformat quoting types

Also, replace external_acl::Quoting with Format::Quoting

8 years agodocument ALE new members
Amos Jeffries [Fri, 2 Oct 2015 10:26:15 +0000 (03:26 -0700)] 
document ALE new members

8 years agoUpdate squid.conf text for external_acl_type format
Amos Jeffries [Fri, 2 Oct 2015 09:49:47 +0000 (02:49 -0700)] 
Update squid.conf text for external_acl_type format

8 years agoCleanup various spelling errors
Amos Jeffries [Fri, 2 Oct 2015 04:54:28 +0000 (21:54 -0700)] 
Cleanup various spelling errors

8 years agoURL-encode the implicit %DATA appended to helper format
Amos Jeffries [Thu, 1 Oct 2015 12:58:19 +0000 (05:58 -0700)] 
URL-encode the implicit %DATA appended to helper format

There is nothing we can easily do about %DATA explicitly used inside the
format. It will by non-encoded unless specific encoding is written in the
format config, according to logformat design.

8 years agoIDENT is optional
Amos Jeffries [Thu, 1 Oct 2015 12:51:14 +0000 (05:51 -0700)] 
IDENT is optional

8 years agoDe-duplicate %DATA string creation
Amos Jeffries [Thu, 1 Oct 2015 12:50:47 +0000 (05:50 -0700)] 
De-duplicate %DATA string creation

8 years agoFix potential memory leak on GopherStateData constructor errors
Amos Jeffries [Thu, 1 Oct 2015 12:35:09 +0000 (05:35 -0700)] 
Fix potential memory leak on GopherStateData constructor errors

In the unusual event that the GopherStateData object constructor fails
it is possible that the destructor gets called without having gone
through the deleteThis() and swangSong() dance. Since the constructor
allocates memory buffer we need to clean that up.

 Detected by Coverity Scan. Issue 1318022

8 years agonegotiate_wrapper: fix minor memory leak
Amos Jeffries [Thu, 1 Oct 2015 12:27:28 +0000 (05:27 -0700)] 
negotiate_wrapper: fix minor memory leak

 Detected by Coverity Scan. Issue 1324564

8 years agonegotiate_wrapper: Fix bad pointer comparisons in rev.14290
Amos Jeffries [Thu, 1 Oct 2015 12:22:44 +0000 (05:22 -0700)] 
negotiate_wrapper: Fix bad pointer comparisons in rev.14290

 Detected by Coverity Scan. Issues 1324560132456113245621324563

8 years agoPrep for 3.5.10
Amos Jeffries [Thu, 1 Oct 2015 11:15:09 +0000 (04:15 -0700)] 
Prep for 3.5.10

8 years agoBug 4329: GCC 5.2 no known conversion for argument
Amos Jeffries [Thu, 1 Oct 2015 09:55:47 +0000 (02:55 -0700)] 
Bug 4329: GCC 5.2 no known conversion for argument

8 years agoMerged from trunk rev.14335
Amos Jeffries [Thu, 1 Oct 2015 04:01:13 +0000 (21:01 -0700)] 
Merged from trunk rev.14335

8 years agoBug 4190: assertion 'hash_remove_link' from Auth::User::cacheCleanup
Francesco Chemolli [Thu, 1 Oct 2015 01:20:20 +0000 (18:20 -0700)] 
Bug 4190: assertion 'hash_remove_link' from Auth::User::cacheCleanup

The hash_link based cache depends on raw-ptr key comparisons to store
hash entries. This does not work at all well with SBuf as the key,
since the backing MemBlob behind SBuf can change its memory location.

* replace the implementation of User credentials caching with an STL
  based container class that can handle SBuf.

* revert the global Auth::User cache design to per-scheme caches
  which get combined only when reporting statistics.

* add a RunnersRegistry helper class to control Squid startup,
  reconfigure, and shutdown events activity in regards to the caches.

* suppress useless cache garbage collection events when auth has no
  credentials to cleanup.

* make the cache key dynamic at the caller codes discretion.

8 years agoSourceFormat Enforcement
Source Maintenance [Wed, 30 Sep 2015 18:12:05 +0000 (18:12 +0000)] 
SourceFormat Enforcement

8 years agoConvert htcpDetail to MEMPROXY_CLASS
Francesco Chemolli [Wed, 30 Sep 2015 14:20:16 +0000 (16:20 +0200)] 
Convert htcpDetail to MEMPROXY_CLASS

8 years agoAlign behavior of MEMPROXY_CLASS's operator delete with ::delete on nullptr
Francesco Chemolli [Wed, 30 Sep 2015 14:12:55 +0000 (16:12 +0200)] 
Align behavior of MEMPROXY_CLASS's operator delete with ::delete on nullptr

8 years agoFilledCheclist::rfc931 is an array not a ptr
Amos Jeffries [Wed, 30 Sep 2015 12:11:11 +0000 (05:11 -0700)] 
FilledCheclist::rfc931 is an array not a ptr

8 years agoFix values 'LFT_EXT_ACL_CLIENT_EUI48' and 'LFT_EXT_ACL_CLIENT_EUI64' not handled...
Amos Jeffries [Wed, 30 Sep 2015 10:01:33 +0000 (03:01 -0700)] 
Fix values 'LFT_EXT_ACL_CLIENT_EUI48' and 'LFT_EXT_ACL_CLIENT_EUI64' not handled in switch

8 years agoPolish debugs
Amos Jeffries [Wed, 30 Sep 2015 09:43:08 +0000 (02:43 -0700)] 
Polish debugs

8 years agoMerged from trunk rev.14331
Amos Jeffries [Wed, 30 Sep 2015 09:32:39 +0000 (02:32 -0700)] 
Merged from trunk rev.14331

8 years agodo not bypass hdrCacheInit() when there are no mime headers
Alex Rousskov [Wed, 30 Sep 2015 03:24:39 +0000 (20:24 -0700)] 
do not bypass hdrCacheInit() when there are no mime headers

8 years agoRestore implicit %DATA behaviour
Amos Jeffries [Wed, 30 Sep 2015 03:16:40 +0000 (20:16 -0700)] 
Restore implicit %DATA behaviour

8 years agoInitialize helper query buffer, and SP-delimit tokens
Amos Jeffries [Wed, 30 Sep 2015 02:26:45 +0000 (19:26 -0700)] 
Initialize helper query buffer, and SP-delimit tokens

8 years agoSourceFormat Enforcement
Source Maintenance [Tue, 29 Sep 2015 06:11:55 +0000 (06:11 +0000)] 
SourceFormat Enforcement

8 years agoRefactor dlink_node to MEMPROXY_CLASS
Francesco Chemolli [Tue, 29 Sep 2015 04:47:46 +0000 (06:47 +0200)] 
Refactor dlink_node to MEMPROXY_CLASS

8 years agoBug 4330: Do not use SSL_METHOD::put_cipher_by_char to determine size of
Christos Tsantilas [Mon, 28 Sep 2015 14:27:56 +0000 (17:27 +0300)] 
Bug 4330: Do not use SSL_METHOD::put_cipher_by_char to determine size of
cipher on hello messages

The use of these methods can cause many problems in squid:
- In earlier openSSL libraries the SSL_METHOD::put_cipher_by_char method with
  NULL arguments returned the size of cipher in the SSL hello message.
  In newer openSSL releases, calling this method with NULL arguments is not
  valid any more, and can result to segfaults.
- In newer libreSSL library releases, the SSLv23_method it is used to produce
  TLS messages and does not return the size of a cipher in an v2 HELLO
  message.

This is a Measurement Factory project

8 years agoAdd missing stub changes for rev.14326
Amos Jeffries [Mon, 28 Sep 2015 10:15:14 +0000 (03:15 -0700)] 
Add missing stub changes for rev.14326

8 years agoMerge from trunk
Amos Jeffries [Mon, 28 Sep 2015 09:40:52 +0000 (02:40 -0700)] 
Merge from trunk

8 years agoParser-NG: update response mime parsing
Amos Jeffries [Mon, 28 Sep 2015 07:20:03 +0000 (00:20 -0700)] 
Parser-NG: update response mime parsing

Update the response mime header parse to using the parseHeader()
method previously in HttpRequest.

8 years agoMerge from trunk rev.14325
Amos Jeffries [Sun, 27 Sep 2015 23:40:35 +0000 (16:40 -0700)] 
Merge from trunk rev.14325

8 years agoBug 3069: CONNECT method bytes sent logging
Aymeric Vincent [Sun, 27 Sep 2015 10:30:23 +0000 (03:30 -0700)] 
Bug 3069: CONNECT method bytes sent logging

8 years agoDocs: update GPLv2 COPYING document
Amos Jeffries [Sun, 27 Sep 2015 04:57:29 +0000 (21:57 -0700)] 
Docs: update GPLv2 COPYING document

... to latest file copy from
  http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt

This resolves some terminology and FSF address changes since the GPLv2
document was earlier applied to Squid.

8 years agoDocs: Clarify libltdl as licensed under LGPLv2+
Amos Jeffries [Sun, 27 Sep 2015 03:52:12 +0000 (20:52 -0700)] 
Docs: Clarify libltdl as licensed under LGPLv2+

8 years agoRelicense SSPI helper to GPLv2+
Guido Serassio [Sun, 27 Sep 2015 03:35:15 +0000 (20:35 -0700)] 
Relicense SSPI helper to GPLv2+

 From: Guido Serassio <guido.serassio@acmeconsulting.it>
 To: Amos Jeffries <squid3@treenet.co.nz>, Squid Foundation Board
  <squid-board@lists.squid-cache.org>
 Subject: R: Squid copyrights
 Thread-Topic: Squid copyrights
 Thread-Index: AQHQ9+T6PCUWJkiqykyPO1tKufh0Lp5Odnyw
 Date: Sat, 26 Sep 2015 08:15:43 +0000
 Message-ID: <0B31416C912584429DC230430752D91C0C028E4B@SBS.acmeconsulting.loc>

 Hi Amos,

 For me the changes are OK.

 Please apply the changes on behalf of me.

 Regards

 Guido Serassio

8 years agoFix virtual override keyword issues in Auth::User for clang
Amos Jeffries [Sat, 26 Sep 2015 22:06:28 +0000 (15:06 -0700)] 
Fix virtual override keyword issues in Auth::User for clang

8 years agoFix cache_peer login=PASS(THRU) after CVE-2015-5400
Amos Jeffries [Sat, 26 Sep 2015 03:04:01 +0000 (20:04 -0700)] 
Fix cache_peer login=PASS(THRU) after CVE-2015-5400

The patch for CVE-2015-5400 converts all non-200 peer responses
into 502 Bad Gateway responses when relaying a CONNECT to a peer.

This happens to break login=PASS and login=PASSTHRU behaviour
which relies on the 401 and 407 status being relayed transparently.

We need to relay the auth server responses as-is when login= is
set to PASS or PASSTHRU but then unconditionally close the
connections to prevent CVE-2015-5400 from occuring.

8 years agoBoilerplate: copyright updates by Francesco Chemolli
Amos Jeffries [Sat, 26 Sep 2015 00:01:47 +0000 (17:01 -0700)] 
Boilerplate: copyright updates by Francesco Chemolli

8 years agoBug 4208: more than one port in wccp2_service_info line causes error
Guy Helmer [Fri, 25 Sep 2015 23:16:48 +0000 (16:16 -0700)] 
Bug 4208: more than one port in wccp2_service_info line causes error

8 years agoRelicense smb_lm auth helper to GPLv2+
Francesco Chemolli [Fri, 25 Sep 2015 15:22:47 +0000 (17:22 +0200)] 
Relicense smb_lm auth helper to GPLv2+

8 years agoRelicense ntlm_fake_auth.pl to GPLv2+
Francesco Chemolli [Fri, 25 Sep 2015 15:21:44 +0000 (17:21 +0200)] 
Relicense ntlm_fake_auth.pl to GPLv2+

8 years agoRework wordlistDestroy and refine documentation for wordlist as suggested by Alex
Francesco Chemolli [Fri, 25 Sep 2015 12:27:33 +0000 (14:27 +0200)] 
Rework wordlistDestroy and refine documentation for wordlist as suggested by Alex

8 years agoAdd virtual destructors to Auth::User hierarchy
Amos Jeffries [Fri, 25 Sep 2015 10:57:18 +0000 (03:57 -0700)] 
Add virtual destructors to Auth::User hierarchy

8 years agoRun source maintenance script
Amos Jeffries [Fri, 25 Sep 2015 10:49:01 +0000 (03:49 -0700)] 
Run source maintenance script

8 years agoMerge from trunk
Amos Jeffries [Fri, 25 Sep 2015 10:12:56 +0000 (03:12 -0700)] 
Merge from trunk

8 years agoDisplay username cache key in cache manager report
Amos Jeffries [Fri, 25 Sep 2015 09:54:31 +0000 (02:54 -0700)] 
Display username cache key in cache manager report

8 years agoSourceFormat Enforcement
Source Maintenance [Fri, 25 Sep 2015 06:12:10 +0000 (06:12 +0000)] 
SourceFormat Enforcement

8 years agoSMP: regster worker listening ports one by one
Alex Rousskov [Fri, 25 Sep 2015 05:17:33 +0000 (22:17 -0700)] 
SMP: regster worker listening ports one by one

When oeprating with many listening ports workers can flood the UDS
queue buffers and run into a timeout waiting for the coordinator to
respond.

To prevent that we for a queue and wait for each port to get a
response before registering the next.

8 years agoBug 4328: %un format code does not work for external ACLs in credentials-fetching...
Steve Hill [Fri, 25 Sep 2015 05:07:55 +0000 (22:07 -0700)] 
Bug 4328: %un format code does not work for external ACLs in credentials-fetching rules

8 years agoCrypto-NG: cleanup and optimize CRL handling
Amos Jeffries [Thu, 24 Sep 2015 21:08:23 +0000 (14:08 -0700)] 
Crypto-NG: cleanup and optimize CRL handling

Certificate Revokation Lists have gone through several iterations
of logic redesign leading to duplicated code and non-optimal I/O.
Client contexts were loading CRL directly from disk into the
context on every new context creation. Whereas the server contexts
were loading into an OpenSSL STACK_OF structure and adding from
memory instead of disk. This later design is more performant.

* Move the pre-loaded CRL set to Security::PeerOptions and store
  in a std::list structure as LockingPointer which will deallocate
  as needed on shutdwown and reconfigure.
  This depends on trunk rev.14304

* Replace the client context disk I/O with the pre-loaded CRL list

* Add GnuTLS CRL list types. Though at this point GnuTLS does not
  pre-load the CRL files.

9 years agoBug 4323: Netfilter broken cross-includes with Linux 4.2
Francesco Chemolli [Thu, 24 Sep 2015 13:05:37 +0000 (06:05 -0700)] 
Bug 4323: Netfilter broken cross-includes with Linux 4.2

9 years agoFix eCAP compile after rev.14305
Amos Jeffries [Thu, 24 Sep 2015 03:22:41 +0000 (20:22 -0700)] 
Fix eCAP compile after rev.14305

9 years agoSourceFormat Enforcement
Source Maintenance [Wed, 23 Sep 2015 18:11:57 +0000 (18:11 +0000)] 
SourceFormat Enforcement

9 years agoBug 4304: PeerConnector.cc:743 "!callback" assertion.
Alex Rousskov [Wed, 23 Sep 2015 15:58:25 +0000 (18:58 +0300)] 
Bug 4304: PeerConnector.cc:743 "!callback" assertion.

When no ssl_bump rules match, Squid may throw a "a rule with the final
action must have matched" exception:

Must(finalAction == Ssl::bumpSplice || finalAction == Ssl::bumpBump ||
     finalAction == Ssl::bumpTerminate);

After the exception is thrown, Squid attempts to wind down the affected
transaction (as it should), but the code either quits with an unhandled
exception error or hits the !callback assertion, depending on whether
the async job processing was in place when the exception was hit (which
depends on whether non-blocking/slow ssl_bump ACLs were active).

The attached patch does three things:

1. Teaches Squid to guess the final ssl_bump action when no ssl_bump
rules match. The final guessed action is "bump" if the last non-final
action was "stare" and "splice" otherwise. I suspect that the older
Squid code attempted to do something like that, but that code may have
been lost when we taught Squid to ignore impossible ssl_bump actions.

2. Protects ssl_bump-checking code from quitting with an unhandled
exception error.

3. Converts the fatal !callback assertion into [hopefully less damaging]
transaction error, with a BUG message logged to cache.log.

More work may be needed to investigate other exceptions, especially
Must(!csd->serverBump() || csd->serverBump()->step <= Ssl::bumpStep2);

This is a Measurement Factory project

9 years agoPortbility fix: filter register keyword from gperf output
Francesco Chemolli [Tue, 22 Sep 2015 17:29:23 +0000 (19:29 +0200)] 
Portbility fix: filter register keyword from gperf output

9 years agoMove gperf invocation for RegisteredHeadersHash to source-maintenance.sh
Francesco Chemolli [Tue, 22 Sep 2015 12:00:37 +0000 (14:00 +0200)] 
Move gperf invocation for RegisteredHeadersHash to source-maintenance.sh
Portability fixes for non-GNU make.

9 years agoeCAP: Return unknown body size for bodies with unknown body sizes.
Alex Rousskov [Mon, 21 Sep 2015 18:17:38 +0000 (12:17 -0600)] 
eCAP: Return unknown body size for bodies with unknown body sizes.

Previously, unsigned -1 size was returned for those bodies.
Old adapters relying on that buggy behavior will now throw:

  !"attempt to use unknown libecap::BodySize size"

Such adapters should check libecap::BodySize::known() before
using the libecap::Body::bodySize() value.

9 years agoAdd assigment and move operators to LockingPointer
Amos Jeffries [Mon, 21 Sep 2015 14:26:03 +0000 (07:26 -0700)] 
Add assigment and move operators to LockingPointer

These operators are required to use LockingPointer instances in STL
containers and unlike TidyPointer the LockingPointer can do them safely
due to the lock preventing premature deletions.

9 years agoCleanup: Migrate StoreEntry to using MEMPROXY_CLASS
Francesco Chemolli [Mon, 21 Sep 2015 14:02:38 +0000 (16:02 +0200)] 
Cleanup: Migrate StoreEntry to using MEMPROXY_CLASS

9 years agoImplement default constructor for hash_link.
Francesco Chemolli [Mon, 21 Sep 2015 13:48:18 +0000 (15:48 +0200)] 
Implement default constructor for hash_link.

9 years agoRemove custom pool chunk size for StoreEntry.
Francesco Chemolli [Mon, 21 Sep 2015 13:19:28 +0000 (15:19 +0200)] 
Remove custom pool chunk size for StoreEntry.

As an historic optimization StoreEntry uses a custom pool chunk size of 2MB.
Knowledge of the actual benefits from this optimization has been lost in time,
and it's not possible to accurately measure its actual impact in all load
scenarios; at the same time this optimization is blocking other potentially
useful developments.
This change is therefore considered a potential performance regression in
some load scenarios.

9 years agonegotiate_wrapper: Fix memory leaks
Amos Jeffries [Thu, 17 Sep 2015 23:48:47 +0000 (16:48 -0700)] 
negotiate_wrapper: Fix memory leaks

 Detected by Coverity Scan. Issues 13245641324565.

9 years agoPrep for 3.5.9
Amos Jeffries [Thu, 17 Sep 2015 12:43:20 +0000 (05:43 -0700)] 
Prep for 3.5.9

9 years agontlm_smb_lm_auth: ignore empty NTresponse field
Amos Jeffries [Thu, 17 Sep 2015 12:30:35 +0000 (05:30 -0700)] 
ntlm_smb_lm_auth: ignore empty NTresponse field

9 years agoBug 4309: Fix the presence of extensions detection in SSL Hello messages
Christos Tsantilas [Wed, 16 Sep 2015 08:43:18 +0000 (11:43 +0300)] 
Bug 4309: Fix the presence of extensions detection in SSL Hello messages

RFC5246 section 7.4.1.3 (Server Hello) says:

   The presence of extensions can be detected by determining whether
   there are bytes following the compression_method field at the end of
   the ServerHello.

Current parsing Hello code checks whether there are bytes in the whole SSL
message. It does not account for the fact that the message may contain more than
just ServerHello.
This patch fixes this issue and try to improve the related code to avoid related
problems in the future.

This is a Measurement Factory project

9 years agoauthor: Alex Rousskov <rousskov@measurement-factory.com>
Christos Tsantilas [Wed, 16 Sep 2015 08:40:32 +0000 (11:40 +0300)] 
author: Alex Rousskov <rousskov@measurement-factory.com>
Bug 4309: Squid crashed when Skype login

Do not assume that (char << 8) cannot overflow a short integer.
Be more consistent with storing certificate-related lengths.

9 years agoSourceFormat Enforcement
Source Maintenance [Mon, 14 Sep 2015 18:11:56 +0000 (18:11 +0000)] 
SourceFormat Enforcement

9 years agoSNI to ICAP via 2nd CONNECT part2
Christos Tsantilas [Mon, 14 Sep 2015 18:02:04 +0000 (21:02 +0300)] 
SNI to ICAP via 2nd CONNECT part2

Wrap inside #if USE_OPENSSL/#endif the SSL related code to allow squid build
when openSSL library is disabled.

9 years agoSNI to ICAP via 2nd CONNECT
Christos Tsantilas [Mon, 14 Sep 2015 17:00:19 +0000 (20:00 +0300)] 
SNI to ICAP via 2nd CONNECT

When Squid decides to splice a connection in the step2 SSL bumping step
sends a second fake CONNECT request to the ICAP/eCAP for adaptation.

This patch fixes squid to use the SNI information when sending the second
CONNECT request, if it is available.

This is a Measurement Factory project

9 years agoCrypto-NG: replace Ssl::X509_Pointer with Security::CertPointer
Amos Jeffries [Mon, 14 Sep 2015 16:25:05 +0000 (09:25 -0700)] 
Crypto-NG: replace Ssl::X509_Pointer with Security::CertPointer

* shuffle LockingPointer to libsecurity.la
  along with supporting macros in security/forward.h

* add GnuTLS and library agnostic definitions of Security::CertPointer

9 years agoPrevent username cache dislay showing double
Amos Jeffries [Sun, 13 Sep 2015 10:35:51 +0000 (03:35 -0700)] 
Prevent username cache dislay showing double

9 years agoMerged from trunk rev.14291
Amos Jeffries [Sat, 12 Sep 2015 11:40:36 +0000 (04:40 -0700)] 
Merged from trunk rev.14291

9 years agoFix uninitialized members in class HeaderTableRecord
Amos Jeffries [Fri, 11 Sep 2015 02:24:31 +0000 (19:24 -0700)] 
Fix uninitialized members in class HeaderTableRecord

 Detected by Coverity Scan. Issues 13237501323751

9 years agoBug 4292: negotiate_wrapper: Unreleased Resources
Amos Jeffries [Fri, 11 Sep 2015 02:16:06 +0000 (19:16 -0700)] 
Bug 4292: negotiate_wrapper: Unreleased Resources

FILE* handles need to be closed on exit. Shuffle the processing loop logics
to a static function to avoid code duplication from all the requires close
points.

Also, use the available global flag debug_enabled instead of local variable
to avoid having to pass it down explicitly.