]> git.ipfire.org Git - thirdparty/squid.git/log
thirdparty/squid.git
13 years agoRemoved kludge added to test writeCertAndPrivateKeyToMemory() failure bypass. BumpSslServerFirst.take06
Alex Rousskov [Thu, 8 Mar 2012 04:02:40 +0000 (21:02 -0700)] 
Removed kludge added to test writeCertAndPrivateKeyToMemory() failure bypass.

13 years agoDo not assert if we fail to compose ssl_crtd request. Do blocking generation.
Alex Rousskov [Thu, 8 Mar 2012 01:50:04 +0000 (18:50 -0700)] 
Do not assert if we fail to compose ssl_crtd request. Do blocking generation.

Users report assertions when OpenSSL fails to write a true server certificate
to to memory. Since that certificate is received from a 3rd party, we should
not assert that it is writeable. Besides, OpenSSL may have limitations/bugs
even if dealing with valid certificates.

If we fail to componse a request, we now try the good old blocking in-process
certificate generation.

Currently, it is not known what exactly causes OpenSSL to fail as we are
unable to trigger the assertion in a controlled test.

13 years agoMerged from trunk (r12082, v3.2.0.16+).
Alex Rousskov [Wed, 7 Mar 2012 23:33:53 +0000 (16:33 -0700)] 
Merged from trunk (r12082, v3.2.0.16+).

13 years agoBug 3397: do not mark connection as opened until after SYN-ACK
Amos Jeffries [Wed, 7 Mar 2012 22:54:00 +0000 (15:54 -0700)] 
Bug 3397: do not mark connection as opened until after SYN-ACK

assertion failed: comm.cc:1117: "isOpen(fd)" on FwdState destruct with
half-connected server. When the SYN was sent but ACK not yet received.

13 years agoBug 3509: kQueue compile error
Warren Baker [Wed, 7 Mar 2012 12:37:54 +0000 (05:37 -0700)] 
Bug 3509: kQueue compile error

13 years agoLanguage: pt_BR updates
Fred [Wed, 7 Mar 2012 05:07:40 +0000 (18:07 +1300)] 
Language: pt_BR updates

13 years agoBug 3458: Icon Serving (squid-internal-static) Broken
Alex Rousskov [Wed, 7 Mar 2012 02:32:24 +0000 (19:32 -0700)] 
Bug 3458: Icon Serving (squid-internal-static) Broken

13 years agoPrep for 3.2.0.16
Amos Jeffries [Wed, 7 Mar 2012 02:03:16 +0000 (19:03 -0700)] 
Prep for 3.2.0.16

13 years agoSourceFormat Enforcement
Automatic source maintenance [Wed, 7 Mar 2012 01:32:25 +0000 (18:32 -0700)] 
SourceFormat Enforcement

13 years agoBug 3420: Request body consumption races and theConsumer
Alex Rousskov [Wed, 7 Mar 2012 00:26:34 +0000 (17:26 -0700)] 
Bug 3420: Request body consumption races and theConsumer

13 years agoBug fix: ssl_crtd crashes when accessing HTTPS sites with a domain name exceeding...
Christos Tsantilas [Tue, 6 Mar 2012 20:38:31 +0000 (22:38 +0200)] 
Bug fix: ssl_crtd crashes when accessing HTTPS sites with a domain name exceeding 64 characters - Part 2

In the case of long domain and there is no CN to mimic set the CN to a wildcard
based on the long domain in the request if possible.

13 years agoCorrect DNS timeout handling.
Henrik Nordstrom [Mon, 5 Mar 2012 11:59:54 +0000 (12:59 +0100)] 
Correct DNS timeout handling.

The change to concurrent A & AAAA lookups did not handle timeouts
properly, resulting in segmentation faults.

The timeouts as such were also mismanaged, resulting in much longer
DNS timeouts than intended.

This also cleans up the API somewhat to use const for the result.

13 years agoDocument master/slave DNS query relation and search path processing
Henrik Nordstrom [Mon, 5 Mar 2012 11:36:38 +0000 (12:36 +0100)] 
Document master/slave DNS query relation and search path processing

13 years agoLanguage: fr updates
Bernard [Sun, 4 Mar 2012 23:12:44 +0000 (12:12 +1300)] 
Language: fr updates

13 years agoCorrect DNS timeout handling.
Henrik Nordstrom [Sun, 4 Mar 2012 22:24:58 +0000 (23:24 +0100)] 
Correct DNS timeout handling.

The change to concurrent A & AAAA lookups did not handle timeouts
properly, resulting in segmentation faults.

