]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
14 years agoBug 3441: Part 1: Minimize cache size corruption by malformed swap.state.
Alex Rousskov [Mon, 30 Jan 2012 17:13:52 +0000 (10:13 -0700)] 
Bug 3441: Part 1: Minimize cache size corruption by malformed swap.state.

If swap.state gets corrupted, a single entry with bogus size value will screw
up Squid idea of the current cache size. A newly added StoreSwapLogData sane()
method attempts to minimize the chance of corruption by ignoring log entries
with obviously bogus values.

However, without expensive size checks (-S or "Does the log entry matches the
actual cache file size?"), it is not possible to reliably detect all bogus log
entries.

If Squid gets a wrong idea of the current cache size, it may either cache too
much (and possibly run out of space) OR delete everything.

14 years agosslproxy_cert_sign squid.conf option
Christos Tsantilas [Fri, 27 Jan 2012 15:53:38 +0000 (17:53 +0200)] 
sslproxy_cert_sign squid.conf option

This option control how generated fake SSL certificates are signed.

Syntax:
  sslproxy_cert_sign <signing algorithm> acl ...

where <signing algorithm> can be one of the signTrusted, signUntrusted or
signSelf

Default signing algorithm if the sslproxy_cert_sign is not configured is
signSelf, if the server certificate is self signed, signUntrusted if the server
certificate is untrusted (ERR_INVALID_CA, ERR_SELF_SIGNED_CERT_IN_CHAIN,
ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE, ERR_UNABLE_TO_GET_ISSUER_CERT,
ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY and ERR_CERT_UNTRUSTED errors) and
signTrusted if the server certificate is trusted.

Notes:
  - The signing algorithm passed as parameter to the ssl_crtd daemon

  - A self signed certificate generated on squid startup to be used as
    signing certificate for untrusted certificates, with CN =
    "Squid CA for Untrusted Certificates"

  - The configured certificates with http(s)_port squid.conf option chained to
    the client SSL connection only when signTrusted signing algorithm selected.
    When the signing algorithm is signSelf or signUntrusted no other certificate
    send to the client browser.

  - A small bug fixed which did not allow the sslproxy_cert_adapt option
    to be enabled in squid if the icap client is not enabled

14 years agoBug 3268: remove wrong 'Ready to serve requests.' message
Amos Jeffries [Fri, 27 Jan 2012 13:41:01 +0000 (06:41 -0700)] 
Bug 3268: remove wrong 'Ready to serve requests.' message

14 years agoDNs changes obsoleted dns_v4_fallback
Amos Jeffries [Fri, 27 Jan 2012 12:45:06 +0000 (05:45 -0700)] 
DNs changes obsoleted dns_v4_fallback

14 years agoRestor mgr: default menu display
Amos Jeffries [Fri, 27 Jan 2012 12:28:26 +0000 (05:28 -0700)] 
Restor mgr: default menu display

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 27 Jan 2012 01:19:11 +0000 (18:19 -0700)] 
SourceFormat Enforcement

14 years agoNo need to require s->key to be set: s->cert is used instead when needed.
Alex Rousskov [Thu, 26 Jan 2012 21:32:25 +0000 (14:32 -0700)] 
No need to require s->key to be set: s->cert is used instead when needed.

14 years agoBug 3449: shm_open failed (part 4: fixing memory_cache_shared defaults)
Alex Rousskov [Thu, 26 Jan 2012 14:52:35 +0000 (07:52 -0700)] 
Bug 3449: shm_open failed (part 4: fixing memory_cache_shared defaults)

Properly initialize memory_cache_shared when not explicitly configured and
do not allocate shared memory segments if memory_cache_shared is off.

Prior to this change, shared memory was requested (during rrClaimMemoryNeeds)
before memory_cache_shared was initialized (during rrAfterConfig, unless
explicitly set in squid.conf). Moreover, MemStore::EntryLimit() calculation
ignored memory_cache_shared setting. All that resulted in an attempt to create
shared memory segments where none were needed or possible.

We now have a new Runners Registry (rrFinalizeConfig) that is dedicated to
finalizing complex configuration options, before those configurations options
are used to initialize modules, features, and services. As far as shared
memory is concerned, the initialization order is now:

  * rrFinalizeConfig: finalize memory_cache_shared if needed
  * rrClaimMemoryNeeds: request shared memory pages for the caches
  * rrAfterConfig: create shared memory segments

The same bug 3449 also needed a fix for shared segment paths (trunk r11961).

14 years agoBug 3268: Squid cannot do anything else during ufs/diskd rebuild
Alex Rousskov [Thu, 26 Jan 2012 04:51:21 +0000 (21:51 -0700)] 
Bug 3268: Squid cannot do anything else during ufs/diskd rebuild

