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
e32b29a3
Commit
e32b29a3
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: Implement CPDuplicateKey.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bf83b89d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
1 deletion
+28
-1
dssenh.spec
dlls/dssenh/dssenh.spec
+1
-1
main.c
dlls/dssenh/main.c
+27
-0
No files found.
dlls/dssenh/dssenh.spec
View file @
e32b29a3
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
@ stdcall CPDestroyHash(ptr ptr)
@ stdcall CPDestroyHash(ptr ptr)
@ stdcall CPDestroyKey(ptr ptr)
@ stdcall CPDestroyKey(ptr ptr)
@ stdcall CPDuplicateHash(ptr ptr ptr long ptr)
@ stdcall CPDuplicateHash(ptr ptr ptr long ptr)
@ st
ub CPDuplicateKey
@ st
dcall CPDuplicateKey(ptr ptr ptr long ptr)
@ stub CPEncrypt
@ stub CPEncrypt
@ stdcall CPExportKey(ptr ptr ptr long long ptr ptr)
@ stdcall CPExportKey(ptr ptr ptr long long ptr ptr)
@ stdcall CPGenKey(ptr long long ptr)
@ stdcall CPGenKey(ptr long long ptr)
...
...
dlls/dssenh/main.c
View file @
e32b29a3
...
@@ -471,6 +471,33 @@ BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DW
...
@@ -471,6 +471,33 @@ BOOL WINAPI CPExportKey( HCRYPTPROV hprov, HCRYPTKEY hkey, HCRYPTKEY hexpkey, DW
return
FALSE
;
return
FALSE
;
}
}
static
struct
key
*
duplicate_key
(
const
struct
key
*
key
)
{
struct
key
*
ret
;
if
(
!
(
ret
=
create_key
(
key
->
algid
,
key
->
flags
)))
return
NULL
;
if
(
BCryptDuplicateKey
(
key
->
handle
,
&
ret
->
handle
,
NULL
,
0
,
0
))
{
heap_free
(
ret
);
return
NULL
;
}
return
ret
;
}
BOOL
WINAPI
CPDuplicateKey
(
HCRYPTPROV
hprov
,
HCRYPTKEY
hkey
,
DWORD
*
reserved
,
DWORD
flags
,
HCRYPTKEY
*
ret_key
)
{
struct
key
*
key
=
(
struct
key
*
)
hkey
,
*
ret
;
TRACE
(
"%p, %p, %p, %08x, %p
\n
"
,
(
void
*
)
hprov
,
(
void
*
)
hkey
,
reserved
,
flags
,
ret_key
);
if
(
key
->
magic
!=
MAGIC_KEY
)
return
FALSE
;
if
(
!
(
ret
=
duplicate_key
(
key
)))
return
FALSE
;
*
ret_key
=
(
HCRYPTKEY
)
ret
;
return
TRUE
;
}
static
struct
hash
*
create_hash
(
ALG_ID
algid
)
static
struct
hash
*
create_hash
(
ALG_ID
algid
)
{
{
struct
hash
*
ret
;
struct
hash
*
ret
;
...
...
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