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

This commit is contained in:
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); 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);