Replaced 50-entries/step UFS rebuild logic with 50msec/step logic,
while also ensuring that other events can be processed between steps.

During a swap.state rebuild, progress reporting will now happen
every 4000 entries instead of every 0xFFF entries because humans do not
think in hex. Still no progress reporting for dirty rebuilds based on the
cache directory scans.

The code is based on Rock Store rebuild code. Eventually, the common rebuild
pacing logic among all stores should be merged to avoid code duplication.

Also removed RebuildState::next methods as unused. A copy-paste error?

14 years agoUse CbDataList to implement Ssl::Errors list
Christos Tsantilas [Tue, 24 Jan 2012 10:03:18 +0000 (12:03 +0200)] 
Use CbDataList to implement Ssl::Errors list

Convert type of Ssl::Errors from std::vector<ssl_error_t> to
CbDataList<Ssl::ssl_error_t>

14 years agoRenamed squid.h to squid-old.h and config.h to squid.h.
Francesco Chemolli [Sun, 22 Jan 2012 14:15:59 +0000 (15:15 +0100)] 
Renamed squid.h to squid-old.h and config.h to squid.h.

14 years agoFixed source-maintenance.sh
Francesco Chemolli [Sun, 22 Jan 2012 13:45:40 +0000 (14:45 +0100)] 
Fixed source-maintenance.sh

Updated guard against checking squid-old.h
Prevented checking libTrie as it uses its own config.h

14 years agoFixed typo in documentation.
Francesco Chemolli [Sun, 22 Jan 2012 11:12:00 +0000 (12:12 +0100)] 
Fixed typo in documentation.

14 years agoDisable OpenSSL SSL/TLS bug workarounds by default
Henrik Nordstrom [Sat, 21 Jan 2012 23:04:54 +0000 (00:04 +0100)] 
Disable OpenSSL SSL/TLS bug workarounds by default

On a closer inspection the set of "harmless" SSL/TLS bug workarounds
set by SSL_OP_ALL is not all of them harmless and reduces the SSL/TLS
strength to some attacks.

To revert to the older mode the ALL option can be set explicitly, but
it's better to understand which bug is encountered and enable only that
specific workaround if needed.

14 years agoRemoved some mentions of squid-old from the documentation.
Francesco Chemolli [Sat, 21 Jan 2012 17:11:05 +0000 (18:11 +0100)] 
Removed some mentions of squid-old from the documentation.

14 years agoSmall fixes.
Francesco Chemolli [Sat, 21 Jan 2012 17:06:38 +0000 (18:06 +0100)] 
Small fixes.

14 years agosslproxy_cert_adapt squid.conf option
Christos Tsantilas [Sat, 21 Jan 2012 10:11:43 +0000 (12:11 +0200)] 
sslproxy_cert_adapt squid.conf option

This patch add the sslproxy_cert_adapt option to squid.conf which gives to
squid administrators the required functionality to "fix" a known broken
certificate using acls.
Currently only the "Not After", "Not Before" and "Common Name" fields of a
certificate can be modified/fixed.

The sslproxy_cert_adapt option has the form:
   sslproxy_cert_adapt <adaptation algorithm> acl ...
where <adaptation algorithm> is one of the setValidAfter, setValidBefore and
setCommonName.

    setValidAfter: sets the "Not After" property to the signing cert's
                   "Not After" property.
    setValidBefore: sets the "Not Before" property to the signing cert's
                   "Not After" property.
    setCommonName: sets certificate Subject.CN property to the host name
                   from specified as a CN parameter (setCommonName{CN}) or,
                   if no explicit CN parameter was specified, extracted from
                   the CONNECT request

When the acl(s) match, the corresponding adaptation algorithm is applied to
the fake/generated certificate. Otherwise, the default mimicking action takes
place.

14 years agoFixed comment in source-maintenance.sh
Francesco Chemolli [Sat, 21 Jan 2012 08:08:51 +0000 (09:08 +0100)] 
Fixed comment in source-maintenance.sh

14 years agoClarified and corrected documentation.
Francesco Chemolli [Sat, 21 Jan 2012 08:06:33 +0000 (09:06 +0100)] 
Clarified and corrected documentation.

14 years agoDo not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses.
Alex Rousskov [Fri, 20 Jan 2012 23:28:14 +0000 (16:28 -0700)] 
Do not add HTTP 110 and 111 Warnings to TCP_REFRESH_UNMODIFIED responses.

