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
74f458fc
Commit
74f458fc
authored
Dec 20, 2004
by
Michael Jung
Committed by
Alexandre Julliard
Dec 20, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Respect sDescription parameter in CPSignHash and CPVerifySignature.
parent
10411d5f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
12 deletions
+23
-12
rsaenh.c
dlls/rsaenh/rsaenh.c
+23
-12
No files found.
dlls/rsaenh/rsaenh.c
View file @
74f458fc
...
...
@@ -2679,9 +2679,6 @@ BOOL WINAPI RSAENH_CPSetProvParam(HCRYPTPROV hProv, DWORD dwParam, BYTE *pbData,
* RETURNS
* Success: TRUE
* Failure: FALSE
*
* NOTES
* FIXME: sDescription is currently ignored.
*/
BOOL
WINAPI
RSAENH_CPSignHash
(
HCRYPTPROV
hProv
,
HCRYPTHASH
hHash
,
DWORD
dwKeySpec
,
LPCWSTR
sDescription
,
DWORD
dwFlags
,
BYTE
*
pbSignature
,
...
...
@@ -2711,12 +2708,6 @@ BOOL WINAPI RSAENH_CPSignHash(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwKeySpe
return
FALSE
;
}
dwHashLen
=
sizeof
(
DWORD
);
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hHash
,
HP_ALGID
,
(
BYTE
*
)
&
aiAlgid
,
&
dwHashLen
,
0
))
return
FALSE
;
dwHashLen
=
RSAENH_MAX_HASH_SIZE
;
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hHash
,
HP_HASHVAL
,
abHashValue
,
&
dwHashLen
,
0
))
return
FALSE
;
if
(
!
pbSignature
)
{
*
pdwSigLen
=
pCryptKey
->
dwKeyLen
;
return
TRUE
;
...
...
@@ -2729,6 +2720,21 @@ BOOL WINAPI RSAENH_CPSignHash(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwKeySpe
}
*
pdwSigLen
=
pCryptKey
->
dwKeyLen
;
if
(
sDescription
)
{
if
(
!
RSAENH_CPHashData
(
hProv
,
hHash
,
(
CONST
BYTE
*
)
sDescription
,
(
DWORD
)
lstrlenW
(
sDescription
)
*
sizeof
(
WCHAR
),
0
))
{
return
FALSE
;
}
}
dwHashLen
=
sizeof
(
DWORD
);
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hHash
,
HP_ALGID
,
(
BYTE
*
)
&
aiAlgid
,
&
dwHashLen
,
0
))
return
FALSE
;
dwHashLen
=
RSAENH_MAX_HASH_SIZE
;
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hHash
,
HP_HASHVAL
,
abHashValue
,
&
dwHashLen
,
0
))
return
FALSE
;
if
(
!
build_hash_signature
(
pbSignature
,
*
pdwSigLen
,
aiAlgid
,
abHashValue
,
dwHashLen
,
dwFlags
))
{
return
FALSE
;
}
...
...
@@ -2753,9 +2759,6 @@ BOOL WINAPI RSAENH_CPSignHash(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwKeySpe
* RETURNS
* Success: TRUE (Signature is valid)
* Failure: FALSE (GetLastError() == NTE_BAD_SIGNATURE, if signature is invalid)
*
* NOTES
* FIXME: sDescription is currently ignored.
*/
BOOL
WINAPI
RSAENH_CPVerifySignature
(
HCRYPTPROV
hProv
,
HCRYPTHASH
hHash
,
CONST
BYTE
*
pbSignature
,
DWORD
dwSigLen
,
HCRYPTKEY
hPubKey
,
LPCWSTR
sDescription
,
...
...
@@ -2790,6 +2793,14 @@ BOOL WINAPI RSAENH_CPVerifySignature(HCRYPTPROV hProv, HCRYPTHASH hHash, CONST B
return
FALSE
;
}
if
(
sDescription
)
{
if
(
!
RSAENH_CPHashData
(
hProv
,
hHash
,
(
CONST
BYTE
*
)
sDescription
,
(
DWORD
)
lstrlenW
(
sDescription
)
*
sizeof
(
WCHAR
),
0
))
{
return
FALSE
;
}
}
dwHashLen
=
sizeof
(
DWORD
);
if
(
!
RSAENH_CPGetHashParam
(
hProv
,
hHash
,
HP_ALGID
,
(
BYTE
*
)
&
aiAlgid
,
&
dwHashLen
,
0
))
return
FALSE
;
...
...
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