winhttp/tests: Skip secure connection tests if the request fails.
This commit is contained in:
parent
72025026db
commit
c02ee18869
|
@ -783,6 +783,11 @@ static void test_secure_connection(void)
|
||||||
|
|
||||||
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
|
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
|
||||||
ok(ret, "failed to send request %u\n", GetLastError());
|
ok(ret, "failed to send request %u\n", GetLastError());
|
||||||
|
if (!ret)
|
||||||
|
{
|
||||||
|
skip("secure connection failed, skipping remaining secure tests\n");
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
|
|
||||||
size = sizeof(cert);
|
size = sizeof(cert);
|
||||||
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert, &size );
|
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SERVER_CERT_CONTEXT, &cert, &size );
|
||||||
|
@ -806,6 +811,7 @@ static void test_secure_connection(void)
|
||||||
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, NULL, &size, NULL);
|
ret = WinHttpQueryHeaders(req, WINHTTP_QUERY_RAW_HEADERS_CRLF, NULL, NULL, &size, NULL);
|
||||||
ok(!ret, "succeeded unexpectedly\n");
|
ok(!ret, "succeeded unexpectedly\n");
|
||||||
|
|
||||||
|
cleanup:
|
||||||
WinHttpCloseHandle(req);
|
WinHttpCloseHandle(req);
|
||||||
WinHttpCloseHandle(con);
|
WinHttpCloseHandle(con);
|
||||||
WinHttpCloseHandle(ses);
|
WinHttpCloseHandle(ses);
|
||||||
|
|
Loading…
Reference in New Issue