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
603cb316
Commit
603cb316
authored
Oct 12, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dssenh: Set last error in CPHashData.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c822cb99
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
main.c
dlls/dssenh/main.c
+6
-2
dssenh.c
dlls/dssenh/tests/dssenh.c
+2
-2
No files found.
dlls/dssenh/main.c
View file @
603cb316
...
@@ -641,8 +641,12 @@ BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DW
...
@@ -641,8 +641,12 @@ BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DW
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
if
(
hash
->
finished
||
BCryptHashData
(
hash
->
handle
,
(
UCHAR
*
)
data
,
len
,
0
))
return
FALSE
;
if
(
hash
->
finished
)
return
TRUE
;
{
SetLastError
(
NTE_BAD_HASH_STATE
);
return
FALSE
;
}
return
!
BCryptHashData
(
hash
->
handle
,
(
UCHAR
*
)
data
,
len
,
0
);
}
}
BOOL
WINAPI
CPGetHashParam
(
HCRYPTPROV
hprov
,
HCRYPTHASH
hhash
,
DWORD
param
,
BYTE
*
data
,
DWORD
*
len
,
DWORD
flags
)
BOOL
WINAPI
CPGetHashParam
(
HCRYPTPROV
hprov
,
HCRYPTHASH
hhash
,
DWORD
param
,
BYTE
*
data
,
DWORD
*
len
,
DWORD
flags
)
...
...
dlls/dssenh/tests/dssenh.c
View file @
603cb316
...
@@ -1440,7 +1440,7 @@ static void test_duplicate_hash(void)
...
@@ -1440,7 +1440,7 @@ static void test_duplicate_hash(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
result
=
CryptHashData
(
hhash
,
(
const
BYTE
*
)
"winetest"
,
sizeof
(
"winetest"
),
0
);
result
=
CryptHashData
(
hhash
,
(
const
BYTE
*
)
"winetest"
,
sizeof
(
"winetest"
),
0
);
ok
(
!
result
,
"success
\n
"
);
ok
(
!
result
,
"success
\n
"
);
todo_wine
ok
(
GetLastError
()
==
NTE_BAD_HASH_STATE
,
"got %08x
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
NTE_BAD_HASH_STATE
,
"got %08x
\n
"
,
GetLastError
());
result
=
CryptDuplicateHash
(
hhash
,
NULL
,
0
,
&
hhash2
);
result
=
CryptDuplicateHash
(
hhash
,
NULL
,
0
,
&
hhash2
);
ok
(
result
,
"got %08x
\n
"
,
GetLastError
());
ok
(
result
,
"got %08x
\n
"
,
GetLastError
());
...
@@ -1448,7 +1448,7 @@ static void test_duplicate_hash(void)
...
@@ -1448,7 +1448,7 @@ static void test_duplicate_hash(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
result
=
CryptHashData
(
hhash2
,
(
const
BYTE
*
)
"winetest"
,
sizeof
(
"winetest"
),
0
);
result
=
CryptHashData
(
hhash2
,
(
const
BYTE
*
)
"winetest"
,
sizeof
(
"winetest"
),
0
);
ok
(
!
result
,
"success
\n
"
);
ok
(
!
result
,
"success
\n
"
);
todo_wine
ok
(
GetLastError
()
==
NTE_BAD_HASH_STATE
,
"got %08x
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
NTE_BAD_HASH_STATE
,
"got %08x
\n
"
,
GetLastError
());
len
=
sizeof
(
buf
);
len
=
sizeof
(
buf
);
result
=
CryptGetHashParam
(
hhash2
,
HP_HASHVAL
,
buf
,
&
len
,
0
);
result
=
CryptGetHashParam
(
hhash2
,
HP_HASHVAL
,
buf
,
&
len
,
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