The timeouts as such were also mismanaged, resulting in much longer
DNS timeouts than intended.

This also cleans up the API somewhat to use const for the result.

13 years agoBreak out assignment from if clause to make code more readable (and gcc happier)
Henrik Nordstrom [Sun, 4 Mar 2012 18:50:13 +0000 (19:50 +0100)] 
Break out assignment from if clause to make code more readable (and gcc happier)

13 years agoLanguage: fr updates
Bernard [Sun, 4 Mar 2012 17:06:08 +0000 (06:06 +1300)] 
Language: fr updates

13 years agoBug 3457: Display TLS error details in ERR_SECURE_CONNECT_FAIL
Amos Jeffries [Sun, 4 Mar 2012 06:56:44 +0000 (23:56 -0700)] 
Bug 3457: Display TLS error details in ERR_SECURE_CONNECT_FAIL

13 years agopolish a little the latest "ssl_crtd crashes on long domain names" patch
Christos Tsantilas [Sat, 3 Mar 2012 06:30:56 +0000 (08:30 +0200)] 
polish a little the latest "ssl_crtd crashes on long domain names" patch

13 years agoBug fix: ssl_crtd crashes when accessing HTTPS sites with a domain name exceeding...
Christos Tsantilas [Sat, 3 Mar 2012 06:25:33 +0000 (08:25 +0200)] 
Bug fix: ssl_crtd crashes when accessing HTTPS sites with a domain name exceeding 64 characters

Squid tries to generate a certificate for long domain names, which is not
possible.
According to RFC 5280 (Section A.1), the common name length in a certificate
can be at most 64 characters. Therefore it is not possible to generate a valid
certificate with the above domain name as common name.
This patch does not allow use of common names longer than 64 bytes in
setCommonName adaptation algorithm. Also In the case the openssl fails to
read subject name from mimicking certificate does not set any subject to
generated certification. (currently ssl_crtd crashes).

13 years agoSimplify Ssl::ServerPeeker and renamed it to Ssl::ServerBump
Christos Tsantilas [Sat, 3 Mar 2012 06:19:04 +0000 (08:19 +0200)] 
Simplify Ssl::ServerPeeker and renamed it to Ssl::ServerBump

Currently, Ssl::ServerPeeker is a job that does virtually nothing and leaks on
SSL connection establishment errors. This patch convert this class convert this
class into a non-job class which ConnStateData use to maintain SSL
certificate peeking state.
The Ssl::ServerPeeker class renamed  to Ssl::ServerBump.
ConnStateData::bumpErrorEntry and ConnStateData::bumpSslErrorNoList and
ConnStateData::bumpServerCert now are members to the this class.

13 years agoBug 3503: DNS PTR queries timeout due to wrong QIDs.
Alex Rousskov [Fri, 2 Mar 2012 17:33:04 +0000 (10:33 -0700)] 
Bug 3503: DNS PTR queries timeout due to wrong QIDs.

Supply query ID (rather than zero) to rfc3596BuildPTRQuery*() calls.

This code was broken since trunk r11015 "Fixed DNS query leaks and increased
defense against DNS cache poisoning" dated 2010-11-03.

13 years agoPolish parse_address bracketing
Amos Jeffries [Fri, 2 Mar 2012 03:20:08 +0000 (20:20 -0700)] 
Polish parse_address bracketing

13 years agoRegression: snmp/udp address directives not resolving hostname
Amos Jeffries [Fri, 2 Mar 2012 02:02:45 +0000 (19:02 -0700)] 
Regression: snmp/udp address directives not resolving hostname

13 years agoBug fix: The '%I' formating code in error page shows '[unknown]' in the case of SQUID...
Christos Tsantilas [Wed, 29 Feb 2012 21:16:06 +0000 (23:16 +0200)] 
Bug fix: The '%I' formating code in error page shows '[unknown]' in the case of SQUID_X509_V_ERR_DOMAIN_MISMATCH error

Update the server ip address and server hostname in HttpRequest::hier object
in the case of SQUID_X509_V_ERR_DOMAIN_MISMATCH error to be used for %I field
of the generated error page

13 years agoBug fix: Current serial number generation code does not produce a stable serial numbe...
Christos Tsantilas [Wed, 29 Feb 2012 21:12:18 +0000 (23:12 +0200)] 
Bug fix: Current serial number generation code does not produce a stable serial number for self-signed certificates

