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
8e479f78
Commit
8e479f78
authored
Feb 10, 2011
by
Juan Lang
Committed by
Alexandre Julliard
Feb 11, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Disallow deriving schannel encryption keys before setting the encryption algorithm.
parent
ea43c598
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
rsaenh.c
dlls/rsaenh/rsaenh.c
+6
-0
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+0
-1
No files found.
dlls/rsaenh/rsaenh.c
View file @
8e479f78
...
...
@@ -3923,6 +3923,12 @@ BOOL WINAPI RSAENH_CPDeriveKey(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTHASH hBaseD
{
/* See RFC 2246, chapter 6.3 Key calculation */
case
CALG_SCHANNEL_ENC_KEY
:
if
(
!
pMasterKey
->
siSChannelInfo
.
saEncAlg
.
Algid
||
!
pMasterKey
->
siSChannelInfo
.
saEncAlg
.
cBits
)
{
SetLastError
(
NTE_BAD_FLAGS
);
return
FALSE
;
}
*
phKey
=
new_key
(
hProv
,
pMasterKey
->
siSChannelInfo
.
saEncAlg
.
Algid
,
MAKELONG
(
LOWORD
(
dwFlags
),
pMasterKey
->
siSChannelInfo
.
saEncAlg
.
cBits
),
&
pCryptKey
);
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
8e479f78
...
...
@@ -2371,7 +2371,6 @@ static void test_schannel_provider(void)
* succeed before the encryption key algorithm is set.
*/
result
=
CryptDeriveKey
(
hProv
,
CALG_SCHANNEL_ENC_KEY
,
hMasterHash
,
CRYPT_SERVER
,
&
hServerWriteKey
);
todo_wine
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
,
"expected NTE_BAD_FLAGS, 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