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
8ff5c52b
Commit
8ff5c52b
authored
Oct 09, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dssenh: Implement CPGetHashParam.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5688169
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
6 deletions
+39
-6
main.c
dlls/dssenh/main.c
+39
-1
dssenh.c
dlls/dssenh/tests/dssenh.c
+0
-5
No files found.
dlls/dssenh/main.c
View file @
8ff5c52b
...
...
@@ -431,7 +431,45 @@ BOOL WINAPI CPHashData( HCRYPTPROV hprov, HCRYPTHASH hhash, const BYTE *data, DW
BOOL
WINAPI
CPGetHashParam
(
HCRYPTPROV
hprov
,
HCRYPTHASH
hhash
,
DWORD
param
,
BYTE
*
data
,
DWORD
*
len
,
DWORD
flags
)
{
return
FALSE
;
struct
hash
*
hash
=
(
struct
hash
*
)
hhash
;
TRACE
(
"%p, %p, %08x, %p, %p, %08x
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hhash
,
param
,
data
,
len
,
flags
);
if
(
hash
->
magic
!=
MAGIC_HASH
)
return
FALSE
;
switch
(
param
)
{
case
HP_HASHSIZE
:
if
(
sizeof
(
hash
->
len
)
>
*
len
)
{
*
len
=
sizeof
(
hash
->
len
);
SetLastError
(
ERROR_MORE_DATA
);
return
FALSE
;
}
*
(
DWORD
*
)
data
=
hash
->
len
;
*
len
=
sizeof
(
hash
->
len
);
return
TRUE
;
case
HP_HASHVAL
:
if
(
!
hash
->
finished
)
{
if
(
BCryptFinishHash
(
hash
->
handle
,
hash
->
value
,
hash
->
len
,
0
))
return
FALSE
;
hash
->
finished
=
TRUE
;
}
if
(
hash
->
len
>
*
len
)
{
*
len
=
hash
->
len
;
SetLastError
(
ERROR_MORE_DATA
);
return
FALSE
;
}
memcpy
(
data
,
hash
->
value
,
hash
->
len
);
*
len
=
hash
->
len
;
return
TRUE
;
default:
SetLastError
(
NTE_BAD_TYPE
);
return
FALSE
;
}
}
BOOL
WINAPI
CPDeriveKey
(
HCRYPTPROV
hprov
,
ALG_ID
algid
,
HCRYPTHASH
hhash
,
DWORD
flags
,
HCRYPTKEY
*
ret_key
)
...
...
dlls/dssenh/tests/dssenh.c
View file @
8ff5c52b
...
...
@@ -453,11 +453,6 @@ static void test_hash(const struct hash_test *tests, int testLen)
dataLen
=
sizeof
(
DWORD
);
result
=
CryptGetHashParam
(
hHash
,
HP_HASHSIZE
,
(
BYTE
*
)
&
hashLen
,
&
dataLen
,
0
);
if
(
!
result
)
{
skip
(
"skipping hash tests
\n
"
);
return
;
}
ok
(
result
&&
(
hashLen
==
tests
[
i
].
hashLen
),
"Expected %d hash len, got %d.Error: %x
\n
"
,
tests
[
i
].
hashLen
,
hashLen
,
GetLastError
());
...
...
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