Squid always send the signing certificate to the ssl_crtd daemon even for
self-signed certificates because the signing certificate may used for cert
adaptation algorithms. The ssl_crtd currently ignore the signing certificate
in the case of self-signed certificates. This is has as result to
use a random number as serial number of generated certificate.

This patch also use 0 as serial number of the temporary intermediate certificate
used to generate the final serial number of the certificate, in the case of
signing certificate is not given.

13 years agoBetter helper-to-Squid buffer size management.
Alex Rousskov [Wed, 29 Feb 2012 06:32:14 +0000 (23:32 -0700)] 
Better helper-to-Squid buffer size management.

The minimum buffer size is reduced from 8KB to 4KB after a squid-dev
discussion to prevent wasting of "several hundred KB of unused permanent
memory on some installations".

We now increase the buffer if we cannot parse the helper response message.

The maximum buffer size is now 32KB. This should be enough for all known
helper responses.

We now warn if the read buffer reaches its capacity and kill the offending
helper explicitly. An increase in maximum buffer capacity to 32KB should make
such events rare.

Motivation: ssl_crtd helper may produce responses exceeding 9907 bytes in size
(and possibly much larger if multiple chained certificates need to be returned
to Squid). The old helper.cc code would fill the read buffer completely,
schedule a read for zero bytes, receive zero bytes, declare an EOF condition,
and close the stream (which kills ssl_crtd).  Due to insufficient information
logged, the observable symptoms were pretty much the same as if ssl_crtd
closed the stream first, indicating a ssl_crtd bug.

13 years agoBug 3458: Icon Serving (squid-internal-static) Broken. BumpSslServerFirst.take05
Alex Rousskov [Wed, 29 Feb 2012 00:42:21 +0000 (17:42 -0700)] 
Bug 3458: Icon Serving (squid-internal-static) Broken.

The "trimMemory for unswappable objects" fix (trunk r11969,r11970) exposed
ENTRY_SPECIAL objects such as icons to memory trimming which they cannot
handle because Squid does not reload the missing parts of special objects.

Further testing showed that a special object may be cached in shared RAM
and/or might even be purged from all caches completely. This may explain why
icons eventually "disappear" in some environments.

We now treat special objects as not belonging to memory or disk Stores and do
not ask those Stores to manage them. This separation needs more work, but it
passes basic tests, and it is the right step towards creating a proper storage
dedicated to those objects.

13 years agoBetter helper-to-Squid buffer size management.
Alex Rousskov [Tue, 28 Feb 2012 23:45:23 +0000 (16:45 -0700)] 
Better helper-to-Squid buffer size management.

The minimum buffer size is reduced from 8KB to 4KB after a squid-dev
discussion to prevent wasting of "several hundred KB of unused permanent
memory on some installations".

We now increase the buffer if we cannot parse the helper response message.

The maximum buffer size is now 32KB. This should be enough for all known
helper responses.

We now warn if the read buffer reaches its capacity and kill the offending
helper explicitly. An increase in maximum buffer capacity to 32KB should make
such events rare.

Motivation: ssl_crtd helper may produce responses exceeding 9907 bytes in size
(and possibly much larger if multiple chained certificates need to be returned
to Squid). The old helper.cc code would fill the read buffer completely,
schedule a read for zero bytes, receive zero bytes, declare an EOF condition,
and close the stream (which kills ssl_crtd).  Due to insufficient information
logged, the observable symptoms were pretty much the same as if ssl_crtd
closed the stream first, indicating a ssl_crtd bug.

13 years agoLanguage: hu updates
Gergely [Tue, 28 Feb 2012 23:12:47 +0000 (12:12 +1300)] 
Language: hu updates

13 years agoMerged from trunk (r12065, v3.2.0.15+).
Alex Rousskov [Tue, 28 Feb 2012 22:05:25 +0000 (15:05 -0700)] 
Merged from trunk (r12065, v3.2.0.15+).

13 years agoRemoved changes causing ssl_bump to deny requests instead of denying bumping.
Alex Rousskov [Tue, 28 Feb 2012 21:50:57 +0000 (14:50 -0700)] 
Removed changes causing ssl_bump to deny requests instead of denying bumping.

See Squid bug 3444 discussion.

13 years agoBug 3502: client timeout uses server-side read_timeout, not request_timeout
HONDA Hirofumi [Tue, 28 Feb 2012 17:52:21 +0000 (10:52 -0700)] 
Bug 3502: client timeout uses server-side read_timeout, not request_timeout

I have also adjusted request_timeout description in squid.conf to clarify that
request_timeout applies to receiving complete HTTP request headers and not
just the first header byte. We reset the connection timeout to
clientLifetimeTimeout after parsing request headers.

