[PATCH v2] wininet: Support option INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT for http requests.

Francois Gouget fgouget at codeweavers.com
Fri Oct 22 11:21:07 CDT 2021


On Mon, 11 Oct 2021, Hans Leidekker wrote:
[...]
> +    size = sizeof(chain);
> +    SetLastError(0xdeadbeef);
> +    ret = InternetQueryOptionA(req, INTERNET_OPTION_SERVER_CERT_CHAIN_CONTEXT, &chain, &size);
> +    ok(ret || GetLastError() == ERROR_INTERNET_INCORRECT_HANDLE_TYPE /* < IE8 */,
> +       "InternetQueryOption failed: %u\n", GetLastError());

On Windows running urlmon:url before causes this ok() call (and others) 
to fail. Specifically it's now a set of 7 tests that urlmon:url breaks, 
but only in the first wininet:http run that follows:

C:\Users\Public\Documents>urlmon_test.exe url | findstr /R "tests.executed"
0d9c:url: 11156 tests executed (0 marked as todo, 0 failures), 0 skipped.

C:\Users\Public\Documents>wininet_test.exe http | findstr /R "tests.executed Test.failed"
http.c:6886: Test failed: expected secure flag to be set
http.c:6893: Test failed: InternetQueryOption failed: 12019
http.c:6903: Test failed: InternetQueryOption failed: 12016
http.c:6909: Test failed: InternetQueryOption failed: 12016
http.c:6932: Test failed: InternetQueryOption failed: 12016
http.c:6937: Test failed: InternetQueryOption failed: 12016
http.c:6940: Test failed: expected same string
13c0:http: 4871 tests executed (0 marked as todo, 7 failures), 1 skipped.

C:\Users\Public\Documents>wininet_test.exe http | findstr /R "tests.executed Test.failed"
0c04:http: 4884 tests executed (0 marked as todo, 0 failures), 0 skipped.


So where urlmon:url breaks some Windows setting, wininet:http seems to 
fix it, but only after the failures happened. I'm hoping that because 
you've worked on this test you'll have a good idea of what's going wrong 
and know how to fix it.

I'm tracking this issue in this bug:
https://bugs.winehq.org//show_bug.cgi?id=51227

Also the patterns make the new failure quite visible (yay!):
https://test.winehq.org/data/patterns.html#wininet:http

-- 
Francois Gouget <fgouget at codeweavers.com>



More information about the wine-devel mailing list