chromium / badssl.com

:lock: Memorable site for testing clients against bad SSL configs.
https://badssl.com
Apache License 2.0
2.78k stars 186 forks source link

How does the captive portal subdomain work? #471

Closed tmann50 closed 3 years ago

tmann50 commented 3 years ago

It would seem that chrome uses a request to http://gstatic.com/generate_204 to determine the presence of a captive portal on a network, but the captive-portal.badssl.com domain shows the chrome captive portal message, even when everything else is available, so it can't be this

How does chrome know that captive-portal.badssl.com "is" a captive portal?

lgarron commented 3 years ago

The certificate (specifically, public key) is hardcoded in Chrome:

https://source.chromium.org/chromium/chromium/src/+/master:components/resources/ssl/ssl_error_assistant/ssl_error_assistant.asciipb;l=14?q=badssl.com&ss=chromium

Hope that answers your question!