Module: wine Branch: master Commit: df976fd57adb146bddf03333cc5a84da39da6acf URL: https://source.winehq.org/git/wine.git/?a=commit;h=df976fd57adb146bddf03333c...
Author: Jacek Caban jacek@codeweavers.com Date: Tue May 22 10:13:44 2018 +0200
urlmon/tests: Handle ERROR_INTERNET_INVALID_CA security problem in https tests.
Signed-off-by: Jacek Caban jacek@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/urlmon/tests/protocol.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/urlmon/tests/protocol.c b/dlls/urlmon/tests/protocol.c index 1c5ffaf..78b882b 100644 --- a/dlls/urlmon/tests/protocol.c +++ b/dlls/urlmon/tests/protocol.c @@ -246,14 +246,17 @@ static HRESULT WINAPI HttpSecurity_GetWindow(IHttpSecurity* iface, REFGUID rgui
static HRESULT WINAPI HttpSecurity_OnSecurityProblem(IHttpSecurity *iface, DWORD dwProblem) { - trace("Security problem: %u\n", dwProblem); - ok(dwProblem == ERROR_INTERNET_SEC_CERT_REV_FAILED, "Expected ERROR_INTERNET_SEC_CERT_REV_FAILED got %u\n", dwProblem); + win_skip("Security problem: %u\n", dwProblem); + ok(dwProblem == ERROR_INTERNET_SEC_CERT_REV_FAILED || dwProblem == ERROR_INTERNET_INVALID_CA, + "Expected got %u security problem\n", dwProblem);
/* Only retry once */ if (security_problem) return E_ABORT;
security_problem = TRUE; + if(dwProblem == ERROR_INTERNET_INVALID_CA) + return E_ABORT; SET_EXPECT(BeginningTransaction);
return RPC_E_RETRY; @@ -1157,6 +1160,9 @@ static HRESULT WINAPI ProtocolSink_ReportResult(IInternetProtocolSink *iface, HR { CHECK_EXPECT(ReportResult);
+ if(security_problem) + return S_OK; + if(tested_protocol == FTP_TEST) ok(hrResult == E_PENDING || hrResult == S_OK, "hrResult = %08x, expected E_PENDING or S_OK\n", hrResult); else @@ -2625,6 +2631,7 @@ static void init_test(int prot, DWORD flags) empty_file = (flags & TEST_EMPTY) != 0; bind_from_cache = (flags & TEST_FROMCACHE) != 0; file_with_hash = FALSE; + security_problem = FALSE;
bindinfo_options = 0; if(flags & TEST_DISABLEAUTOREDIRECT)