Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ab3744d2
Commit
ab3744d2
authored
Jun 19, 2015
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 22, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
urlmon/tests: Skip https tests on platforms that don't support them.
Based on patch by Huw Davies.
parent
9d3fda00
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
18 deletions
+50
-18
url.c
dlls/urlmon/tests/url.c
+50
-18
No files found.
dlls/urlmon/tests/url.c
View file @
ab3744d2
...
...
@@ -3851,6 +3851,32 @@ static void register_protocols(void)
IInternetSession_Release
(
session
);
}
static
BOOL
can_do_https
(
void
)
{
HINTERNET
ses
,
con
,
req
;
BOOL
ret
;
ses
=
InternetOpenA
(
"winetest"
,
INTERNET_OPEN_TYPE_PRECONFIG
,
NULL
,
NULL
,
0
);
ok
(
ses
!=
NULL
,
"InternetOpen failed
\n
"
);
con
=
InternetConnectA
(
ses
,
"test.winehq.org"
,
INTERNET_DEFAULT_HTTPS_PORT
,
NULL
,
NULL
,
INTERNET_SERVICE_HTTP
,
0
,
0
);
ok
(
con
!=
NULL
,
"InternetConnect failed
\n
"
);
req
=
HttpOpenRequestA
(
con
,
"GET"
,
"/tests/hello.html"
,
NULL
,
NULL
,
NULL
,
INTERNET_FLAG_SECURE
,
0
);
ok
(
req
!=
NULL
,
"HttpOpenRequest failed
\n
"
);
ret
=
HttpSendRequestA
(
req
,
NULL
,
0
,
NULL
,
0
);
ok
(
ret
||
broken
(
GetLastError
()
==
ERROR_INTERNET_CANNOT_CONNECT
),
"request failed: %u
\n
"
,
GetLastError
());
InternetCloseHandle
(
req
);
InternetCloseHandle
(
con
);
InternetCloseHandle
(
ses
);
return
ret
;
}
START_TEST
(
url
)
{
HMODULE
hurlmon
;
...
...
@@ -3930,25 +3956,34 @@ START_TEST(url)
trace
(
"file test (no callback)...
\n
"
);
test_BindToStorage
(
FILE_TEST
,
BINDTEST_NO_CALLBACK
,
TYMED_ISTREAM
);
trace
(
"synchronous https test (invalid CN, dialog)
\n
"
);
onsecurityproblem_hres
=
S_FALSE
;
http_is_first
=
TRUE
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
if
(
can_do_https
())
{
trace
(
"synchronous https test (invalid CN, dialog)
\n
"
);
onsecurityproblem_hres
=
S_FALSE
;
http_is_first
=
TRUE
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
;
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
;
trace
(
"asynchronous https test (invalid CN, fail)
\n
"
);
onsecurityproblem_hres
=
E_FAIL
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
trace
(
"asynchronous https test (invalid CN, fail)
\n
"
);
onsecurityproblem_hres
=
E_FAIL
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
trace
(
"asynchronous https test (invalid CN, accept)
\n
"
);
onsecurityproblem_hres
=
S_OK
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
trace
(
"asynchronous https test (invalid CN, dialog 2)
\n
"
);
onsecurityproblem_hres
=
S_FALSE
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
invalid_cn_accepted
=
FALSE
;
trace
(
"asynchronous https test (invalid CN, accept)
\n
"
);
onsecurityproblem_hres
=
S_OK
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
trace
(
"asynchronous https test...
\n
"
);
test_BindToStorage
(
HTTPS_TEST
,
0
,
TYMED_ISTREAM
);
}
else
{
win_skip
(
"Skipping https testt
\n
"
);
}
trace
(
"asynchronous https test (invalid CN, dialog 2)
\n
"
);
onsecurityproblem_hres
=
S_FALSE
;
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_INVALID_CN
,
TYMED_ISTREAM
);
invalid_cn_accepted
=
FALSE
;
bindf
=
BINDF_ASYNCHRONOUS
|
BINDF_ASYNCSTORAGE
|
BINDF_PULLDATA
;
trace
(
"winetest test (async switch)...
\n
"
);
test_BindToStorage
(
WINETEST_TEST
,
BINDTEST_EMULATE
|
BINDTEST_ASYNC_SWITCH
,
TYMED_ISTREAM
);
...
...
@@ -4003,9 +4038,6 @@ START_TEST(url)
trace
(
"winetest test (no callback)...
\n
"
);
test_BindToStorage
(
WINETEST_TEST
,
BINDTEST_EMULATE
|
BINDTEST_NO_CALLBACK
|
BINDTEST_USE_CACHE
,
TYMED_ISTREAM
);
trace
(
"asynchronous https test...
\n
"
);
test_BindToStorage
(
HTTPS_TEST
,
0
,
TYMED_ISTREAM
);
trace
(
"emulated https test...
\n
"
);
test_BindToStorage
(
HTTPS_TEST
,
BINDTEST_EMULATE
,
TYMED_ISTREAM
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment