wjdp / htmltest

:white_check_mark: Test generated HTML for problems
MIT License
323 stars 54 forks source link

Certificate validation fails when using AIA #130

Closed tomtom5152 closed 4 years ago

tomtom5152 commented 4 years ago

Describe the bug

Some HTTPS servers fail validation due to incomplete chains.

To Reproduce

Steps to reproduce the behaviour:

  1. Include a link to a site which does not send the full chain such as incomplete-chain.badssl.com
  2. Run htmltest
  3. Receive failures related to bad SSL

Expected behaviour

AIA servers generate a warning rather than an error given it will work on most browsers.

Actual behaviour

AIA servers fail TLS validation.

Versions

Additional context

RFC3280 (AIA) allows HTTPS servers to not send the full certificate chain when serving clients, instead it is up to the client to fetch any intermediary certificates from the include URL. Testing with Safari and Chrome shows that they do this automatically, Firefox does not, likely due to the underlying use of openssl which leaves this to the application implementation for security. The Go x509 library does appear to have some level of support for AIA.