The old "stale if hit" logic did not account for cases where the stored stale
response became fresh due to a successful revalidation with the origin server.
When the stored response was stale at the time of the request, we were adding
110 "Response is stale" and even 111 "Revalidation failed" Warning headers to
responses while logging TCP_REFRESH_UNMODIFIED, which is considered a hit.

14 years agoRenamed squid.h to squid-old.h and config.h to squid.h
Francesco Chemolli [Fri, 20 Jan 2012 18:55:04 +0000 (19:55 +0100)] 
Renamed squid.h to squid-old.h and config.h to squid.h

14 years agoRemove unnecessary stub_tools dependency on String
Francesco Chemolli [Fri, 20 Jan 2012 15:59:58 +0000 (16:59 +0100)] 
Remove unnecessary stub_tools dependency on String

14 years agoSourceFormat Enforcement
Automatic source maintenance [Fri, 20 Jan 2012 01:42:50 +0000 (18:42 -0700)] 
SourceFormat Enforcement

14 years agoMerge from StatHist refactor.
Francesco Chemolli [Thu, 19 Jan 2012 20:08:53 +0000 (21:08 +0100)] 
Merge from StatHist refactor.

Added StatHist unit tests, and moved algorithm consistency checks there.
Expanded storage for histograms to 64bit unsigned.
Inlined StatHist constructor, destructor and assignment operator.
Implemented stubs for StatHist.cc and mem.cc

14 years agoGCC 4.7 fix
Jiri Skala [Tue, 17 Jan 2012 19:36:40 +0000 (20:36 +0100)] 
GCC 4.7 fix

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 17 Jan 2012 01:39:21 +0000 (18:39 -0700)] 
SourceFormat Enforcement

14 years agoSend DNS A and AAAA queries in parallel
Henrik Nordstrom [Mon, 16 Jan 2012 17:30:16 +0000 (18:30 +0100)] 
Send DNS A and AAAA queries in parallel

This implements sending DNS A & AAAA queries in parallel by
creating "slave" idns_query requests. Current implementation
uses the A lookup as "master" and AAAA as "slave" query.

Long term this should probably be restructured to separate "lookup
state" and "query", or even better yet to defer the DNS lookups
until connect time and perform A respective AAAA as needed only and
not look up both before attemting to connect.

This also drops the dns_v4_fallback directive as it have no effect with
parallel DNS lookups. This directive should be reinstanciated in future
to enable pure IPv6 usage.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 14 Jan 2012 01:30:37 +0000 (18:30 -0700)] 
SourceFormat Enforcement

14 years agotrimMemory for unswappable objects: fix NullStoreEntry::trimMemory compile error
Christos Tsantilas [Fri, 13 Jan 2012 16:22:21 +0000 (18:22 +0200)] 
trimMemory for unswappable objects: fix NullStoreEntry::trimMemory compile error

14 years agotrimMemory for unswappable objects
Christos Tsantilas [Fri, 13 Jan 2012 13:49:26 +0000 (15:49 +0200)] 
trimMemory for unswappable objects

Inside StoreEntry::swapOut() the StoreEntry::trimMemory() method called to
release unused MemObjects memory. The trimMemory method must called for all
store entries, but current code blocks that call for not-swappable objects,
at least.

This patch trying to fix this bug implementing the following simple logic:
   {
     bool weAreOrMayBeSwappingOut =
           swappingOut() || mayStartSwapout();

     trimMemory(weAreOrMayBeSwappingOut);

     if (!weAreOrMayBeSwappingOut)
         return; // nothing else to do
   }

This is a Measurement Factory project

14 years agoLanguage: fr updates
Bernard [Thu, 12 Jan 2012 23:05:38 +0000 (12:05 +1300)] 
Language: fr updates

14 years agoCheck SSL server certificate on reconnect
Christos Tsantilas [Tue, 10 Jan 2012 10:41:18 +0000 (12:41 +0200)] 
Check SSL server certificate on reconnect

In the case where the squid-to-server connection closed and we re-connect to
server we need to check if the server certificate changed.

Moreover we need to check stored certificates with the web server certificate
to handle the case the web server certificate is updated. In this case a new
certificate must generated to mimic the updated server certificate fields

14 years agoBug 3472: segfault with the message "urlParse: URL too large"
Christos Tsantilas [Mon, 9 Jan 2012 14:34:31 +0000 (16:34 +0200)] 
Bug 3472: segfault with the message "urlParse: URL too large"

14 years agoBug 3471: Segfault when %la formating code used
Christos Tsantilas [Mon, 9 Jan 2012 14:31:50 +0000 (16:31 +0200)] 
Bug 3471: Segfault when %la formating code used

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 8 Jan 2012 01:35:32 +0000 (18:35 -0700)] 
SourceFormat Enforcement