https_port was correctly using Config.Timeout.request already.

13 years agoLanguage: hu updates
Gergely [Tue, 28 Feb 2012 11:06:07 +0000 (00:06 +1300)] 
Language: hu updates

13 years agoMade idnsSendSlaveAAAAQuery() debug label differ from that of idnsALookup().
Alex Rousskov [Tue, 28 Feb 2012 01:34:35 +0000 (18:34 -0700)] 
Made idnsSendSlaveAAAAQuery() debug label differ from that of idnsALookup().

13 years agoBug 3497: Bad ssl_crtd db size file causes infinite loop.
Alex Rousskov [Tue, 28 Feb 2012 00:30:47 +0000 (17:30 -0700)] 
Bug 3497: Bad ssl_crtd db size file causes infinite loop.

The db size file may become empty when Squid runs out of disk space. Ignoring
db size reading errors led to bogus db sizes used as looping condition. This
fix honors reading errors and also terminates the loop when no more
certificates can be removed. Both errors and removal failure are fatal to
ssl_crtd.

A positive side-effect of this fix is one less call to the relatively
expensive file-reading size()/readSize() methods under normal conditions.

I also removed "minimum db size" check because it did not seem to be in sync
with other ssl_crtd parameters such as fs block size and because its overall
purpose was unclear. The check was also removed by the original bug reporter.

TODO: Remaining problems include: ssl_crtd should not exit just because it
cannot write something to disk. A proper reporting/debugging API is missing.

Same as trunk r12062.

13 years agoBug 3497: Bad ssl_crtd db size file causes infinite loop.
Guy Helmer [Tue, 28 Feb 2012 00:22:38 +0000 (17:22 -0700)] 
Bug 3497: Bad ssl_crtd db size file causes infinite loop.

The db size file may become empty when Squid runs out of disk space. Ignoring
db size reading errors led to bogus db sizes used as looping condition. This
fix honors reading errors and also terminates the loop when no more
certificates can be removed. Both errors and removal failure are fatal to
ssl_crtd.

A positive side-effect of this fix is one less call to the relatively
expensive file-reading size()/readSize() methods under normal conditions.

I also removed "minimum db size" check because it did not seem to be in sync
with other ssl_crtd parameters such as fs block size and because its overall
purpose was unclear. The check was also removed by the original bug reporter.

TODO: Remaining problems include: ssl_crtd should not exit just because it
cannot write something to disk. A proper reporting/debugging API is missing.

13 years agoWhen there is an error and we know the intended server name from CONNECT
Christos Tsantilas [Mon, 27 Feb 2012 17:17:09 +0000 (19:17 +0200)] 
When there is an error and we know the intended server name from CONNECT
request, we should use that name for the CN in the fake certificate instead
of mimicking the received true server certificate CN.

13 years agoLog '-' on requests with no Referer or User-Agent headers
Amos Jeffries [Mon, 27 Feb 2012 10:03:03 +0000 (03:03 -0700)] 
Log '-' on requests with no Referer or User-Agent headers

This data is actually meaningful for the analysis of client behaviour.

squid-dev have agreed that it is worth removing the old log behaviour of
omitting these entries.

13 years agoBug 3490: Crash writing Apache Common logs
Amos Jeffries [Mon, 27 Feb 2012 09:57:02 +0000 (02:57 -0700)] 
Bug 3490: Crash writing Apache Common logs

13 years agoLanguage: hu updates
Gergely [Sun, 26 Feb 2012 11:05:56 +0000 (00:05 +1300)] 
Language: hu updates

13 years agoLanguage: hu updates
Gergely [Sun, 26 Feb 2012 05:05:39 +0000 (18:05 +1300)] 
Language: hu updates

13 years agoLanguage: hu updates
Gergely [Sat, 25 Feb 2012 23:06:00 +0000 (12:06 +1300)] 
Language: hu updates

13 years agoFixed comment: We mimic alias even when using a configured CN.
Alex Rousskov [Sat, 25 Feb 2012 19:29:46 +0000 (12:29 -0700)] 
Fixed comment: We mimic alias even when using a configured CN.

13 years agoLanguage: hu updates
Gergely [Sat, 25 Feb 2012 17:05:50 +0000 (06:05 +1300)] 
Language: hu updates

13 years agoMark requests on re-pinned connections to avoid them being pconnPush()ed
Alex Rousskov [Sat, 25 Feb 2012 16:44:36 +0000 (09:44 -0700)] 
Mark requests on re-pinned connections to avoid them being pconnPush()ed
causing "fd_table[conn->fd].halfClosedReader != NULL" comm assertions later.

