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
0695b0dc
Commit
0695b0dc
authored
Nov 10, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Nov 11, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix test failures across Windows versions.
parent
49c1a347
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
4 deletions
+28
-4
encode.c
dlls/crypt32/tests/encode.c
+28
-4
No files found.
dlls/crypt32/tests/encode.c
View file @
0695b0dc
...
...
@@ -1391,11 +1391,35 @@ static void test_decodeNameValue(DWORD dwEncoding)
embeddedNullNameValue
.
value
.
dwValueType
,
GetLastError
());
if
(
ret
)
{
CERT_NAME_VALUE
v
alue
=
{
CERT_RDN_ENCODED_BLOB
,
CERT_NAME_VALUE
rdnEncodedV
alue
=
{
CERT_RDN_ENCODED_BLOB
,
{
sizeof
(
ia5EmbeddedNull
),
ia5EmbeddedNull
}
};
todo_wine
compareNameValues
(
&
value
,
(
const
CERT_NAME_VALUE
*
)
buf
);
CERT_NAME_VALUE
embeddedNullValue
=
{
CERT_RDN_IA5_STRING
,
{
sizeof
(
embedded_null
)
-
1
,
(
BYTE
*
)
embedded_null
}
};
const
CERT_NAME_VALUE
*
got
=
(
const
CERT_NAME_VALUE
*
)
buf
,
*
expected
=
NULL
;
/* Some Windows versions decode name values with embedded NULLs,
* others leave them encoded, even with the same version of crypt32.
* Accept either.
*/
ok
(
got
->
dwValueType
==
CERT_RDN_ENCODED_BLOB
||
got
->
dwValueType
==
CERT_RDN_IA5_STRING
,
"Expected CERT_RDN_ENCODED_BLOB or CERT_RDN_IA5_STRING, got %d
\n
"
,
got
->
dwValueType
);
if
(
got
->
dwValueType
==
CERT_RDN_ENCODED_BLOB
)
expected
=
&
rdnEncodedValue
;
else
if
(
got
->
dwValueType
==
CERT_RDN_IA5_STRING
)
expected
=
&
embeddedNullValue
;
if
(
expected
)
{
ok
(
got
->
Value
.
cbData
==
expected
->
Value
.
cbData
,
"String type %d: unexpected data size, got %d, expected %d
\n
"
,
got
->
dwValueType
,
got
->
Value
.
cbData
,
expected
->
Value
.
cbData
);
if
(
got
->
Value
.
cbData
&&
got
->
Value
.
pbData
)
ok
(
!
memcmp
(
got
->
Value
.
pbData
,
expected
->
Value
.
pbData
,
min
(
got
->
Value
.
cbData
,
expected
->
Value
.
cbData
)),
"String type %d: unexpected value
\n
"
,
expected
->
dwValueType
);
}
LocalFree
(
buf
);
}
}
...
...
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