14 years agoCleanup: update most of the existing stub files to use the STUB.h framework
Amos Jeffries [Sat, 7 Jan 2012 10:15:40 +0000 (03:15 -0700)] 
Cleanup: update most of the existing stub files to use the STUB.h framework

There are still several sections to be done. Including adding library API
stubs. However these are the ones which can be done immediately without
breaking or re-writing existing unit tests.

14 years agoDrop dns_v4_fallback directive as it have no effect with parallel DNS lookups
Henrik Nordstrom [Fri, 6 Jan 2012 20:41:21 +0000 (21:41 +0100)] 
Drop dns_v4_fallback directive as it have no effect with parallel DNS lookups

The change to perform A and AAAA lookups in parallel made dns_v4_fallback
no longer have any effect.

This directive should be reinstanciated in future to enable pure IPv6 usage.

14 years agoSend DNS A and AAAA queries in parallel
Henrik Nordstrom [Fri, 6 Jan 2012 20:30:35 +0000 (21:30 +0100)] 
Send DNS A and AAAA queries in parallel

This implements sending DNS A & AAAA queries in parallel by
creating "slave" idns_query requests. Current implementation
uses the A lookup as "master" and AAAA as "slave" query.

Long term this should probably be restructured to separate "lookup
state" and "query", or even better yet to defer the DNS lookups
until connect time and perform A respective AAAA as needed only and
not look up both before attemting to connect.

14 years agoBump-server-first fails with SQUID_X509_V_ERR_DOMAIN_MISMATCH error BumpSslServerFirst.take03
Christos Tsantilas [Fri, 6 Jan 2012 12:01:42 +0000 (14:01 +0200)] 
Bump-server-first fails with SQUID_X509_V_ERR_DOMAIN_MISMATCH error

When the bump-server-first used we do not always know the hostname of the server
we are connecting to. Thus the the hostname validity check for the
SSL server certificate will fail with SQUID_X509_V_ERR_DOMAIN_MISMATCH error.

This patch does not check if server certificate is valid for the hostname on
bump-server-first case and move this check after the http request received
from the web client

14 years agoPolish compat library xfree/xxfree
Amos Jeffries [Thu, 5 Jan 2012 14:12:04 +0000 (03:12 +1300)] 
Polish compat library xfree/xxfree

* remove xxfree() entirely it has been a useless wrapper for free_const()
  for some time now.

* update replace xfree() to a static inline function to permit better
  compiler optimization

14 years agoFix testRock SHM file base path
Amos Jeffries [Thu, 5 Jan 2012 14:02:06 +0000 (03:02 +1300)] 
Fix testRock SHM file base path

14 years agoBug 3449: pt3: shm_open can fail with a mangled path
Amos Jeffries [Wed, 4 Jan 2012 22:55:08 +0000 (11:55 +1300)] 
Bug 3449: pt3: shm_open can fail with a mangled path

14 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 4 Jan 2012 01:22:23 +0000 (18:22 -0700)] 
SourceFormat Enforcement

14 years agoSourceLayout: DNS component code style changes
Amos Jeffries [Tue, 3 Jan 2012 02:19:30 +0000 (19:19 -0700)] 
SourceLayout: DNS component code style changes

- removes "dnsserver" terminology from all the Squid internals and
  ./configure docs. Replacing it with "helper" to avoid confusion.

- updates the automake conditional to ENABLE_DNSHELPER and code define
  to USE_DNSHELPER inline with coding guidelines.

- shuffles the DNS API definitions to their own header, SquidDns.h, and
  de-duplicates the init/shutdown API calls to remove some #if

14 years agoFix diskd includes
Amos Jeffries [Sun, 1 Jan 2012 13:13:06 +0000 (06:13 -0700)] 
Fix diskd includes

It seems CentOS and BSD do not include errno.h and iostream through compat

14 years agoCleanup: unlinkd is self-contained
Amos Jeffries [Sun, 1 Jan 2012 04:48:49 +0000 (17:48 +1300)] 
Cleanup: unlinkd is self-contained

This helper is very minimal. It does not use IP:: or Ipc:: symbols.
If we get linkage issues against it for them those need to be resolved
without pulling in dependencies from squid internal libraries.

14 years agoCleanup: detatch diskd from squid.h
Amos Jeffries [Sat, 31 Dec 2011 19:57:53 +0000 (08:57 +1300)] 
Cleanup: detatch diskd from squid.h

14 years agoBug 3444: send authentication challenge from ssl_bump and url_rewrite_access
Amos Jeffries [Sat, 31 Dec 2011 04:54:06 +0000 (21:54 -0700)] 
Bug 3444: send authentication challenge from ssl_bump and url_rewrite_access

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 31 Dec 2011 01:26:10 +0000 (18:26 -0700)] 
SourceFormat Enforcement