Forward.cc comments imply that request->flags.pinned is set by ConnStateData
but that is a lie. The flag is set by forward.cc itself. It was set for PINNED
peers having a valid pinned connection only. When we retry a pinned pconn
race, we still have a PINNED peer but the failed connection prevents us from
setting the flag. If we successfuly re-pin later, we must set the flag.

request->flags.pinned essentially means "the connection is or should be
pinned".

13 years agoSsl::ServerPeeker must become a store_client to prevent [error] entry trimming
Alex Rousskov [Fri, 24 Feb 2012 22:29:40 +0000 (15:29 -0700)] 
Ssl::ServerPeeker must become a store_client to prevent [error] entry trimming

We do not need a store client during the certificate peeking stage because we
do not send the error to the client and only accumulate what is being written
to the store. However, if there is no store client then Store will trim the
entry and we will hit a

  store_client.cc:198: "entry->swap_filen > -1 || entry->swappingOut()"

assertion when we finally try to use it to serve the error response.

13 years agoclientReplyContext::setReplyToStoreEntry() must lock the entry
Alex Rousskov [Fri, 24 Feb 2012 22:28:33 +0000 (15:28 -0700)] 
clientReplyContext::setReplyToStoreEntry() must lock the entry

because clientReplyContext destructors always unlocks it via
removeClientStoreReference().

13 years agoConnStateData::bumpSslErrorNoList define only when SSL is enabled
Christos Tsantilas [Fri, 24 Feb 2012 19:41:15 +0000 (21:41 +0200)] 
ConnStateData::bumpSslErrorNoList define only when SSL is enabled

13 years agoRemoved IFDEF macro debugging.
Alex Rousskov [Fri, 24 Feb 2012 18:47:57 +0000 (11:47 -0700)] 
Removed IFDEF macro debugging.

13 years agoLanguage: en updates
Amos [Fri, 24 Feb 2012 17:06:43 +0000 (06:06 +1300)] 
Language: en updates

13 years agoLanguage: en updates
Amos [Fri, 24 Feb 2012 17:05:43 +0000 (06:05 +1300)] 
Language: en updates

13 years agoMerge from trunk
Christos Tsantilas [Fri, 24 Feb 2012 13:17:24 +0000 (15:17 +0200)] 
Merge from trunk

13 years agoAssert that the serial number for generated certificates
Christos Tsantilas [Fri, 24 Feb 2012 09:20:19 +0000 (11:20 +0200)] 
Assert that the serial number for generated certificates
does not exceed 20 bytes

13 years agoLanguage: fr updates
Bernard [Thu, 23 Feb 2012 23:06:10 +0000 (12:06 +1300)] 
Language: fr updates

13 years agoBug fix: setCommonName and alternative names
Christos Tsantilas [Thu, 23 Feb 2012 19:51:38 +0000 (21:51 +0200)] 
Bug fix: setCommonName and alternative names

setCommonName sets CN, but that is not enough when the fake certificate containsalternative names (which Squid mimics): The browser does not accept the
resulting fake certificate because it does not contains at least one alternativename that matches the domain name.

This patch stop mimicking of "Certificate Subject Alt Name" extensions when the
setCommonName adaptation algorithm used

13 years agoCertificate for error messages
Christos Tsantilas [Thu, 23 Feb 2012 19:48:07 +0000 (21:48 +0200)] 
Certificate for error messages

If a certificate verification error is honored by Squid (i.e., a Squid error
page is returned to the user), the user gets a browser warning and then, after
ignoring the warning, the squid error message (about the same kind of problem). This happens because the fake certificate mimics details of the true server
certificate, which is "broken".

When Squid serves its own error page it is no longer trying to hide its presencefrom the user. Thus, it is probably better to serve all Squid-generated SSL
handshake and validation error responses with a trusted certificate containing
minimal details, like we already do for the DNS_FAIL errors.

This patch fixing the above problem.

NOTE: The fix will not work for domain mismatch errors. We are checking
for domain mismatch after we have establish the SSL connection with the web
client , and after we got the http request, because we need the HTTP request
Host header to check for SSL domain mismatch errors.

