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
3a7b89e4
Commit
3a7b89e4
authored
Jul 19, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Jul 21, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh/tests: Simplify broken NT4 tests.
Based on Dmitry Timoshkov idea.
parent
3dbcadc2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
14 deletions
+6
-14
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+6
-14
No files found.
dlls/rsaenh/tests/rsaenh.c
View file @
3a7b89e4
...
...
@@ -414,7 +414,7 @@ static void test_hashes(void)
BYTE
pbHashValue
[
36
];
BYTE
pbSigValue
[
128
];
HCRYPTKEY
hKeyExchangeKey
;
DWORD
hashlen
,
len
,
error
;
DWORD
hashlen
,
len
,
error
,
cryptflags
;
int
i
;
for
(
i
=
0
;
i
<
2048
;
i
++
)
pbData
[
i
]
=
(
unsigned
char
)
i
;
...
...
@@ -449,9 +449,11 @@ static void test_hashes(void)
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
~
0
);
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
CRYPT_USERDATA
);
cryptflags
=
CRYPT_USERDATA
;
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
cryptflags
);
if
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
)
/* <= NT4 */
{
cryptflags
&=
~
CRYPT_USERDATA
;
ok
(
broken
(
1
),
"Failed to support CRYPT_USERDATA flag
\n
"
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
}
...
...
@@ -481,12 +483,7 @@ static void test_hashes(void)
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
~
0
);
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
CRYPT_USERDATA
);
if
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
)
/* <= NT4 */
{
ok
(
broken
(
1
),
"Failed to support CRYPT_USERDATA flag
\n
"
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
}
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
cryptflags
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
len
=
16
;
...
...
@@ -535,12 +532,7 @@ static void test_hashes(void)
result
=
CryptCreateHash
(
hProv
,
CALG_SHA
,
0
,
0
,
&
hHash
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
5
,
CRYPT_USERDATA
);
if
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
)
/* <= NT4 */
{
ok
(
broken
(
1
),
"Failed to support CRYPT_USERDATA flag
\n
"
);
result
=
CryptHashData
(
hHash
,
pbData
,
5
,
0
);
}
result
=
CryptHashData
(
hHash
,
pbData
,
5
,
cryptflags
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
pCryptDuplicateHash
)
{
...
...
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