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
eb00dbd9
Commit
eb00dbd9
authored
Feb 11, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Detect missing HEXRAW support by output.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6ee109c5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
base64.c
dlls/crypt32/tests/base64.c
+15
-4
No files found.
dlls/crypt32/tests/base64.c
View file @
eb00dbd9
...
@@ -363,11 +363,16 @@ static void test_CryptBinaryToString(void)
...
@@ -363,11 +363,16 @@ static void test_CryptBinaryToString(void)
heap_free
(
encodedW
);
heap_free
(
encodedW
);
}
}
/* winxp and win2k3 are documented as not handling HEXRAW but do not return failure */
/* Systems that don't support HEXRAW format convert to BASE64 instead - 3 bytes in -> 4 chars + crlf + 1 null out. */
GetVersionExA
(
&
ver
);
strLen
=
0
;
if
(
ver
.
dwMajorVersion
<=
5
)
ret
=
CryptBinaryToStringW
(
input
,
3
,
CRYPT_STRING_HEXRAW
,
NULL
,
&
strLen
);
todo_wine
{
ok
(
ret
,
"Failed to get string length.
\n
"
);
ok
(
strLen
==
9
||
broken
(
strLen
==
7
),
"Unexpected string length %d.
\n
"
,
strLen
);
}
if
(
strLen
==
7
)
{
{
win_skip
(
"CryptBinaryToString(HEX) not supported
\n
"
);
win_skip
(
"CryptBinaryToString(HEX
RAW
) not supported
\n
"
);
return
;
return
;
}
}
...
@@ -376,6 +381,12 @@ static void test_CryptBinaryToString(void)
...
@@ -376,6 +381,12 @@ static void test_CryptBinaryToString(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
flags
);
i
++
)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
flags
);
i
++
)
{
{
strLen
=
0
;
ret
=
CryptBinaryToStringW
(
input
,
sizeof
(
input
),
CRYPT_STRING_HEXRAW
|
flags
[
i
],
NULL
,
&
strLen
);
todo_wine
{
ok
(
ret
,
"CryptBinaryToStringW failed: %d
\n
"
,
GetLastError
());
ok
(
strLen
>
0
,
"Unexpected string length.
\n
"
);
}
strLen
=
~
0
;
strLen
=
~
0
;
ret
=
CryptBinaryToStringW
(
input
,
sizeof
(
input
),
CRYPT_STRING_HEXRAW
|
flags
[
i
],
ret
=
CryptBinaryToStringW
(
input
,
sizeof
(
input
),
CRYPT_STRING_HEXRAW
|
flags
[
i
],
NULL
,
&
strLen
);
NULL
,
&
strLen
);
...
...
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