Owen Rudge : wininet/tests: Fix http tests to reflect current state of winehq test server.
Alexandre Julliard
julliard at winehq.org
Fri Oct 4 16:34:05 CDT 2019
Module: wine
Branch: master
Commit: 5b406e1446a7727ccc2a6efeceeb811a3da48ee1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5b406e1446a7727ccc2a6efeceeb811a3da48ee1
Author: Owen Rudge <orudge at codeweavers.com>
Date: Thu Oct 3 23:00:16 2019 +0100
wininet/tests: Fix http tests to reflect current state of winehq test server.
Signed-off-by: Owen Rudge <orudge at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wininet/tests/http.c | 25 ++++++++++++++-----------
1 file changed, 14 insertions(+), 11 deletions(-)
diff --git a/dlls/wininet/tests/http.c b/dlls/wininet/tests/http.c
index 90a38dc3af..99ea0ef48f 100644
--- a/dlls/wininet/tests/http.c
+++ b/dlls/wininet/tests/http.c
@@ -5928,12 +5928,15 @@ static const cert_struct_test_t test_winehq_com_cert = {
"Minnesota\r\n"
"Saint Paul\r\n"
"WineHQ\r\n"
+ "IT\r\n"
"test.winehq.com\r\n"
"webmaster at winehq.org",
"US\r\n"
"Minnesota\r\n"
+ "Saint Paul\r\n"
"WineHQ\r\n"
+ "IT\r\n"
"test.winehq.com\r\n"
"webmaster at winehq.org"
};
@@ -6168,7 +6171,7 @@ static void test_security_flags(void)
ok(!res && GetLastError() == ERROR_IO_PENDING, "HttpSendRequest failed: %u\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE);
- ok(req_error == ERROR_INTERNET_SEC_CERT_REV_FAILED || broken(req_error == ERROR_INTERNET_SEC_CERT_ERRORS),
+ ok(req_error == ERROR_INTERNET_SEC_CERT_ERRORS,
"req_error = %d\n", req_error);
size = 0;
@@ -6206,7 +6209,7 @@ static void test_security_flags(void)
CLEAR_NOTIFIED(INTERNET_STATUS_COOKIE_SENT);
CLEAR_NOTIFIED(INTERNET_STATUS_DETECTING_PROXY);
- if(req_error != ERROR_INTERNET_SEC_CERT_REV_FAILED) {
+ if(req_error != ERROR_INTERNET_SEC_CERT_ERRORS) {
win_skip("Unexpected cert errors %u, skipping security flags tests\n", req_error);
close_async_handle(ses, 3);
@@ -6220,10 +6223,10 @@ static void test_security_flags(void)
test_request_flags(req, 8);
/* IE11 finds both rev failure and invalid CA. Previous versions required rev failure
to be ignored before invalid CA was reported. */
- test_secflags_option(req, _SECURITY_FLAG_CERT_REV_FAILED, _SECURITY_FLAG_CERT_INVALID_CA);
+ test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA, _SECURITY_FLAG_CERT_REV_FAILED);
set_secflags(req, FALSE, SECURITY_FLAG_IGNORE_REVOCATION);
- test_secflags_option(req, _SECURITY_FLAG_CERT_REV_FAILED|SECURITY_FLAG_IGNORE_REVOCATION, _SECURITY_FLAG_CERT_INVALID_CA);
+ test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA|SECURITY_FLAG_IGNORE_REVOCATION, _SECURITY_FLAG_CERT_REV_FAILED);
SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER);
SET_EXPECT(INTERNET_STATUS_CONNECTED_TO_SERVER);
@@ -6237,7 +6240,7 @@ static void test_security_flags(void)
ok(!res && GetLastError() == ERROR_IO_PENDING, "HttpSendRequest failed: %u\n", GetLastError());
WaitForSingleObject(complete_event, INFINITE);
- ok(req_error == ERROR_INTERNET_SEC_CERT_ERRORS, "req_error = %d\n", req_error);
+ ok(req_error == ERROR_INTERNET_INVALID_CA || req_error == ERROR_INTERNET_SEC_CERT_ERRORS, "req_error = %d\n", req_error);
CHECK_NOTIFIED(INTERNET_STATUS_CONNECTING_TO_SERVER);
CHECK_NOTIFIED(INTERNET_STATUS_CONNECTED_TO_SERVER);
@@ -6248,11 +6251,11 @@ static void test_security_flags(void)
CLEAR_NOTIFIED(INTERNET_STATUS_DETECTING_PROXY);
test_request_flags(req, INTERNET_REQFLAG_NO_HEADERS);
- test_secflags_option(req, SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0);
+ test_secflags_option(req, SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_INVALID_CA, 0);
test_security_info("https://test.winehq.com/data/some_file.html?q", ERROR_INTERNET_ITEM_NOT_FOUND, 0);
set_secflags(req, FALSE, SECURITY_FLAG_IGNORE_UNKNOWN_CA);
- test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA|_SECURITY_FLAG_CERT_REV_FAILED
+ test_secflags_option(req, _SECURITY_FLAG_CERT_INVALID_CA
|SECURITY_FLAG_IGNORE_REVOCATION|SECURITY_FLAG_IGNORE_UNKNOWN_CA, 0);
test_http_version(req);
@@ -6290,11 +6293,11 @@ static void test_security_flags(void)
test_request_flags(req, 0);
test_secflags_option(req, SECURITY_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_FLAG_IGNORE_REVOCATION
- |SECURITY_FLAG_STRENGTH_STRONG|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0);
+ |SECURITY_FLAG_STRENGTH_STRONG|_SECURITY_FLAG_CERT_INVALID_CA, 0);
test_cert_struct(req, &test_winehq_com_cert);
test_security_info("https://test.winehq.com/data/some_file.html?q", 0,
- _SECURITY_FLAG_CERT_INVALID_CA|_SECURITY_FLAG_CERT_REV_FAILED);
+ _SECURITY_FLAG_CERT_INVALID_CA);
res = InternetReadFile(req, buf, sizeof(buf), &size);
ok(res, "InternetReadFile failed: %u\n", GetLastError());
@@ -6327,7 +6330,7 @@ static void test_security_flags(void)
CHECK_NOTIFIED(INTERNET_STATUS_HANDLE_CREATED);
test_secflags_option(req, SECURITY_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_FLAG_STRENGTH_STRONG
- |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0);
+ |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_INVALID_CA, 0);
test_http_version(req);
SET_EXPECT(INTERNET_STATUS_CONNECTING_TO_SERVER);
@@ -6362,7 +6365,7 @@ static void test_security_flags(void)
test_request_flags(req, 0);
test_secflags_option(req, SECURITY_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_FLAG_STRENGTH_STRONG
- |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_REV_FAILED|_SECURITY_FLAG_CERT_INVALID_CA, 0);
+ |SECURITY_FLAG_IGNORE_REVOCATION|_SECURITY_FLAG_CERT_INVALID_CA, 0);
res = InternetReadFile(req, buf, sizeof(buf), &size);
ok(res, "InternetReadFile failed: %u\n", GetLastError());
More information about the wine-cvs
mailing list