14 years agoCache Manager migration support
Amos Jeffries [Fri, 30 Dec 2011 16:01:37 +0000 (05:01 +1300)] 
Cache Manager migration support

 * Add a little bit of XHR script to the CGI cachemgr front page which
probes each of the managed proxies for http:// and https:// capabilities
and produces web links to their internal managers.

 * Reserve the template name MGR_INDEX for use by cachemgr scripts.
But do not distribute any preset template. This allows manager apps to
provide their own static template with linked scripts and objects.

 * The error page system is updated to create a blanket message
indicating missing template instead of aborting Squid if a template is
not even installed.

14 years agoPolish: allow service of internal requests over reverse-proxy ports
Amos Jeffries [Fri, 30 Dec 2011 12:29:14 +0000 (01:29 +1300)] 
Polish: allow service of internal requests over reverse-proxy ports

There is no reason why a revers-proxy port cannot service Squid internal
requests as well as whatever domain is being accelerated.

Also, scan the https_port list same as http_port list now that the
structures have been normalized.

14 years agoCleanup: de-duplicate internal URL detection
Amos Jeffries [Fri, 30 Dec 2011 12:26:51 +0000 (01:26 +1300)] 
Cleanup: de-duplicate internal URL detection

14 years agoPolish: display ACL enumeration text in debugs
Amos Jeffries [Fri, 30 Dec 2011 12:06:21 +0000 (01:06 +1300)] 
Polish: display ACL enumeration text in debugs

Slightly hackish way to do it. But avoids ACCESS_ in some weird places
and makes the cache.log reading a lot more friendly.

14 years agoSupport Cross-Origin Requests for the cache manager API
Amos Jeffries [Fri, 30 Dec 2011 03:42:50 +0000 (16:42 +1300)] 
Support Cross-Origin Requests for the cache manager API

Now that tools are being implemented to access the cache manager via
http:// scheme we need to accomodate the browser XSS protection
mechanisms which limit XHR based scripts abilities.

This adds CORS headers to manager responses. Permitting XHR to view the
Server header (to detect squid version for known capabilities) and to
flag that the XHR request may need access to credentials for
authenticating with the manager.

This also closes the feature bug 3407 requesting we support the
non-standard "Origin:" header, which is used by the CORS mechanisms.

Future work:
  Support the OPTIONS request used by CORS to detect requirements before
  POSTing. We do not yet use POST in the Squid code so that is left until
  needed.

14 years agoSourceLayout: shuffel UserRequest into Auth:: namespace
Amos Jeffries [Fri, 30 Dec 2011 01:24:57 +0000 (18:24 -0700)] 
SourceLayout: shuffel UserRequest into Auth:: namespace

No logic changes, symbols and debug only.

* shuffle AuthUserRequest to Auth::UserRequest
* shuffle AuthBasicUserRequest to Auth::Basic::UserRequest
* shuffle AuthDigestUserRequest to Auth::Digest::UserRequest
* shuffle AuthNegotiateUserRequest to Auth::Negotiate::UserRequest
* shuffle AuthNTLMUserRequest to Auth::NTLM::UserRequest

* polish and add documentation for several parts of the hierarchy

* replace obsolete debugs() location texts

14 years agoBug 3461: build regression in IPFilter NAT
Amos Jeffries [Sun, 25 Dec 2011 04:40:36 +0000 (21:40 -0700)] 
Bug 3461: build regression in IPFilter NAT

14 years agoThe error pages of failed "ssl bump first" requests contains urls in the form: BumpSslServerFirst.take02
Christos Tsantilas [Thu, 22 Dec 2011 16:36:55 +0000 (18:36 +0200)] 
The error pages of failed "ssl bump first" requests contains urls in the form:
    ssl_peek://hosrtname:443
This patch fixes this problem adding code which creates a new fake HttpRequest
which is a clone of the "ssl_peek" request but sets the hostname to the CN
retrieved from server certificate and protocol to Https.
The fake HttpRequest object passed to the ErrorState object.

14 years agoImplement the Ssl::CommonHostName name to recurn the CN from a certificate,
Christos Tsantilas [Thu, 22 Dec 2011 15:23:33 +0000 (17:23 +0200)] 
Implement the Ssl::CommonHostName name to recurn the CN from a certificate,
suitable for use as a host name.
Use this function to set the ConnStateData::sslHostName in ConnStateData::httpsPeeked method

