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
16042cff
Commit
16042cff
authored
Jan 13, 2009
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 13, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Remove superfluous pointer casts.
parent
4b50a4c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
16 deletions
+16
-16
rsaenh.c
dlls/rsaenh/rsaenh.c
+5
-5
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+11
-11
No files found.
dlls/rsaenh/rsaenh.c
View file @
16042cff
...
...
@@ -2737,8 +2737,8 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa
finalize_hash
(
pCryptHash
);
pCryptHash
->
dwState
=
RSAENH_HASHSTATE_FINISHED
;
}
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
pCryptHash
->
abHashValue
,
return
copy_param
(
pbData
,
pdwDataLen
,
pCryptHash
->
abHashValue
,
pCryptHash
->
dwHashSize
);
default:
...
...
@@ -2950,13 +2950,13 @@ BOOL WINAPI RSAENH_CPGetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
switch
(
dwParam
)
{
case
KP_IV
:
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
pCryptKey
->
abInitVector
,
return
copy_param
(
pbData
,
pdwDataLen
,
pCryptKey
->
abInitVector
,
pCryptKey
->
dwBlockLen
);
case
KP_SALT
:
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
pCryptKey
->
abKeyValue
[
pCryptKey
->
dwKeyLen
],
pCryptKey
->
dwSaltLen
);
&
pCryptKey
->
abKeyValue
[
pCryptKey
->
dwKeyLen
],
pCryptKey
->
dwSaltLen
);
case
KP_PADDING
:
dwValue
=
PKCS5_PADDING
;
return
copy_param
(
pbData
,
pdwDataLen
,
(
CONST
BYTE
*
)
&
dwValue
,
sizeof
(
DWORD
));
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
16042cff
...
...
@@ -270,7 +270,7 @@ static BOOL derive_key(ALG_ID aiAlgid, HCRYPTKEY *phKey, DWORD len)
}
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
!
result
)
return
FALSE
;
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
!
result
)
return
FALSE
;
result
=
CryptDeriveKey
(
hProv
,
aiAlgid
,
hHash
,
(
len
<<
16
)
|
CRYPT_EXPORTABLE
,
phKey
);
...
...
@@ -315,7 +315,7 @@ static void test_hashes(void)
/* rsaenh compiled without OpenSSL */
ok
(
GetLastError
()
==
NTE_BAD_ALGID
,
"%08x
\n
"
,
GetLastError
());
}
else
{
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
len
=
sizeof
(
DWORD
);
...
...
@@ -336,7 +336,7 @@ static void test_hashes(void)
result
=
CryptCreateHash
(
hProv
,
CALG_MD4
,
0
,
0
,
&
hHash
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
len
=
sizeof
(
DWORD
);
...
...
@@ -360,7 +360,7 @@ static void test_hashes(void)
result
=
CryptGetHashParam
(
hHash
,
HP_HASHSIZE
,
(
BYTE
*
)
&
hashlen
,
&
len
,
0
);
ok
(
result
&&
(
hashlen
==
16
),
"%08x, hashlen: %d
\n
"
,
GetLastError
(),
hashlen
);
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
len
=
16
;
...
...
@@ -390,7 +390,7 @@ static void test_hashes(void)
/* Can't add data after the hash been retrieved */
SetLastError
(
0xdeadbeef
);
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
!
result
,
"Expected failure
\n
"
);
ok
(
GetLastError
()
==
NTE_BAD_HASH_STATE
||
GetLastError
()
==
NTE_BAD_ALGID
,
/* Win9x, WinMe, NT4 */
...
...
@@ -409,7 +409,7 @@ static void test_hashes(void)
result
=
CryptCreateHash
(
hProv
,
CALG_SHA
,
0
,
0
,
&
hHash
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
5
,
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
5
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
pCryptDuplicateHash
)
{
...
...
@@ -766,7 +766,7 @@ static void test_rc2(void)
}
else
{
CRYPT_INTEGER_BLOB
salt
;
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
dwLen
=
16
;
...
...
@@ -855,7 +855,7 @@ static void test_rc2(void)
if
(
!
result
)
{
ok
(
GetLastError
()
==
NTE_BAD_ALGID
,
"%08x
\n
"
,
GetLastError
());
}
else
{
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
dwLen
=
16
;
...
...
@@ -935,7 +935,7 @@ static void test_rc4(void)
}
else
{
CRYPT_INTEGER_BLOB
salt
;
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
dwLen
=
16
;
...
...
@@ -1027,7 +1027,7 @@ static void test_hmac(void) {
result
=
CryptSetHashParam
(
hHash
,
HP_HMAC_INFO
,
(
BYTE
*
)
&
hmacInfo
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
abData
,
sizeof
(
abData
),
0
);
result
=
CryptHashData
(
hHash
,
abData
,
sizeof
(
abData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
dwLen
=
sizeof
(
abData
)
/
sizeof
(
BYTE
);
...
...
@@ -1069,7 +1069,7 @@ static void test_mac(void) {
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
!
result
)
return
;
result
=
CryptHashData
(
hHash
,
(
BYTE
*
)
abData
,
sizeof
(
abData
),
0
);
result
=
CryptHashData
(
hHash
,
abData
,
sizeof
(
abData
),
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
dwLen
=
sizeof
(
abData
)
/
sizeof
(
BYTE
);
...
...
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