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
9d2cc217
Commit
9d2cc217
authored
Apr 10, 2008
by
James Hawkins
Committed by
Alexandre Julliard
Apr 11, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix a few tests that fail in win2k.
parent
9dc97960
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
10 deletions
+28
-10
oid.c
dlls/crypt32/tests/oid.c
+6
-4
protectdata.c
dlls/crypt32/tests/protectdata.c
+22
-6
No files found.
dlls/crypt32/tests/oid.c
View file @
9d2cc217
...
...
@@ -99,10 +99,12 @@ static void testOIDToAlgID(void)
/* Test with a bogus one */
SetLastError
(
0xdeadbeef
);
alg
=
CertOIDToAlgId
(
"1.2.3"
);
ok
(
!
alg
&&
(
GetLastError
()
==
0xdeadbeef
||
GetLastError
()
==
ERROR_RESOURCE_NAME_NOT_FOUND
),
"Expected ERROR_RESOURCE_NAME_NOT_FOUND or no error set, got %08x
\n
"
,
GetLastError
());
ok
(
!
alg
,
"Expected failure, got %d
\n
"
,
alg
);
ok
(
GetLastError
()
==
0xdeadbeef
||
GetLastError
()
==
ERROR_RESOURCE_NAME_NOT_FOUND
||
GetLastError
()
==
ERROR_SUCCESS
,
/* win2k */
"Expected ERROR_RESOURCE_NAME_NOT_FOUND, ERROR_SUCCESS "
"or no error set, got %08x
\n
"
,
GetLastError
());
for
(
i
=
0
;
i
<
sizeof
(
oidToAlgID
)
/
sizeof
(
oidToAlgID
[
0
]);
i
++
)
{
...
...
dlls/crypt32/tests/protectdata.c
View file @
9d2cc217
...
...
@@ -71,7 +71,9 @@ static void test_cryptprotectdata(void)
protected
=
pCryptProtectData
(
&
plain
,
desc
,
NULL
,
NULL
,
NULL
,
0
,
&
cipher
);
ok
(
protected
,
"Encrypting without entropy.
\n
"
);
r
=
GetLastError
();
ok
(
r
==
ERROR_SUCCESS
,
"Wrong (%u) GetLastError seen
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
||
r
==
ERROR_IO_PENDING
,
/* win2k */
"Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d
\n
"
,
r
);
cipher_entropy
.
pbData
=
NULL
;
cipher_entropy
.
cbData
=
0
;
...
...
@@ -81,7 +83,9 @@ static void test_cryptprotectdata(void)
protected
=
pCryptProtectData
(
&
plain
,
desc
,
&
entropy
,
NULL
,
NULL
,
0
,
&
cipher_entropy
);
ok
(
protected
,
"Encrypting with entropy.
\n
"
);
r
=
GetLastError
();
ok
(
r
==
ERROR_SUCCESS
,
"Wrong (%u) GetLastError seen
\n
"
,
r
);
ok
(
r
==
ERROR_SUCCESS
||
r
==
ERROR_IO_PENDING
,
/* win2k */
"Expected ERROR_SUCCESS or ERROR_IO_PENDING, got %d
\n
"
,
r
);
cipher_no_desc
.
pbData
=
NULL
;
cipher_no_desc
.
cbData
=
0
;
...
...
@@ -91,9 +95,17 @@ static void test_cryptprotectdata(void)
plain
.
cbData
=
strlen
(
secret2
)
+
1
;
SetLastError
(
0xDEADBEEF
);
protected
=
pCryptProtectData
(
&
plain
,
NULL
,
&
entropy
,
NULL
,
NULL
,
0
,
&
cipher_no_desc
);
ok
(
protected
,
"Encrypting with entropy and no description.
\n
"
);
r
=
GetLastError
();
ok
(
r
==
ERROR_SUCCESS
,
"Wrong (%u) GetLastError seen
\n
"
,
r
);
if
(
protected
)
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
}
else
{
/* fails in win2k */
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
}
}
static
void
test_cryptunprotectdata
(
void
)
...
...
@@ -107,8 +119,12 @@ static void test_cryptunprotectdata(void)
entropy
.
pbData
=
(
void
*
)
key
;
entropy
.
cbData
=
strlen
(
key
)
+
1
;
ok
(
protected
,
"CryptProtectData failed to run, so I can't test its output
\n
"
);
if
(
!
protected
)
return
;
/* fails in win2k */
if
(
!
protected
)
{
skip
(
"CryptProtectData failed to run
\\
n"
);
return
;
}
plain
.
pbData
=
NULL
;
plain
.
cbData
=
0
;
...
...
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