13 years agostable certificates part3
Christos Tsantilas [Wed, 22 Feb 2012 14:03:43 +0000 (16:03 +0200)] 
stable certificates part3

 - Handle the case the signing certificate changed. The ssl_crtd daemon
   must drop cached certificates which has signed with older signing
   certificates and generate new one using the current signing certificate

 - We need to generate certificates with different serial numbers, if the
   signing certificate has changes in any way, even if the certificates has
   exactly the same fields.
   To achieve this we are firstly generating a temporary fake certificate with
   serial number the hash digest of signing certificates public key. The digest
   of the temporary fake certificate used as serial key to the final certificate

 - Bug fix: A cached certificate which has adaptated with one or more algorithms
   (setNotAfter, setNotBefore, setCommonName etc) did not used and always a new
   certificate generated. This patch fixes this bug.

Notes:
  - Ssl::ssl_match_certificates replaced with Ssl::certificateMatchesProperties
    function which checks if a given certificate matches given properties:
    Checks if the certificate signed with current signing certificate, and
    check if mimicked certificate matches the given certificate.
  - The Ssl::CertificateDb::purgeCert method added to delete a certificate from
    database.

13 years agostable certificates part2
Christos Tsantilas [Tue, 21 Feb 2012 17:25:53 +0000 (19:25 +0200)] 
stable certificates part2

Two different certificates of the same fake Issuer must have the same serial
number. Otherwise, Firefox and possibly others will display a
sec_error_reused_issuer_and_serial error. Similarly, the same two certificates
should have the same serial number, even if generated on different
non-communicating (but identically configured) Squid boxes.

To produce unique serial numbers a temporary fake certificate with serial number
zero created, and its fingerprint used as the serial number of the final fake
certificate.

The old Ssl::CertificateDb code which was responsible to produce a serial number
for generated certificates removed.

13 years agoBug fix: sslpassword_program for ssl-bump http ports
Christos Tsantilas [Tue, 21 Feb 2012 16:49:23 +0000 (18:49 +0200)] 
Bug fix: sslpassword_program for ssl-bump http ports

Currently the sslpassword_program configuration parameter does not work
for encrypted certificate keys on ssl-bump enabled http ports, and user
always asked to give the SSL key password.

This patch fixes this problem.

This is a Measurement Factory project.

13 years agoFix IPv6 site-local IP detection
Amos Jeffries [Tue, 21 Feb 2012 09:59:51 +0000 (22:59 +1300)] 
Fix IPv6 site-local IP detection

RFC 4193 the site-local allocated range is fc00::/7.

Squid has been using IN6_IS_ADDR_SITELOCAL() but it turns out Linux and
OpenBSD at least still define that to test for the long obsolete fec0::/10.

13 years agoSourceFormat Enforcement
Automatic source maintenance [Tue, 21 Feb 2012 02:00:15 +0000 (19:00 -0700)] 
SourceFormat Enforcement

13 years agoFixed Ssl::CrtdMessage::parseRequest(properties, error) profile
Alex Rousskov [Mon, 20 Feb 2012 21:40:59 +0000 (14:40 -0700)] 
Fixed Ssl::CrtdMessage::parseRequest(properties, error) profile
to allow this method to return error texts using its second argument.

Polished error formatting.

13 years agoUse broken instead of a peer certificate info for error detail formatting.
Alex Rousskov [Mon, 20 Feb 2012 21:05:28 +0000 (14:05 -0700)] 
Use broken instead of a peer certificate info for error detail formatting.

This change has no visible effect when the peer certificate is a broken one.

Eventually, we may have to add more formatting codes to give admin access to
both peer and broken certificate details, but it may be difficult to use such
two sets of formatting codes on one static error page that does not "know"
whether the peer certificate is broken.

13 years agoRetry requests that failed due to a persistent connection race
Alex Rousskov [Mon, 20 Feb 2012 19:32:58 +0000 (12:32 -0700)] 
Retry requests that failed due to a persistent connection race
instead of replying with ERR_ZERO_SIZE_OBJECT "Bad Gateway".

Trunk r12050 code contains a portion of these changes. The rest is code
to re-pin a bump-server-first connection if a bumped pinned pconn fails
due to a race. We use a new canRePin flag to mark connections that can
be repinned and assume that pinned connections unrelated to SslBump
cannot be repinned.

13 years agoRetry requests that failed due to a persistent connection race
Alex Rousskov [Mon, 20 Feb 2012 19:10:54 +0000 (12:10 -0700)] 
Retry requests that failed due to a persistent connection race
instead of replying with ERR_ZERO_SIZE_OBJECT "Bad Gateway".

The ERR_ZERO_SIZE_OBJECT errors were visible to the client when the
destination had only one address because serverDestinations.shift()
made the list of destination empty and startConnectionOrFail() failed.

