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
786c57d3
Commit
786c57d3
authored
Jan 16, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Jan 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Only set key length on successful retrieval of hash value.
parent
7f0db794
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
rsaenh.c
dlls/rsaenh/rsaenh.c
+4
-2
No files found.
dlls/rsaenh/rsaenh.c
View file @
786c57d3
...
@@ -4216,6 +4216,7 @@ BOOL WINAPI RSAENH_CPSetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
...
@@ -4216,6 +4216,7 @@ BOOL WINAPI RSAENH_CPSetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
if
(
pCryptKey
->
aiAlgid
==
CALG_HMAC
&&
!
pCryptKey
->
dwKeyLen
)
{
if
(
pCryptKey
->
aiAlgid
==
CALG_HMAC
&&
!
pCryptKey
->
dwKeyLen
)
{
HCRYPTHASH
hKeyHash
;
HCRYPTHASH
hKeyHash
;
DWORD
keyLen
;
if
(
!
RSAENH_CPCreateHash
(
hProv
,
((
PHMAC_INFO
)
pbData
)
->
HashAlgid
,
0
,
0
,
if
(
!
RSAENH_CPCreateHash
(
hProv
,
((
PHMAC_INFO
)
pbData
)
->
HashAlgid
,
0
,
0
,
&
hKeyHash
))
&
hKeyHash
))
...
@@ -4226,13 +4227,14 @@ BOOL WINAPI RSAENH_CPSetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
...
@@ -4226,13 +4227,14 @@ BOOL WINAPI RSAENH_CPSetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
RSAENH_CPDestroyHash
(
hProv
,
hKeyHash
);
RSAENH_CPDestroyHash
(
hProv
,
hKeyHash
);
return
FALSE
;
return
FALSE
;
}
}
pCryptKey
->
dwK
eyLen
=
sizeof
(
pCryptKey
->
abKeyValue
);
k
eyLen
=
sizeof
(
pCryptKey
->
abKeyValue
);
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hKeyHash
,
HP_HASHVAL
,
pCryptKey
->
abKeyValue
,
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hKeyHash
,
HP_HASHVAL
,
pCryptKey
->
abKeyValue
,
&
pCryptKey
->
dwK
eyLen
,
0
))
&
k
eyLen
,
0
))
{
{
RSAENH_CPDestroyHash
(
hProv
,
hKeyHash
);
RSAENH_CPDestroyHash
(
hProv
,
hKeyHash
);
return
FALSE
;
return
FALSE
;
}
}
pCryptKey
->
dwKeyLen
=
keyLen
;
RSAENH_CPDestroyHash
(
hProv
,
hKeyHash
);
RSAENH_CPDestroyHash
(
hProv
,
hKeyHash
);
}
}
for
(
i
=
0
;
i
<
RSAENH_MIN
(
pCryptKey
->
dwKeyLen
,
pCryptHash
->
pHMACInfo
->
cbInnerString
);
i
++
)
{
for
(
i
=
0
;
i
<
RSAENH_MIN
(
pCryptKey
->
dwKeyLen
,
pCryptHash
->
pHMACInfo
->
cbInnerString
);
i
++
)
{
...
...
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