14 years agoBug 3370: external ACL sometimes skipping
Amos Jeffries [Thu, 22 Dec 2011 04:49:24 +0000 (17:49 +1300)] 
Bug 3370: external ACL sometimes skipping

Emit tag/user/log/message/pass details to the request in the case where
the external ACL entry has expired but within graceful revalidate period.

The result of this bug appears as incorrect matches later down the ACL
processing in any config relying on the external ACL output values.
Example; for bypassing auth login, or for filtering tagged traffic.

14 years agoPolish: better debugs for IPFilter NAT
Amos Jeffries [Wed, 21 Dec 2011 12:17:34 +0000 (01:17 +1300)] 
Polish: better debugs for IPFilter NAT

14 years agoCherry-picked trunk r11900: Bug 3433: Segfault closing SNMP BumpSslServerFirst.take01
Alex Rousskov [Wed, 21 Dec 2011 01:44:04 +0000 (18:44 -0700)] 
Cherry-picked trunk r11900: Bug 3433: Segfault closing SNMP

14 years agoForward a StoreEntry holding the bumped secure connection establishment
Christos Tsantilas [Tue, 20 Dec 2011 15:35:27 +0000 (17:35 +0200)] 
Forward a StoreEntry holding the bumped secure connection establishment
error page from the server-side code (which generates the error) to the
client-side code (which delays the error until the first encrypted
request comes). This allows Squid to display the error page to the user
(using secure connection) when bumping intercepted SSL connections. The
code still needs more polishing, including generating errors with host
names and not IP addresses (when possible).

The peeked server certificate is now stored in
ConnStateData::bumpErrorEntry. This allows us to mimic the certificate
of dropped server connections.

Load signing certificate and key when initializing a tproxy-enabled
https_port.

Fixed debugging when opening a peeking connection.

14 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 20 Dec 2011 01:47:48 +0000 (18:47 -0700)] 
SourceFormat Enforcement

14 years agoBug 3447: assertion failed: CommCalls.h:150: "dp"
Amos Jeffries [Mon, 19 Dec 2011 13:18:29 +0000 (06:18 -0700)] 
Bug 3447: assertion failed: CommCalls.h:150: "dp"

Detatch FD/connection close handlers from reliance on commCloseCbParams
some handlers use FdeCbParams and others are possible.

If the callback handler needs FD the call creator must save it in the
params at call construction time.

14 years agoCleanup: remove https_port_list type
Amos Jeffries [Mon, 19 Dec 2011 03:51:22 +0000 (16:51 +1300)] 
Cleanup: remove https_port_list type

* Complete the merger with http_port_list and remove the https-specific struct

* kept config file type for parser magics and backward compatibility

14 years agoLanguage: fr updates
Bernard [Sun, 18 Dec 2011 17:08:01 +0000 (06:08 +1300)] 
Language: fr updates

14 years agoLanguage: fr updates
Bernard [Sun, 18 Dec 2011 17:06:21 +0000 (06:06 +1300)] 
Language: fr updates

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sun, 18 Dec 2011 01:31:58 +0000 (18:31 -0700)] 
SourceFormat Enforcement

14 years agoImplemented and made public StatHist copy-constructor
Francesco Chemolli [Sat, 17 Dec 2011 21:23:14 +0000 (22:23 +0100)] 
Implemented and made public StatHist copy-constructor

14 years agoStatHist fixes
Francesco Chemolli [Sat, 17 Dec 2011 08:32:53 +0000 (09:32 +0100)] 
StatHist fixes

- added protection against self-assignment
- hid copy-constructor
- de-virtualized destructor

14 years agoCleanup: comm Timeout API
Amos Jeffries [Sat, 17 Dec 2011 03:42:43 +0000 (20:42 -0700)] 
Cleanup: comm Timeout API

* accept Comm::Connection when setting timeout
 - use commSetConnTimeout() now

* drop old cbdata wrapper function

* drop raw-FD timeout setting (unused)

14 years agoSourceFormat Enforcement
Automatic source maintenance [Sat, 17 Dec 2011 01:26:31 +0000 (18:26 -0700)] 
SourceFormat Enforcement

14 years agoCertificate mimicking
Christos Tsantilas [Fri, 16 Dec 2011 17:17:57 +0000 (19:17 +0200)] 
Certificate mimicking

This patch try to mimic true server certificate properties when generating
a fake SSL certificate for SslBump. If ssl_crtd is enabled, it receives the
true server certificate and mimic its properties. Otherwise, the certificate
mimicking code will run in the worker.

Currently the following properties mimicked: subject name, not before/after,
and subject alternate name.

14 years agoBug 3391: forwarded_for log functionality broken
Amos Jeffries [Fri, 16 Dec 2011 11:29:40 +0000 (00:29 +1300)] 
Bug 3391: forwarded_for log functionality broken

