<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
-----BEGIN PGP SIGNED MESSAGE----- <br>
Hash: SHA256 <br>
<br>
With intermediate certificates better to use
sslproxy_foreign_intermediate_certs for many reasons:<br>
<br>
1. sslproxy_foreign_intermediate_certs not treated as trusted root
CA's. They only uses for complete certificate chain.<br>
<br>
2. Intermediate CA's most often has relatively short expiration, so
better do not mix it with root's.<br>
<br>
3. IMHO separate intermediate bundle has less maintenance overhead.<br>
<br>
# sslproxy_foreign_intermediate_certs backported from 4.x starting
3.5.13<br>
sslproxy_foreign_intermediate_certs
/usr/local/squid/etc/intermediate_ca.pem<br>
<br>
I've published here download link to my intermediate_ca.pem I'm
using in my setups. I'm not pretend this bundle is full, but I'm
updating it when meet UNABLE_TO_GET_ISSUER_CERT_LOCALLY.<br>
<br>
Note: You need to check intermediate CA's expiration/revocation
youself. So, to do this you need all source intermediates
separately. This time there is no tool to build this bundle
automatically, like Mozilla's CA bundle.<br>
<br>
Note 2: Don't - I repeat - DONT USE dont_verify_peer in production
setups. Never. This is dangerous.<br>
<br>
29.04.16 2:56, Rafael Akchurin пишет:<br>
<span style="white-space: pre;">><br>
> Hello Bruce,<br>
><br>
> <br>
><br>
> According to
<a class="moz-txt-link-freetext" href="https://www.ssllabs.com/ssltest/analyze.html?d=agentimediaservices.com">https://www.ssllabs.com/ssltest/analyze.html?d=agentimediaservices.com</a>
the server does not send the whole chain of certificates and imho
squid cannot automatically download the intermediate certificates
like browsers do.<br>
><br>
> <br>
><br>
> You need to manually add them to the store. Currently we do
it like
<a class="moz-txt-link-freetext" href="http://docs.diladele.com/faq/squid/fix_unable_to_get_issuer_cert_locally.html">http://docs.diladele.com/faq/squid/fix_unable_to_get_issuer_cert_locally.html</a><br>
><br>
> <br>
><br>
> I hope Yuri knows everything about adding certificates to the
store and will reply shortly :)<br>
><br>
> <br>
><br>
> If you were using explicit proxy usually making
agentimediaservices.com non bumpable would be enough as squid
would simply pump bytes from browser to site after allowed
CONNECT; but as you have intercepting squid – I suspect it needs
to establish a new connection to the remote site and thus openssl
code that is used when establishing connections gets a change to
fail the connection to a site with incomplete certificate chain.
IMHO :)<br>
><br>
> <br>
><br>
> I am also interested how to bypass it in intercepted
scenario.<br>
><br>
> <br>
><br>
> Best regards,<br>
><br>
> Rafael Akchurin<br>
><br>
> Diladele B.V.<br>
><br>
> <br>
><br>
> *From:* squid-users
[<a class="moz-txt-link-freetext" href="mailto:squid-users-bounces@lists.squid-cache.org">mailto:squid-users-bounces@lists.squid-cache.org</a>] *On Behalf Of
*Markey, Bruce<br>
> *Sent:* Thursday, April 28, 2016 10:33 PM<br>
> *To:* <a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
> *Subject:* [squid-users] Using dont_verify_peer<br>
><br>
> <br>
><br>
> I didn’t really get an answer previously so I did some
research and now I’m not quite sure what to do.<br>
><br>
> <br>
><br>
> Problem is I’m getting a lot of these:<br>
><br>
> <br>
><br>
> The following error was encountered while trying to retrieve
the URL: <a class="moz-txt-link-freetext" href="https://*.agentimediaservices.com/*">https://*.agentimediaservices.com/*</a>
<a class="moz-txt-link-rfc2396E" href="https://%2A.agentimediaservices.com/*"><https://%2A.agentimediaservices.com/*></a><br>
><br>
> *Failed to establish a secure connection to 63.240.52.151*<br>
><br>
> The system returned:<br>
><br>
> (71) Protocol error (TLS code:
X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)<br>
><br>
> SSL Certficate error: certificate issuer (CA) not known:
/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA
Limited/CN=COMODO RSA Organization Validation Secure Server CA<br>
><br>
> This proxy and the remote host failed to negotiate a mutually
acceptable security settings for handling your request. It is
possible that the remote host does not support secure connections,
or the proxy is not satisfied with the host security credentials.<br>
><br>
> Your cache administrator is webmaster
<a class="moz-txt-link-rfc2396E" href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_SECURE_CONNECT_FAIL&body=CacheHost%3A%20LNP-Proxy%0D%0AErrPage%3A%20ERR_SECURE_CONNECT_FAIL%0D%0AErr%3A%20(71)%20Protocol%20error%0D%0ATimeStamp%3A%20Thu,%2028%20Apr%202016%2016%3A37%3A14%20GMT%0D%0A%0D%0AClientIP%3A%20192.168.203.24%0D%0AServerIP%3A%2063.240.52.151%0D%0A%0D%0AHTTP%20Request%3A%0D%0ACONNECT%20%2F%20HTTP%2F1.1%0AHost%3A%2063.240.52.151%3A443%0D%0A%0D%0A%0D%0A"><mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_SECURE_CONNECT_FAIL&body=CacheHost%3A%20LNP-Proxy%0D%0AErrPage%3A%20ERR_SECURE_CONNECT_FAIL%0D%0AErr%3A%20(71)%20Protocol%20error%0D%0ATimeStamp%3A%20Thu,%2028%20Apr%202016%2016%3A37%3A14%20GMT%0D%0A%0D%0AClientIP%3A%20192.168.203.24%0D%0AServerIP%3A%2063.240.52.151%0D%0A%0D%0AHTTP%20Request%3A%0D%0ACONNECT%20%2F%20HTTP%2F1.1%0AHost%3A%2063.240.52.151%3A443%0D%0A%0D%0A%0D%0A></a>.<br>
><br>
> <br>
><br>
> <br>
><br>
> As I had stated some are “fixable” by adding the url to my
broken acl and then not peeking at it. That sometimes works, most
of the time not and then I have to add the ip listed to an acl of
allowed ips. This usually works but not in all cases.<br>
><br>
> <br>
><br>
> That leaves me sort of stuck. I’ve been having to actually
remove folks from the proxy so they could work. I work for a
newspaper and most of the issues lie with the myriad of
SEO/Marketing sites/tools these people use. They’re horrible.<br>
><br>
> <br>
><br>
> That leads me to my question of will using that flag make
this issue go away? Granted Im aware it’s not the safest I can’t
deny users access to the sites they need.<br>
><br>
> <br>
><br>
> <br>
><br>
> <br>
><br>
> I’m running 3.5.16 compiled from source on debian Jessie.
Fully updated. I’m also confused as to why this is happening. My
ca store is up to date. I’m confused as to why this is
happening. If I can access all these sites fine without the proxy
I’d have to think it’s not the cert itself. So it’s either debians
cert store or something else. I’m sort of at the end of my
knowledge here as to what to troubleshoot.<br>
><br>
> <br>
><br>
> The other option, though it would be last resort would be to
just stop doing anything with https, though all I really wanted
was to keep stats on sites visited.<br>
><br>
> <br>
><br>
> Here is some openssl info. This leads me to believe its not
a squid issue persay, its an openssl issue and or debian issue
with certs. But I’m not 100% on that.<br>
><br>
> <br>
><br>
> bruce@LNP-Proxy:/etc/squid3$ sudo openssl s_client -connect
<a class="moz-txt-link-abbreviated" href="http://www.agentimediaservices.com:443">www.agentimediaservices.com:443</a>
<a class="moz-txt-link-rfc2396E" href="http://www.agentimediaservices.com:443"><http://www.agentimediaservices.com:443></a> -showcerts<br>
><br>
> CONNECTED(00000003)<br>
><br>
> depth=0 C = US, postalCode = 10007, ST = NY, L = New York,
street = 195 Broadway, O = OMD USA LLC, OU = IT, OU = Hosted by
OMD USA INC, OU = PlatinumSSL Wildcard, CN =
*.agentimediaservices.com<br>
><br>
> verify error:num=20:unable to get local issuer certificate<br>
><br>
> verify return:1<br>
><br>
> depth=0 C = US, postalCode = 10007, ST = NY, L = New York,
street = 195 Broadway, O = OMD USA LLC, OU = IT, OU = Hosted by
OMD USA INC, OU = PlatinumSSL Wildcard, CN =
*.agentimediaservices.com<br>
><br>
> verify error:num=27:certificate not trusted<br>
><br>
> verify return:1<br>
><br>
> depth=0 C = US, postalCode = 10007, ST = NY, L = New York,
street = 195 Broadway, O = OMD USA LLC, OU = IT, OU = Hosted by
OMD USA INC, OU = PlatinumSSL Wildcard, CN =
*.agentimediaservices.com<br>
><br>
> verify error:num=21:unable to verify the first certificate<br>
><br>
> verify return:1<br>
><br>
> ---<br>
><br>
> Certificate chain<br>
><br>
> 0 s:/C=US/postalCode=10007/ST=NY/L=New York/street=195
Broadway/O=OMD USA LLC/OU=IT/OU=Hosted by OMD USA
INC/OU=PlatinumSSL Wildcard/CN=*.agentimediaservices.com<br>
><br>
> i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA
Limited/CN=COMODO RSA Organization Validation Secure Server CA<br>
><br>
> -----BEGIN CERTIFICATE-----<br>
><br>
>
MIIF+zCCBOOgAwIBAgIRAMmCjqA+AnLRGj9AxsuZpfMwDQYJKoZIhvcNAQELBQAw<br>
><br>
>
gZYxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO<br>
><br>
>
BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTwwOgYD<br>
><br>
>
VQQDEzNDT01PRE8gUlNBIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIFNlY3VyZSBT<br>
><br>
>
ZXJ2ZXIgQ0EwHhcNMTUwMTE2MDAwMDAwWhcNMTgwMTE1MjM1OTU5WjCB2jELMAkG<br>
><br>
>
A1UEBhMCVVMxDjAMBgNVBBETBTEwMDA3MQswCQYDVQQIEwJOWTERMA8GA1UEBxMI<br>
><br>
>
TmV3IFlvcmsxFTATBgNVBAkTDDE5NSBCcm9hZHdheTEUMBIGA1UEChMLT01EIFVT<br>
><br>
>
QSBMTEMxCzAJBgNVBAsTAklUMR4wHAYDVQQLExVIb3N0ZWQgYnkgT01EIFVTQSBJ<br>
><br>
>
TkMxHTAbBgNVBAsTFFBsYXRpbnVtU1NMIFdpbGRjYXJkMSIwIAYDVQQDFBkqLmFn<br>
><br>
>
ZW50aW1lZGlhc2VydmljZXMuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB<br>
><br>
>
CgKCAQEA26hgIL5HPDSLX6fySB8fUzbWFHFwEFzPIqt47wdqyNR2moDHrtEJ+ybZ<br>
><br>
>
v+byrRm4b34Zjfvt7n6caV6pcogiazE1ByIEWdEPN7M6jTU4ZiwMfaIfs0T4uNlc<br>
><br>
>
9I8PKws8u093JRP5DV1AEm2t8JI69msPaK14x4pE6sDRqRuNaXVtLiMBR5B/jurK<br>
><br>
>
xOpv365wb3ckoebFNbOo/AHC8abi3PCaVT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
><br>
>
7qAJ5Lemm8PtLcdqAydreaK9uYxhF3J1O4/bJHmCJ6P/n6U5MDTNRHYKx4Vo0Dfy<br>
><br>
>
CepRebqV79BCzRDEBTTL2MOnoFJB5NZciYRcypm4JuKHCDO0XCjkONHIlLLDquKV<br>
><br>
>
cNDI7Q00Ctlw8MriPpT8MPY1pdfIYkEVNp2AXOPQ/gXMHJ7EwFPGk3pnct3a9Nk1<br>
><br>
>
XsLTUSSRN5ggOIVk+qDU+PhgKA5U1V6TJEfEt7WA47DY5DtJqVpV/qMoNaGlU8Y=<br>
><br>
> -----END CERTIFICATE-----<br>
><br>
> ---<br>
><br>
> Server certificate<br>
><br>
> subject=/C=US/postalCode=10007/ST=NY/L=New York/street=195
Broadway/O=OMD USA LLC/OU=IT/OU=Hosted by OMD USA
INC/OU=PlatinumSSL Wildcard/CN=*.agentimediaservices.com<br>
><br>
> issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA
Limited/CN=COMODO RSA Organization Validation Secure Server CA<br>
><br>
> ---<br>
><br>
> No client certificate CA names sent<br>
><br>
> ---<br>
><br>
> SSL handshake has read 1678 bytes and written 599 bytes<br>
><br>
> ---<br>
><br>
> New, TLSv1/SSLv3, Cipher is RC4-MD5<br>
><br>
> Server public key is 2048 bit<br>
><br>
> Secure Renegotiation IS supported<br>
><br>
> Compression: NONE<br>
><br>
> Expansion: NONE<br>
><br>
> SSL-Session:<br>
><br>
> Protocol : TLSv1.2<br>
><br>
> Cipher : RC4-MD5<br>
><br>
> Session-ID:
4F9EE34EFA2F6305BBD46D6F367BFDC9F95580A7889D9E1FE91F0F79BA86701F<br>
><br>
> Session-ID-ctx:<br>
><br>
> Master-Key:
F741F597EFC3C837CE52546CC455FFFEBC0F18CCBC74CFB4BE7F1AE3C85EEB9065C39AE50CC525A33C5BD6CCF3D2483A<br>
><br>
> Key-Arg : None<br>
><br>
> PSK identity: None<br>
><br>
> PSK identity hint: None<br>
><br>
> SRP username: None<br>
><br>
> Start Time: 1461875411<br>
><br>
> Timeout : 300 (sec)<br>
><br>
> Verify return code: 21 (unable to verify the first
certificate)<br>
><br>
> ---<br>
><br>
> <br>
><br>
> Squid.conf:<br>
><br>
> <br>
><br>
> #Access Lists<br>
><br>
> acl internal src 192.168.200.0/21<br>
><br>
> acl wireless src 192.168.100.0/23<br>
><br>
> <br>
><br>
> #Ports allowed through Squid<br>
><br>
> acl Safe_ports port 80<br>
><br>
> acl Safe_ports port 443<br>
><br>
> acl SSL_ports port 443<br>
><br>
> acl CONNECT method CONNECT<br>
><br>
> <br>
><br>
> #acls from blacklist<br>
><br>
> acl allowed dstdomain -i "/etc/squid3/acls/http_allowed.acl"<br>
><br>
> acl prime dstdomain -i "/etc/squid3/acls/squid-prime.acl"<br>
><br>
> acl china dst -n "/etc/squid3/acls/ccd-china.acl"<br>
><br>
> acl india dst -n "/etc/squid3/acls/ccd-india.acl"<br>
><br>
> acl iran dst -n "/etc/squid3/acls/ccd-iran.acl"<br>
><br>
> acl nigeria dst -n "/etc/squid3/acls/ccd-nigeria.acl"<br>
><br>
> acl pakistan dst -n "/etc/squid3/acls/ccd-nigeria.acl"<br>
><br>
> acl romania dst -n "/etc/squid3/acls/ccd-romania.acl"<br>
><br>
> acl russia dst -n "/etc/squid3/acls/ccd-russia.acl"<br>
><br>
> acl syria dst -n "/etc/squid3/acls/ccd-syria.acl"<br>
><br>
> acl ukraine dst -n "/etc/squid3/acls/ccd-ukraine.acl"<br>
><br>
> acl uzbekistan dst -n "/etc/squid3/acls/ccd-uzbekistan.acl"<br>
><br>
> acl ips dst -n "/etc/squid3/acls/broken_ips.acl"<br>
><br>
> acl blocked dstdomain -i "/etc/squid3/acls/http_blocked.acl"<br>
><br>
> <br>
><br>
> #allow/deny<br>
><br>
> http_access allow allowed<br>
><br>
> http_access allow ips<br>
><br>
> http_access deny blocked<br>
><br>
> http_access deny prime<br>
><br>
> http_access deny china<br>
><br>
> http_access deny india<br>
><br>
> http_access deny iran<br>
><br>
> http_access deny nigeria<br>
><br>
> http_access deny pakistan<br>
><br>
> http_access deny romania<br>
><br>
> http_access deny russia<br>
><br>
> http_access deny syria<br>
><br>
> http_access deny ukraine<br>
><br>
> http_access deny uzbekistan<br>
><br>
> <br>
><br>
> http_access allow internal<br>
><br>
> http_access allow wireless<br>
><br>
> http_access deny !Safe_ports<br>
><br>
> http_access deny CONNECT !SSL_ports<br>
><br>
> http_access deny all<br>
><br>
> <br>
><br>
> #Bumping<br>
><br>
> acl step1 at_step SslBump1<br>
><br>
> acl step2 at_step SslBump2<br>
><br>
> acl step3 at_step SslBump3<br>
><br>
> <br>
><br>
> acl broken_sites ssl::server_name_regex
"/etc/squid3/acls/http_broken.txt"<br>
><br>
> <br>
><br>
> #ssl_bump peek all<br>
><br>
> ssl_bump peek !broken_sites<br>
><br>
> ssl_bump splice all<br>
><br>
> #ssl_bump splice !broken_sites<br>
><br>
> <br>
><br>
> sslproxy_capath /etc/ssl/certs<br>
><br>
> <br>
><br>
> sslcrtd_program /lib/squid3/ssl_crtd -s /etc/squid3/ssl_db -M
4MB<br>
><br>
> sslcrtd_children 32 startup=5 idle=1<br>
><br>
> <br>
><br>
> <br>
><br>
> #logformat mine %>a %[ui %[un [%tl] "%rm %ru HTTP/%rv"
%ssl::>sni %ssl::>cert_subject %>Hs %<st %Ss:%Sh<br>
><br>
> <br>
><br>
> #access_log syslog:daemon.info mine<br>
><br>
> #access_log daemon:/var/log/squid3/test.log mine<br>
><br>
> <br>
><br>
> #intercept<br>
><br>
> http_port 3128 intercept<br>
><br>
> https_port 3129 intercept ssl-bump
cert=/etc/squid3/certs/squid.pem
cafile=/etc/squid3/certs/squid.pem
key=/etc/squid3/certs/squid.pem generate-host-certificates=on
dynamic_cert_mem_cache_size=4MB sslflags=NO_SESSION_REUSE<br>
><br>
> <br>
><br>
> #nameservers<br>
><br>
> dns_nameservers 192.168.201.1 8.8.8.8<br>
><br>
> <br>
><br>
> #WCCPv2 items<br>
><br>
> wccp_version 2<br>
><br>
> wccp2_router 192.168.200.73<br>
><br>
> wccp2_forwarding_method gre<br>
><br>
> wccp2_return_method gre<br>
><br>
> wccp2_service standard 0 password=LNP1<br>
><br>
> wccp2_service dynamic 70 password=LNP1<br>
><br>
> wccp2_service_info 70 protocol=tcp flags=dst_ip_hash
priority=240 ports=443<br>
><br>
> <br>
><br>
> *Bruce Markey*| Network Security Analyst<br>
><br>
> STEINMANCOMMUNICATIONS<br>
><br>
> 717.291.8758 (o) | _bmarkey@steinmancommunications.com
<a class="moz-txt-link-rfc2396E" href="mailto:bmarkey@steinmancommunications.com"><mailto:bmarkey@steinmancommunications.com></a>_<br>
><br>
> 8 West King St| PO Box 1328,Lancaster, PA 17608-1328<br>
><br>
> <br>
><br>
><br>
><br>
> _______________________________________________<br>
> squid-users mailing list<br>
> <a class="moz-txt-link-abbreviated" href="mailto:squid-users@lists.squid-cache.org">squid-users@lists.squid-cache.org</a><br>
> <a class="moz-txt-link-freetext" href="http://lists.squid-cache.org/listinfo/squid-users">http://lists.squid-cache.org/listinfo/squid-users</a></span><br>
<br>
-----BEGIN PGP SIGNATURE-----
<br>
Version: GnuPG v2
<br>
<br>
iQEcBAEBCAAGBQJXIoOwAAoJENNXIZxhPexGyhwH/iys6RATQ+spnune1egNhMal
<br>
OcYXbZoC+mtIF5axYxLALNe+codKZlEEEcbdqQIRVx9EtM3q6ilwVhw0tJ6r2N4G
<br>
87h0sfRvTzdWVrHXjdmZhgDzj1TjIfb74W2nRWBMrSEbPrEinEJHaMqtO2/5iXBX
<br>
/k4GqAsq8LZi8fKEwKdiENYp82ywe5fsVleG6RxIlP4ek7dyAFj21XHWCvc0+Fwc
<br>
wzbC06H/3Uik797IlXB3opeWQfemxXqs9OzK/u+P8SNUgoQTLcz4DFpillg/8u9T
<br>
IJMSSxIbOqxIzKLT9+SFIno9GBgkjJ6MvorUVd24aMqbUr0jWp6a+vjN2X9HFk8=
<br>
=JLmW
<br>
-----END PGP SIGNATURE-----
<br>
<br>
</body>
</html>