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
a7144756
Commit
a7144756
authored
Oct 20, 2020
by
Hans Leidekker
Committed by
Alexandre Julliard
Oct 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dssenh: Always duplicate container keys.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
04acc70d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
13 deletions
+17
-13
main.c
dlls/dssenh/main.c
+17
-13
No files found.
dlls/dssenh/main.c
View file @
a7144756
...
...
@@ -433,11 +433,7 @@ static BOOL generate_key( struct container *container, ALG_ID algid, DWORD bitle
return
FALSE
;
}
if
(
!
store_key_container_keys
(
container
))
{
destroy_key
(
key
);
return
FALSE
;
}
if
(
!
store_key_container_keys
(
container
))
return
FALSE
;
*
ret_key
=
(
HCRYPTKEY
)
key
;
return
TRUE
;
...
...
@@ -494,7 +490,7 @@ BOOL WINAPI CPImportKey( HCRYPTPROV hprov, const BYTE *data, DWORD len, HCRYPTKE
HCRYPTKEY
*
ret_key
)
{
struct
container
*
container
=
(
struct
container
*
)
hprov
;
struct
key
*
key
;
struct
key
*
key
,
*
exch_key
,
*
sign_key
;
BLOBHEADER
*
hdr
;
DSSPUBKEY
*
pubkey
;
const
WCHAR
*
type
;
...
...
@@ -549,12 +545,24 @@ BOOL WINAPI CPImportKey( HCRYPTPROV hprov, const BYTE *data, DWORD len, HCRYPTKE
{
case
AT_KEYEXCHANGE
:
case
CALG_DH_SF
:
container
->
exch_key
=
key
;
if
(
!
(
exch_key
=
duplicate_key
(
key
)))
{
destroy_key
(
key
);
return
FALSE
;
}
destroy_key
(
container
->
exch_key
);
container
->
exch_key
=
exch_key
;
break
;
case
AT_SIGNATURE
:
case
CALG_DSS_SIGN
:
container
->
sign_key
=
key
;
if
(
!
(
sign_key
=
duplicate_key
(
key
)))
{
destroy_key
(
key
);
return
FALSE
;
}
destroy_key
(
container
->
sign_key
);
container
->
sign_key
=
sign_key
;
break
;
default:
...
...
@@ -563,11 +571,7 @@ BOOL WINAPI CPImportKey( HCRYPTPROV hprov, const BYTE *data, DWORD len, HCRYPTKE
return
FALSE
;
}
if
(
!
store_key_container_keys
(
container
))
{
destroy_key
(
key
);
return
FALSE
;
}
if
(
!
store_key_container_keys
(
container
))
return
FALSE
;
}
*
ret_key
=
(
HCRYPTKEY
)
key
;
...
...
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