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
86dd877f
Commit
86dd877f
authored
Jul 30, 2014
by
Bruno Jesus
Committed by
Alexandre Julliard
Aug 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: The RC2 algorithm from Base provider supports only 40 bit keys.
parent
a8b1fee2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
rsaenh.c
dlls/rsaenh/rsaenh.c
+9
-2
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+0
-1
No files found.
dlls/rsaenh/rsaenh.c
View file @
86dd877f
...
...
@@ -3495,22 +3495,29 @@ BOOL WINAPI RSAENH_CPSetKeyParam(HCRYPTPROV hProv, HCRYPTKEY hKey, DWORD dwParam
case
KP_EFFECTIVE_KEYLEN
:
switch
(
pCryptKey
->
aiAlgid
)
{
case
CALG_RC2
:
{
DWORD
keylen
;
KEYCONTAINER
*
pKeyContainer
=
get_key_container
(
pCryptKey
->
hProv
);
if
(
!
pbData
)
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
else
if
(
!*
(
DWORD
*
)
pbData
||
*
(
DWORD
*
)
pbData
>
1024
)
keylen
=
*
(
DWORD
*
)
pbData
;
if
(
!
keylen
||
keylen
>
1024
||
(
keylen
!=
40
&&
pKeyContainer
->
dwPersonality
==
RSAENH_PERSONALITY_BASE
))
{
SetLastError
(
NTE_BAD_DATA
);
return
FALSE
;
}
else
{
pCryptKey
->
dwEffectiveKeyLen
=
*
(
DWORD
*
)
pbData
;
pCryptKey
->
dwEffectiveKeyLen
=
keylen
;
setup_key
(
pCryptKey
);
}
break
;
}
default:
SetLastError
(
NTE_BAD_TYPE
);
return
FALSE
;
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
86dd877f
...
...
@@ -1529,7 +1529,6 @@ static void test_rc2(void)
if
(
!
BASE_PROV
)
ok
(
result
,
"expected success, got error 0x%08X
\n
"
,
GetLastError
());
else
todo_wine
ok
(
!
result
,
"expected error
\n
"
);
dwLen
=
sizeof
(
dwKeyLen
);
...
...
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