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
bfd2c533
Commit
bfd2c533
authored
Oct 17, 2013
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Fail on unsupported flag values only in CryptHashData().
parent
13aac41b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
rsaenh.c
dlls/rsaenh/rsaenh.c
+1
-1
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+9
-3
wincrypt.h
include/wincrypt.h
+2
-0
No files found.
dlls/rsaenh/rsaenh.c
View file @
bfd2c533
...
...
@@ -4114,7 +4114,7 @@ BOOL WINAPI RSAENH_CPHashData(HCRYPTPROV hProv, HCRYPTHASH hHash, const BYTE *pb
TRACE
(
"(hProv=%08lx, hHash=%08lx, pbData=%p, dwDataLen=%d, dwFlags=%08x)
\n
"
,
hProv
,
hHash
,
pbData
,
dwDataLen
,
dwFlags
);
if
(
dwFlags
)
if
(
dwFlags
&
~
CRYPT_USERDATA
)
{
SetLastError
(
NTE_BAD_FLAGS
);
return
FALSE
;
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
bfd2c533
...
...
@@ -446,7 +446,10 @@ static void test_hashes(void)
result
=
CryptCreateHash
(
hProv
,
CALG_MD4
,
0
,
0
,
&
hHash
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
~
0
);
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
CRYPT_USERDATA
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
len
=
sizeof
(
DWORD
);
...
...
@@ -470,7 +473,10 @@ 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
,
pbData
,
sizeof
(
pbData
),
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
~
0
);
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_FLAGS
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
sizeof
(
pbData
),
CRYPT_USERDATA
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
len
=
16
;
...
...
@@ -519,7 +525,7 @@ static void test_hashes(void)
result
=
CryptCreateHash
(
hProv
,
CALG_SHA
,
0
,
0
,
&
hHash
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
result
=
CryptHashData
(
hHash
,
pbData
,
5
,
0
);
result
=
CryptHashData
(
hHash
,
pbData
,
5
,
CRYPT_USERDATA
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
if
(
pCryptDuplicateHash
)
{
...
...
include/wincrypt.h
View file @
bfd2c533
...
...
@@ -3890,6 +3890,8 @@ typedef BOOL (WINAPI *PFN_CMSG_IMPORT_KEY_TRANS)(
#define EXPORT_PRIVATE_KEYS 0x00000004
#define PKCS12_EXPORT_RESERVED_MASK 0xffff0000
#define CRYPT_USERDATA 0x00000001
/* function declarations */
/* advapi32.dll */
WINADVAPI
BOOL
WINAPI
CryptAcquireContextA
(
HCRYPTPROV
*
,
LPCSTR
,
LPCSTR
,
DWORD
,
DWORD
);
...
...
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