14 years agoMerge StatHist feature-branch:
Francesco Chemolli [Fri, 16 Dec 2011 11:15:22 +0000 (12:15 +0100)] 
Merge StatHist feature-branch:
- StatHist refactoring
- StatCounters untangling from global symbol table

14 years agoMerged from trunk
Francesco Chemolli [Fri, 16 Dec 2011 11:06:46 +0000 (12:06 +0100)] 
Merged from trunk

14 years agoBug 3391: raise cbdata lock limits
Amos Jeffries [Fri, 16 Dec 2011 09:10:02 +0000 (22:10 +1300)] 
Bug 3391: raise cbdata lock limits

In 3.2 it is now possible to have >64K simultaneous connections
referencing some permanent cbdata locked state (port, peer, acl etc)

14 years agoRenamed some StatHist private variables to avoid name clases.
Francesco Chemolli [Fri, 16 Dec 2011 06:04:45 +0000 (07:04 +0100)] 
Renamed some StatHist private variables to avoid name clases.

14 years agoMoved some more typedefs to StatHist.h
Francesco Chemolli [Thu, 15 Dec 2011 23:14:48 +0000 (00:14 +0100)] 
Moved some more typedefs to StatHist.h
Improved documentation
Removed squid.h include
Changed StatHist::operator= to almost be an actual assignment operator
Fixed findBin corner-case

14 years agoUse CN from the peeked certificate to generate a fake certificate.
Alex Rousskov [Thu, 15 Dec 2011 19:19:53 +0000 (12:19 -0700)] 
Use CN from the peeked certificate to generate a fake certificate.

14 years agoRenamed some fields to CamelCase.
Francesco Chemolli [Thu, 15 Dec 2011 16:32:38 +0000 (17:32 +0100)] 
Renamed some fields to CamelCase.

14 years agoBug 2519: ssl_bump + Authentication (LDAP Digest) issues
Christos Tsantilas [Thu, 15 Dec 2011 11:56:37 +0000 (13:56 +0200)] 
Bug 2519: ssl_bump + Authentication (LDAP Digest) issues

When the ssl_bump and authentication iare both enabled for an ssl-bumped port
all SSL enabled websites prompt the user for authentication information once
per FQDN.

Tis patch inherits the authentication info from the CONNECT request to the
sslbumped requests.

14 years agoUpdated (and made use of) stub_StatHist
Francesco Chemolli [Thu, 15 Dec 2011 07:21:26 +0000 (08:21 +0100)] 
Updated (and made use of) stub_StatHist

14 years agoUpdated (and made use of) stub_StatHist
Francesco Chemolli [Thu, 15 Dec 2011 07:01:07 +0000 (08:01 +0100)] 
Updated (and made use of) stub_StatHist

14 years agoPeek at the origin server SSL certificate when bumping intercepted HTTPS.
Alex Rousskov [Wed, 14 Dec 2011 18:24:29 +0000 (11:24 -0700)] 
Peek at the origin server SSL certificate when bumping intercepted HTTPS.

* Configuration changes:

Allow intercepted SSL connections to be bumped, in addition to the
tproxied SSL connections.

Honor and check ssl-bump flag in https_port. Earlier code apparently
assumed that the flag must be present in http_port and left
Ssl::TheGlobalContextStorage uninitialized if only https_port had the
flag.

* Client-side changes:

Added a new Ssl::ServerPeeker class to do client-side error handling
while peeking at the origin server certificate. Peeking is done at the
server-side. Server-side uses Store and store_client API to report
errors to the client-side. That works OK when the errors can be sent to
the client, but when we bump intercepted connections, the client does
not yet have a secure connection established with Squid so errors cannot
be sent (popular browsers do not display CONNECT-stage errors). Instead,
the errors must be accumulated and sent after the secure connection with
the client is established (in response to the first HTTP request on that
connection). Ssl::ServerPeeker needs work to support such accumulation.

Start Ssl::ServerPeeker job in ConnStateData::switchToHttps() and wait
for somebody to call the new ConnStateData::httpsPeeked() method back.
Needs more work to actually use the peeked certificate and handle
errors.

Changed ConnStateData::switchToHttps() profile to require destination
port number.  Without it, we cannot switch intercepted SSL connections
because they do not have a proper request structure that can supply port
details.

Polished pinned connection cleaning code: If our Comm close handler for
the pinned connection was called, do no try to remove the handler. If
the pinned connection was closed (e.g., by a server-side error), do not
try to close it again. If we already called unpinConnection(), do not
try to close the pinned connection again.

