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
1991ff2a
Commit
1991ff2a
authored
Mar 30, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Mar 31, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Don't return salt for algorithms that don't support it.
parent
c5a6b7b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
rsaenh.c
dlls/rsaenh/rsaenh.c
+10
-2
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+0
-2
No files found.
dlls/rsaenh/rsaenh.c
View file @
1991ff2a
...
...
@@ -3513,8 +3513,16 @@ BOOL WINAPI RSAENH_CPGetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
pCryptKey
->
dwBlockLen
);
case
KP_SALT
:
return
copy_param
(
pbData
,
pdwDataLen
,
&
pCryptKey
->
abKeyValue
[
pCryptKey
->
dwKeyLen
],
pCryptKey
->
dwSaltLen
);
switch
(
pCryptKey
->
aiAlgid
)
{
case
CALG_RC2
:
case
CALG_RC4
:
return
copy_param
(
pbData
,
pdwDataLen
,
&
pCryptKey
->
abKeyValue
[
pCryptKey
->
dwKeyLen
],
pCryptKey
->
dwSaltLen
);
default:
SetLastError
(
NTE_BAD_KEY
);
return
FALSE
;
}
case
KP_PADDING
:
dwValue
=
PKCS5_PADDING
;
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
1991ff2a
...
...
@@ -744,7 +744,6 @@ static void test_aes(int keylen)
/* AES provider doesn't support salt */
result
=
CryptGetKeyParam
(
hKey
,
KP_SALT
,
NULL
,
&
dwLen
,
0
);
todo_wine
ok
(
!
result
&&
(
GetLastError
()
==
NTE_BAD_KEY
||
GetLastError
()
==
ERROR_NO_TOKEN
/* Win7 */
),
"expected NTE_BAD_KEY or ERROR_NO_TOKEN, got %08x
\n
"
,
GetLastError
());
...
...
@@ -1742,7 +1741,6 @@ static void test_rsa_encrypt(void)
/* An RSA key doesn't support salt */
result
=
CryptGetKeyParam
(
hRSAKey
,
KP_SALT
,
NULL
,
&
dwLen
,
0
);
todo_wine
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_KEY
,
"expected NTE_BAD_KEY, got %08x
\n
"
,
GetLastError
());
...
...
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