When FwdState starts to use a pinned connection, the connection is treated as
an idle persistent connection as far as race detection is concerned.
Currently, pinned connections cannot be reopened, repinned, and retried after
a pconn race. This will change when server-side bumped connections become
pinned.

It felt wrong that a failed serverConn may remain set while we are opening a
new connection so I set it to NULL after a squid-dev discussion indicating
that doing so should be safe.

We also now reset the local port number to zero in case it was set to the
actual source port by ConnOpener or other code working with the previous
connection to the same serverDestinations[0] address, although simple tests
worked (and showed changing source port) without this reset.

13 years agoBug fix: sslpassword_program for ssl-bump http ports
Christos Tsantilas [Mon, 20 Feb 2012 18:07:29 +0000 (20:07 +0200)] 
Bug fix: sslpassword_program for ssl-bump http ports

Currently the sslpassword_program configuration parameter does not work
for encrypted certificate keys on ssl-bump enabled http ports, and user
always asked to give the SSL key password.

This patch fixes this problem.

This is a Measurement Factory project.

13 years agoBug 3490: Crash writing Referer/Username logs
Amos Jeffries [Mon, 20 Feb 2012 08:56:41 +0000 (01:56 -0700)] 
Bug 3490: Crash writing Referer/Username logs

13 years agoRFC 2518 obsoleted by RFC 4918
Amos Jeffries [Sat, 18 Feb 2012 02:03:38 +0000 (19:03 -0700)] 
RFC 2518 obsoleted by RFC 4918

13 years agoSupport CoAP-over-HTTP
Amos Jeffries [Fri, 17 Feb 2012 09:01:51 +0000 (02:01 -0700)] 
Support CoAP-over-HTTP

Make Squid happy with HTTP requests using coap:// and coaps:// URI.

No gateway or other interaction with CoAP is enabled by this patch.

13 years agostable certificates part1
Christos Tsantilas [Thu, 16 Feb 2012 20:00:16 +0000 (22:00 +0200)] 
stable certificates part1

Changes to make fake certificates "stable" and "unique".

This patch modify bump-server-first branch to:

- use configured trusted CA private key for generating all fake certificates,
 including trusted, untrusted, and self-signed fake certificates.

- use untrusted CA certificate which be deterministically derived from
 the trusted CA certificate to both reduce configuration effort (compared to
 a configuration option) and to generate identical untrusted CA certificates
 given identical Squid configurations.

13 years agoBug 3324: loadFromFile: parse error while reading template file
Alex Rousskov [Thu, 16 Feb 2012 04:23:15 +0000 (21:23 -0700)] 
Bug 3324: loadFromFile: parse error while reading template file

Do not store and later use a pointer to a temporary String buffer.
HttpHeader::getByName() returns a temporary String.

13 years agoTranslation: add basic_getpwnam_auth manual
Amos Jeffries [Tue, 14 Feb 2012 05:26:50 +0000 (18:26 +1300)] 
Translation: add basic_getpwnam_auth manual

13 years agoDrop redundant fde.h include
Amos Jeffries [Tue, 14 Feb 2012 05:20:16 +0000 (18:20 +1300)] 
Drop redundant fde.h include

13 years agoFix CommIO missing includes
Amos Jeffries [Sun, 12 Feb 2012 13:15:51 +0000 (06:15 -0700)] 
Fix CommIO missing includes

13 years agoDrop old keep-alive hack for Netscape
Amos Jeffries [Fri, 10 Feb 2012 03:30:02 +0000 (20:30 -0700)] 
Drop old keep-alive hack for Netscape

13 years agoDo not cache partially loaded entries in shared mem cache (and then serve them)
Alex Rousskov [Fri, 10 Feb 2012 00:32:44 +0000 (17:32 -0700)] 
Do not cache partially loaded entries in shared mem cache (and then serve them)

When handling a conditional request, Squid may load the beginning of a cached
object from disk, realize that the client has the same fresh copy, and respond
with 304 Not Modified. After that, Squid was checking whether the partially
loaded object should be kept in shared memory cache (if enabled). There were
no checks preventing memory caching of the partially loaded object.

Later, partially cached objects were served to clients, resulting in truncated
responses. I believe this happens because shared memory cache does not keep
all the StoreEntry data (just like a disk cache does not do that) so the fact
that only a part of the object was available was lost.

13 years agoDo not swap out swapped out objects.
Alex Rousskov [Fri, 10 Feb 2012 00:01:17 +0000 (17:01 -0700)] 
Do not swap out swapped out objects.

