]> git.ipfire.org Git - ipfire-2.x.git/blob - src/patches/squid/squid-3.5-14113.patch
squid 3.5.22: latest patches (14103-14113)
[ipfire-2.x.git] / src / patches / squid / squid-3.5-14113.patch
1 ------------------------------------------------------------
2 revno: 14113
3 revision-id: squid3@treenet.co.nz-20161115075728-2xj2621oh5bwn8wn
4 parent: squid3@treenet.co.nz-20161114124051-s0vzoj5exv5g8w56
5 committer: Amos Jeffries <squid3@treenet.co.nz>
6 branch nick: 3.5
7 timestamp: Tue 2016-11-15 20:57:28 +1300
8 message:
9 TLS: Make key= before cert= an error instead of quietly hiding the issue
10
11 This squid.conf setup is fatal in Squid-4. So best to fix these installations.
12 Even though Squdi-3 can cope with it.
13 ------------------------------------------------------------
14 # Bazaar merge directive format 2 (Bazaar 0.90)
15 # revision_id: squid3@treenet.co.nz-20161115075728-2xj2621oh5bwn8wn
16 # target_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
17 # testament_sha1: a18738f4cbf0c1bd368e61d4b19c5d6f5005b919
18 # timestamp: 2016-11-15 07:58:39 +0000
19 # source_branch: http://bzr.squid-cache.org/bzr/squid3/3.5
20 # base_revision_id: squid3@treenet.co.nz-20161114124051-\
21 # s0vzoj5exv5g8w56
22 #
23 # Begin patch
24 === modified file 'src/cache_cf.cc'
25 --- src/cache_cf.cc 2016-09-23 11:11:48 +0000
26 +++ src/cache_cf.cc 2016-11-15 07:57:28 +0000
27 @@ -2257,6 +2257,9 @@
28 safe_free(p->sslcert);
29 p->sslcert = xstrdup(token + 8);
30 } else if (strncmp(token, "sslkey=", 7) == 0) {
31 + if (!p->sslcert) {
32 + debugs(3, DBG_CRITICAL, "ERROR: " << cfg_directive << ": sslcert= option must be set before sslkey= is used.");
33 + }
34 safe_free(p->sslkey);
35 p->sslkey = xstrdup(token + 7);
36 } else if (strncmp(token, "sslversion=", 11) == 0) {
37 @@ -3729,6 +3732,9 @@
38 safe_free(s->cert);
39 s->cert = xstrdup(token + 5);
40 } else if (strncmp(token, "key=", 4) == 0) {
41 + if (!s->cert) {
42 + debugs(3, DBG_CRITICAL, "ERROR: " << cfg_directive << ": cert= option must be set before key= is used.");
43 + }
44 safe_free(s->key);
45 s->key = xstrdup(token + 4);
46 } else if (strncmp(token, "version=", 8) == 0) {
47