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
d4c511b9
Commit
d4c511b9
authored
Dec 07, 2017
by
Jacek Caban
Committed by
Alexandre Julliard
Dec 07, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Removed no longer needed ALG_ID argument from helper functions.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3e855644
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
20 deletions
+15
-20
implglue.c
dlls/rsaenh/implglue.c
+3
-5
implglue.h
dlls/rsaenh/implglue.h
+3
-3
rsaenh.c
dlls/rsaenh/rsaenh.c
+9
-12
No files found.
dlls/rsaenh/implglue.c
View file @
d4c511b9
...
...
@@ -82,22 +82,20 @@ BOOL init_hash_impl(ALG_ID aiAlgid, HASH_CONTEXT *pHashContext)
return
!
status
;
}
BOOL
update_hash_impl
(
ALG_ID
aiAlgid
,
HASH_CONTEXT
*
pHashContext
,
const
BYTE
*
pbData
,
DWORD
dwDataLen
)
BOOL
update_hash_impl
(
HASH_CONTEXT
*
pHashContext
,
const
BYTE
*
pbData
,
DWORD
dwDataLen
)
{
BCryptHashData
(
pHashContext
->
bcrypt_hash
,
(
UCHAR
*
)
pbData
,
dwDataLen
,
0
);
return
TRUE
;
}
BOOL
finalize_hash_impl
(
ALG_ID
aiAlgid
,
HASH_CONTEXT
*
pHashContext
,
BYTE
*
pbHashValue
)
BOOL
finalize_hash_impl
(
HASH_CONTEXT
*
pHashContext
,
BYTE
*
pbHashValue
)
{
BCryptFinishHash
(
pHashContext
->
bcrypt_hash
,
pbHashValue
,
RSAENH_MAX_HASH_SIZE
,
0
);
BCryptDestroyHash
(
pHashContext
->
bcrypt_hash
);
return
TRUE
;
}
BOOL
duplicate_hash_impl
(
ALG_ID
aiAlgid
,
const
HASH_CONTEXT
*
pSrcHashContext
,
HASH_CONTEXT
*
pDestHashContext
)
BOOL
duplicate_hash_impl
(
const
HASH_CONTEXT
*
pSrcHashContext
,
HASH_CONTEXT
*
pDestHashContext
)
{
return
!
BCryptDuplicateHash
(
pSrcHashContext
->
bcrypt_hash
,
&
pDestHashContext
->
bcrypt_hash
,
NULL
,
0
,
0
);
}
...
...
dlls/rsaenh/implglue.h
View file @
d4c511b9
...
...
@@ -43,10 +43,10 @@ typedef union tagKEY_CONTEXT {
}
KEY_CONTEXT
;
BOOL
init_hash_impl
(
ALG_ID
aiAlgid
,
HASH_CONTEXT
*
pHashContext
)
DECLSPEC_HIDDEN
;
BOOL
update_hash_impl
(
ALG_ID
aiAlgid
,
HASH_CONTEXT
*
pHashContext
,
const
BYTE
*
pbData
,
BOOL
update_hash_impl
(
HASH_CONTEXT
*
pHashContext
,
const
BYTE
*
pbData
,
DWORD
dwDataLen
)
DECLSPEC_HIDDEN
;
BOOL
finalize_hash_impl
(
ALG_ID
aiAlgid
,
HASH_CONTEXT
*
pHashContext
,
BYTE
*
pbHashValue
)
DECLSPEC_HIDDEN
;
BOOL
duplicate_hash_impl
(
ALG_ID
aiAlgid
,
const
HASH_CONTEXT
*
pSrcHashContext
,
BOOL
finalize_hash_impl
(
HASH_CONTEXT
*
pHashContext
,
BYTE
*
pbHashValue
)
DECLSPEC_HIDDEN
;
BOOL
duplicate_hash_impl
(
const
HASH_CONTEXT
*
pSrcHashContext
,
HASH_CONTEXT
*
pDestHashContext
)
DECLSPEC_HIDDEN
;
BOOL
new_key_impl
(
ALG_ID
aiAlgid
,
KEY_CONTEXT
*
pKeyContext
,
DWORD
dwKeyLen
)
DECLSPEC_HIDDEN
;
...
...
dlls/rsaenh/rsaenh.c
View file @
d4c511b9
...
...
@@ -635,7 +635,7 @@ static inline BOOL init_hash(CRYPTHASH *pCryptHash) {
if
(
!
pAlgInfo
)
return
FALSE
;
pCryptHash
->
dwHashSize
=
pAlgInfo
->
dwDefaultLen
>>
3
;
init_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
);
update_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
,
update_hash_impl
(
&
pCryptHash
->
context
,
pCryptHash
->
pHMACInfo
->
pbInnerString
,
pCryptHash
->
pHMACInfo
->
cbInnerString
);
}
...
...
@@ -671,8 +671,7 @@ static inline void update_hash(CRYPTHASH *pCryptHash, const BYTE *pbData, DWORD
{
case
CALG_HMAC
:
if
(
pCryptHash
->
pHMACInfo
)
update_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
,
pbData
,
dwDataLen
);
update_hash_impl
(
&
pCryptHash
->
context
,
pbData
,
dwDataLen
);
break
;
case
CALG_MAC
:
...
...
@@ -685,7 +684,7 @@ static inline void update_hash(CRYPTHASH *pCryptHash, const BYTE *pbData, DWORD
break
;
default:
update_hash_impl
(
pCryptHash
->
aiAlgid
,
&
pCryptHash
->
context
,
pbData
,
dwDataLen
);
update_hash_impl
(
&
pCryptHash
->
context
,
pbData
,
dwDataLen
);
}
}
...
...
@@ -707,17 +706,15 @@ static inline void finalize_hash(CRYPTHASH *pCryptHash) {
if
(
pCryptHash
->
pHMACInfo
)
{
BYTE
abHashValue
[
RSAENH_MAX_HASH_SIZE
];
finalize_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
,
pCryptHash
->
abHashValue
);
finalize_hash_impl
(
&
pCryptHash
->
context
,
pCryptHash
->
abHashValue
);
memcpy
(
abHashValue
,
pCryptHash
->
abHashValue
,
pCryptHash
->
dwHashSize
);
init_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
);
update_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
,
update_hash_impl
(
&
pCryptHash
->
context
,
pCryptHash
->
pHMACInfo
->
pbOuterString
,
pCryptHash
->
pHMACInfo
->
cbOuterString
);
update_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
,
update_hash_impl
(
&
pCryptHash
->
context
,
abHashValue
,
pCryptHash
->
dwHashSize
);
finalize_hash_impl
(
pCryptHash
->
pHMACInfo
->
HashAlgid
,
&
pCryptHash
->
context
,
pCryptHash
->
abHashValue
);
finalize_hash_impl
(
&
pCryptHash
->
context
,
pCryptHash
->
abHashValue
);
}
break
;
...
...
@@ -728,7 +725,7 @@ static inline void finalize_hash(CRYPTHASH *pCryptHash) {
break
;
default:
finalize_hash_impl
(
pCryptHash
->
aiAlgid
,
&
pCryptHash
->
context
,
pCryptHash
->
abHashValue
);
finalize_hash_impl
(
&
pCryptHash
->
context
,
pCryptHash
->
abHashValue
);
}
}
...
...
@@ -2069,7 +2066,7 @@ BOOL WINAPI RSAENH_CPDuplicateHash(HCRYPTPROV hUID, HCRYPTHASH hHash, DWORD *pdw
if
(
*
phHash
!=
(
HCRYPTHASH
)
INVALID_HANDLE_VALUE
)
{
*
pDestHash
=
*
pSrcHash
;
duplicate_hash_impl
(
pSrcHash
->
aiAlgid
,
&
pSrcHash
->
context
,
&
pDestHash
->
context
);
duplicate_hash_impl
(
&
pSrcHash
->
context
,
&
pDestHash
->
context
);
copy_hmac_info
(
&
pDestHash
->
pHMACInfo
,
pSrcHash
->
pHMACInfo
);
copy_data_blob
(
&
pDestHash
->
tpPRFParams
.
blobLabel
,
&
pSrcHash
->
tpPRFParams
.
blobLabel
);
copy_data_blob
(
&
pDestHash
->
tpPRFParams
.
blobSeed
,
&
pSrcHash
->
tpPRFParams
.
blobSeed
);
...
...
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