Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4df4339f
Commit
4df4339f
authored
Jun 10, 2013
by
Hans Leidekker
Committed by
Alexandre Julliard
Jun 10, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhttp/tests: Trace certificate errors.
parent
a8535c3b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
winhttp.c
dlls/winhttp/tests/winhttp.c
+22
-0
No files found.
dlls/winhttp/tests/winhttp.c
View file @
4df4339f
...
...
@@ -789,6 +789,26 @@ static void test_WinHttpAddHeaders(void)
}
static
void
CALLBACK
cert_error
(
HINTERNET
handle
,
DWORD_PTR
ctx
,
DWORD
status
,
LPVOID
buf
,
DWORD
len
)
{
DWORD
flags
=
*
(
DWORD
*
)
buf
;
if
(
!
flags
)
{
trace
(
"WINHTTP_CALLBACK_STATUS_FLAG_SECURITY_CHANNEL_ERROR
\n
"
);
return
;
}
#define X(x) if (flags & x) trace("%s\n", #x);
X
(
WINHTTP_CALLBACK_STATUS_FLAG_CERT_REV_FAILED
)
X
(
WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CERT
)
X
(
WINHTTP_CALLBACK_STATUS_FLAG_CERT_REVOKED
)
X
(
WINHTTP_CALLBACK_STATUS_FLAG_INVALID_CA
)
X
(
WINHTTP_CALLBACK_STATUS_FLAG_CERT_CN_INVALID
)
X
(
WINHTTP_CALLBACK_STATUS_FLAG_CERT_DATE_INVALID
)
X
(
WINHTTP_CALLBACK_STATUS_FLAG_CERT_WRONG_USAGE
)
#undef X
}
static
void
test_secure_connection
(
void
)
{
static
const
WCHAR
google
[]
=
{
'w'
,
'w'
,
'w'
,
'.'
,
'g'
,
'o'
,
'o'
,
'g'
,
'l'
,
'e'
,
'.'
,
'c'
,
'o'
,
'm'
,
0
};
...
...
@@ -834,6 +854,8 @@ static void test_secure_connection(void)
req
=
WinHttpOpenRequest
(
con
,
NULL
,
NULL
,
NULL
,
NULL
,
NULL
,
WINHTTP_FLAG_SECURE
);
ok
(
req
!=
NULL
,
"failed to open a request %u
\n
"
,
GetLastError
());
WinHttpSetStatusCallback
(
req
,
cert_error
,
WINHTTP_CALLBACK_STATUS_SECURE_FAILURE
,
0
);
ret
=
WinHttpSendRequest
(
req
,
NULL
,
0
,
NULL
,
0
,
0
,
0
);
ok
(
ret
,
"failed to send request %u
\n
"
,
GetLastError
());
if
(
!
ret
)
...
...
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