winhttp/tests: Skip secure connection tests if the request fails.

oldstable
Juan Lang 2009-12-11 14:10:27 -08:00 committed by Alexandre Julliard
parent 72025026db
commit c02ee18869
1 changed files with 6 additions and 0 deletions

View File

@ -783,6 +783,11 @@ static void test_secure_connection(void)
ret = WinHttpSendRequest(req, NULL, 0, NULL, 0, 0, 0);
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);
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);
ok(!ret, "succeeded unexpectedly\n");
cleanup:
WinHttpCloseHandle(req);
WinHttpCloseHandle(con);
WinHttpCloseHandle(ses);