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
ea43c598
Commit
ea43c598
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 creating schannel master hashes before setting the client…
rsaenh: Disallow creating schannel master hashes before setting the client random and server random.
parent
b0ae8ca7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
14 deletions
+7
-14
rsaenh.c
dlls/rsaenh/rsaenh.c
+7
-0
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+0
-14
No files found.
dlls/rsaenh/rsaenh.c
View file @
ea43c598
...
...
@@ -1857,6 +1857,13 @@ BOOL WINAPI RSAENH_CPCreateHash(HCRYPTPROV hProv, ALG_ID Algid, HCRYPTKEY hKey,
SetLastError
(
NTE_BAD_KEY
);
return
FALSE
;
}
if
(
Algid
==
CALG_SCHANNEL_MASTER_HASH
&&
((
!
pCryptKey
->
siSChannelInfo
.
blobClientRandom
.
cbData
)
||
(
!
pCryptKey
->
siSChannelInfo
.
blobServerRandom
.
cbData
)))
{
SetLastError
(
ERROR_INVALID_PARAMETER
);
return
FALSE
;
}
if
((
Algid
==
CALG_TLS1PRF
)
&&
(
pCryptKey
->
dwState
!=
RSAENH_KEYSTATE_MASTERKEY
))
{
SetLastError
(
NTE_BAD_KEY_STATE
);
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
ea43c598
...
...
@@ -2346,22 +2346,8 @@ static void test_schannel_provider(void)
* random or server random set.
*/
result
=
CryptCreateHash
(
hProv
,
CALG_SCHANNEL_MASTER_HASH
,
hMasterSecret
,
0
,
&
hMasterHash
);
todo_wine
ok
(
!
result
&&
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER, got %08x
\n
"
,
GetLastError
());
if
(
result
)
{
CryptDestroyHash
(
hMasterHash
);
/* Reimporting the master secret is necessary under Wine until creating
* the hash fails as it should.
*/
CryptDestroyKey
(
hMasterSecret
);
dwLen
=
(
DWORD
)
sizeof
(
abTLS1Master
);
result
=
CryptImportKey
(
hProv
,
abTLS1Master
,
dwLen
,
hRSAKey
,
0
,
&
hMasterSecret
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
!
result
)
return
;
}
/* Setting the TLS1 client and server random parameters, as well as the
* MAC and encryption algorithm parameters. */
...
...
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