I noticed that sometimes Squid would start swapping out an entry that was
recently loaded from disk and was still on disk. That wastes disk
resources (at best).

The old StoreEntry::mayStartSwapOut() code assumed that when swap_status is
not SWAPOUT_NONE it is SWAPOUT_WRITING, but SWAPOUT_WRITING is impossible
after recent StoreEntry::swapOut() modifications because mayStartSwapOut() is
only called when we are not swappingOut() already. SWAPOUT_DONE is possible.

13 years agoDrop dead code in reply parsing
Amos Jeffries [Thu, 9 Feb 2012 13:27:51 +0000 (06:27 -0700)] 
Drop dead code in reply parsing

This code has not been used/needed in some time. It can die.

It is also no clear why it existed in the first place. The RFC is not
mentioned by number and RFC 2068/2616 only talk about tolerance for
whitespace before request lines, not replies.

13 years agoBug 3490: part 1: SegFault opening FTP active data connections
Amos Jeffries [Wed, 8 Feb 2012 22:55:23 +0000 (11:55 +1300)] 
Bug 3490: part 1: SegFault opening FTP active data connections

13 years agoLanguage: zh_TW updates
Anonymous Pootle User [Mon, 6 Feb 2012 17:13:38 +0000 (06:13 +1300)] 
Language: zh_TW updates

13 years agoLanguage: zh_CN updates
Anonymous Pootle User [Mon, 6 Feb 2012 17:12:01 +0000 (06:12 +1300)] 
Language: zh_CN updates

13 years agoLanguage: uk updates
Anonymous Pootle User [Mon, 6 Feb 2012 17:10:31 +0000 (06:10 +1300)] 
Language: uk updates

13 years agoLanguage: tr updates
Anonymous Pootle User [Mon, 6 Feb 2012 17:08:53 +0000 (06:08 +1300)] 
Language: tr updates

13 years agoLanguage: sv updates
Anonymous Pootle User [Mon, 6 Feb 2012 17:07:14 +0000 (06:07 +1300)] 
Language: sv updates

13 years agoLanguage: sr_LT updates
Bratislav [Mon, 6 Feb 2012 17:05:52 +0000 (06:05 +1300)] 
Language: sr_LT updates

13 years agoLanguage: sl updates
Aleksa [Mon, 6 Feb 2012 11:57:57 +0000 (00:57 +1300)] 
Language: sl updates

13 years agoLanguage: sk updates
helix84 [Mon, 6 Feb 2012 11:56:50 +0000 (00:56 +1300)] 
Language: sk updates

13 years agoLanguage: ru updates
Amos [Mon, 6 Feb 2012 11:55:20 +0000 (00:55 +1300)] 
Language: ru updates

13 years agoLanguage: ro updates
Arthur [Mon, 6 Feb 2012 11:53:56 +0000 (00:53 +1300)] 
Language: ro updates

13 years agoLanguage: pt updates
Anonymous Pootle User [Mon, 6 Feb 2012 11:52:36 +0000 (00:52 +1300)] 
Language: pt updates

13 years agoLanguage: pt_BR updates
Amos [Mon, 6 Feb 2012 11:51:11 +0000 (00:51 +1300)] 
Language: pt_BR updates

13 years agoLanguage: pl updates
Anonymous Pootle User [Mon, 6 Feb 2012 11:49:50 +0000 (00:49 +1300)] 
Language: pl updates

13 years agoLanguage: nl updates
Amos [Mon, 6 Feb 2012 11:48:35 +0000 (00:48 +1300)] 
Language: nl updates

13 years agoLanguage: lt updates
Anonymous Pootle User [Mon, 6 Feb 2012 11:47:21 +0000 (00:47 +1300)] 
Language: lt updates

13 years agoLanguage: ko updates
Anonymous Pootle User [Mon, 6 Feb 2012 11:45:24 +0000 (00:45 +1300)] 
Language: ko updates

13 years agoLanguage: ja updates
Anonymous Pootle User [Mon, 6 Feb 2012 11:43:59 +0000 (00:43 +1300)] 
Language: ja updates

13 years agoLanguage: it updates
Francesco [Mon, 6 Feb 2012 11:42:23 +0000 (00:42 +1300)] 
Language: it updates

13 years agoLanguage: hy updates
Arthur [Mon, 6 Feb 2012 11:40:54 +0000 (00:40 +1300)] 
Language: hy updates

13 years agoLanguage: hu updates
Amos [Mon, 6 Feb 2012 11:39:28 +0000 (00:39 +1300)] 
Language: hu updates