https://bugs.winehq.org/show_bug.cgi?id=50302
--- Comment #4 from Hans Leidekker hans@meelstraat.net --- (In reply to Zebediah Figura from comment #3)
Okay, reframing as a bug against Wine then.
The test on line 6462 succeeds on Windows, so this is in fact a Wine bug. We're returning ERROR_INTERNET_INVALID_CA where ERROR_INTERNET_SEC_CERT_ERRORS is expected. These tests intentionally use test.winehq.com to verify that we're handling invalid certs correctly.