Do not assume we have a request when pinning a connection to the server.
Intercepted connections do not have requests at the connection pinning
stage.

* Server-side changes:

Bug 3243 (CVE 2009-0801: Bypass of browser same-origin access control in
intercepted communication) fix always created a new connection to the
origin server. I think it is safe (and possibly even safer!) to reuse a
pinned connection instead (if one is available). We now do that in the
new FwdState::selectPeerForIntercepted() method. If bump-server-first
does not reuse a pinned connection (left from certificate peeking),
Squid would be opening and closing to-server connections just to learn
the certificate, which is not kosher.

Added a new internal protocol type (PROTO_SSL_PEEK) to allow FwdState to
detect peeking requests and end processing after the certificate is
received (instead of proceeding with to httpStart()).

14 years agoAllow intercepted SSL connections to be bumped,
Alex Rousskov [Wed, 14 Dec 2011 17:59:23 +0000 (10:59 -0700)] 
Allow intercepted SSL connections to be bumped,
in addition to the tproxied SSL connections.

14 years agoNotice ssl-bump flag in https_port when determining whether to start ssl_crtd.
Alex Rousskov [Wed, 14 Dec 2011 17:44:20 +0000 (10:44 -0700)] 
Notice ssl-bump flag in https_port when determining whether to start ssl_crtd.

14 years agoBug 3448: 204 response problem in adaptation chains
Christos Tsantilas [Wed, 14 Dec 2011 14:41:49 +0000 (16:41 +0200)] 
Bug 3448: 204 response problem in adaptation chains

When the first ICAP service in a chain respond with 204 the next service
is aborted on Must(old_request->canonical) expression inside Adaptation::Icap::ModXact::encapsulateHead method.

Squid ICAP try to set the request::canonical member of the adapted request
inside Adaptation::Icap::ModXact::prepEchoing when the 204 response received.
The adapted.header->parse(..) call some lines after will set canonical member
to NULL.
This patch call the urlCanonical() function after parse() method
to build canonical member for the adapted request, instead of trying to copy
this member from the original request.

14 years agoDocumentation for StatHist
kinkie@squid-cache.org [Wed, 14 Dec 2011 07:35:43 +0000 (08:35 +0100)] 
Documentation for StatHist

14 years agoSome documentation for StatHist.
Francesco Chemolli [Tue, 13 Dec 2011 22:49:33 +0000 (23:49 +0100)] 
Some documentation for StatHist.
Protected the StatHist::init method.

14 years agoImplemented proper distructor for StatHist
Francesco Chemolli [Tue, 13 Dec 2011 18:24:47 +0000 (19:24 +0100)] 
Implemented proper distructor for StatHist
Started to add some documentation for StatHist.
Removed includes of config.h from header files.

14 years agoMerged from trunk
Francesco Chemolli [Tue, 13 Dec 2011 10:57:20 +0000 (11:57 +0100)] 
Merged from trunk

14 years agoRefactored statHistIntInit
Francesco Chemolli [Mon, 12 Dec 2011 16:46:49 +0000 (17:46 +0100)] 
Refactored statHistIntInit

14 years agoPrep for 3.2.0.14
Amos Jeffries [Mon, 12 Dec 2011 09:51:08 +0000 (02:51 -0700)] 
Prep for 3.2.0.14

14 years agoRefactored void statHistLogInit
Francesco Chemolli [Sun, 11 Dec 2011 12:10:22 +0000 (13:10 +0100)] 
Refactored void statHistLogInit
Started refactoring statHistEnumInit

14 years agoStatHist data members are now protected, not private.
Francesco Chemolli [Sat, 10 Dec 2011 22:02:17 +0000 (23:02 +0100)] 
StatHist data members are now protected, not private.
ported some clients from statHistLogInit to StatHist::logInit

14 years agoMade all StatHist data members private.
Francesco Chemolli [Sat, 10 Dec 2011 21:51:28 +0000 (22:51 +0100)] 
Made all StatHist data members private.

14 years agoFixed some more dead references to stats.
Francesco Chemolli [Sat, 10 Dec 2011 21:34:36 +0000 (22:34 +0100)] 
Fixed some more dead references to stats.

14 years agoRemoved extra symbol in StatCounters.cc object file.
Francesco Chemolli [Sat, 10 Dec 2011 17:01:25 +0000 (18:01 +0100)] 
Removed extra symbol in StatCounters.cc object file.

14 years agoMoved statCounter out of globals.h into own object file.
Francesco Chemolli [Sat, 10 Dec 2011 16:29:31 +0000 (17:29 +0100)] 
Moved statCounter out of globals.h into own object file.
Changed some operator++ from postfix to prefix.