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
8456f67a
Commit
8456f67a
authored
Nov 07, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Nov 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Pass key length to CryptDeriveKey.
parent
fd1dd39a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
protectdata.c
dlls/crypt32/protectdata.c
+4
-4
No files found.
dlls/crypt32/protectdata.c
View file @
8456f67a
...
...
@@ -704,7 +704,7 @@ BOOL hash_matches_blob(HCRYPTHASH hHash, const DATA_BLOB *two)
/* create an encryption key from a given salt and optional entropy */
static
BOOL
load_encryption_key
(
HCRYPTPROV
hProv
,
const
DATA_BLOB
*
salt
,
BOOL
load_encryption_key
(
HCRYPTPROV
hProv
,
DWORD
key_len
,
const
DATA_BLOB
*
salt
,
const
DATA_BLOB
*
pOptionalEntropy
,
HCRYPTKEY
*
phKey
)
{
BOOL
rc
=
TRUE
;
...
...
@@ -753,7 +753,7 @@ BOOL load_encryption_key(HCRYPTPROV hProv, const DATA_BLOB *salt,
/* produce a symmetric key */
if
(
rc
&&
!
CryptDeriveKey
(
hProv
,
CRYPT32_PROTECTDATA_KEY_CALG
,
hSaltHash
,
CRYPT_EXPORTABLE
,
phKey
))
hSaltHash
,
key_len
<<
16
|
CRYPT_EXPORTABLE
,
phKey
))
{
ERR
(
"CryptDeriveKey
\n
"
);
rc
=
FALSE
;
...
...
@@ -871,7 +871,7 @@ BOOL WINAPI CryptProtectData(DATA_BLOB* pDataIn,
}
/* load key */
if
(
!
load_encryption_key
(
hProv
,
&
protect_data
.
salt
,
pOptionalEntropy
,
&
hKey
))
if
(
!
load_encryption_key
(
hProv
,
protect_data
.
cipher_key_len
,
&
protect_data
.
salt
,
pOptionalEntropy
,
&
hKey
))
{
goto
free_protect_data
;
}
...
...
@@ -1050,7 +1050,7 @@ BOOL WINAPI CryptUnprotectData(DATA_BLOB* pDataIn,
}
/* load key */
if
(
!
load_encryption_key
(
hProv
,
&
protect_data
.
salt
,
pOptionalEntropy
,
&
hKey
))
if
(
!
load_encryption_key
(
hProv
,
protect_data
.
cipher_key_len
,
&
protect_data
.
salt
,
pOptionalEntropy
,
&
hKey
))
{
goto
free_context
;
}
...
...
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