OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Fetching of intermediate Certificates
« previous next »
  • Print
Pages: [1]

Author Topic: Fetching of intermediate Certificates  (Read 3529 times)

GrueneNeun

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Fetching of intermediate Certificates
« on: February 24, 2022, 02:56:04 pm »
I have a transparent proxy up and running which also uses SSL bumping. It works for most websites but some SSL sites do not deliver their intermediate certificate like https://incomplete-chain.badssl.com/ for example. This results in opnsense presenting the following errors to a client:

(92) Protocol error (TLS code: X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY)
SSL Certficate error: certificate issuer (CA) not known: /C=US/O=DigiCert Inc/CN=DigiCert SHA2 Secure Server CA

Since normal web browsers do not display that error and can verify the complete certificate chain there must be a way to download these missing certificates automatically. Can this be done in the web proxy too, so that even misconfigured servers can be reached?
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Fetching of intermediate Certificates
« Reply #1 on: February 28, 2022, 10:47:16 pm »
No, there is not. Browsers likely have those intermediate certificates in their store as well.
Logged

GrueneNeun

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Fetching of intermediate Certificates
« Reply #2 on: March 01, 2022, 01:11:17 pm »
Okay, i am just asking because i found https://www.spinics.net/lists/squid/msg94071.html which suggests that Squid should try to fetch missing certificates...
Logged

Mks

  • Sr. Member
  • ****
  • Posts: 272
  • Karma: 19
    • View Profile
Re: Fetching of intermediate Certificates
« Reply #3 on: March 01, 2022, 04:20:12 pm »
Some TLS-Clients fetch intermediate certificates based on the AIA extension, but this differs from browser (TLS-Client) to browser. Search for SQUID and AIA.
Best practise is to deliver the whole certificate chain but this is a setting on serverside.

br
« Last Edit: March 01, 2022, 05:16:20 pm by Mks »
Logged

GrueneNeun

  • Newbie
  • *
  • Posts: 5
  • Karma: 0
    • View Profile
Re: Fetching of intermediate Certificates
« Reply #4 on: March 01, 2022, 05:37:40 pm »
Yes, and i try to minimize the impact of serverside misconfiguration on my users.

Quote from: Mks on March 01, 2022, 04:20:12 pm
Search for SQUID and AIA.
Best advice ever - thank you very much, it is exactly what i was looking for ;D

For a test, i inserted the following lines i copied from http://lists.squid-cache.org/pipermail/squid-users/2020-July/022425.html

Code: [Select]
# allow fetching of missing intermediate certificates
acl fetch_intermediate_certificate transaction_initiator certificate-fetching
http_access allow fetch_intermediate_certificate
cache allow fetch_intermediate_certificate

and at least https://incomplete-chain.badssl.com/ worked like a charm. This leads me to believe that the default configuration blocks the access of squid itself to the AIA URLs to download missing certfificates.
 This is by no means a clean solution and i got other errors i can't inspect more closely at the moment - but something like this should be considered as an option in the GUI.
« Last Edit: March 01, 2022, 05:40:55 pm by GrueneNeun »
Logged

kd.gundermann

  • Newbie
  • *
  • Posts: 27
  • Karma: 0
    • View Profile
Re: Fetching of intermediate Certificates
« Reply #5 on: December 21, 2022, 02:54:35 pm »
Quote
i inserted the following lines

Sorry to ask, but WHERE did you insert these lines?
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Fetching of intermediate Certificates
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2