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
d8cad3eb
Commit
d8cad3eb
authored
Nov 23, 2010
by
Alexander Morozov
Committed by
Alexandre Julliard
Nov 24, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32/tests: Use pCryptAcquireContextA.
parent
676d5db6
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
3 deletions
+22
-3
message.c
dlls/crypt32/tests/message.c
+21
-2
msg.c
dlls/crypt32/tests/msg.c
+1
-1
No files found.
dlls/crypt32/tests/message.c
View file @
d8cad3eb
...
...
@@ -27,6 +27,23 @@
#include "wine/test.h"
static
BOOL
(
WINAPI
*
pCryptAcquireContextA
)
(
HCRYPTPROV
*
,
LPCSTR
,
LPCSTR
,
DWORD
,
DWORD
);
static
void
init_function_pointers
(
void
)
{
HMODULE
hAdvapi32
=
GetModuleHandleA
(
"advapi32.dll"
);
#define GET_PROC(dll, func) \
p ## func = (void *)GetProcAddress(dll, #func); \
if(!p ## func) \
trace("GetProcAddress(%s) failed\n", #func);
GET_PROC
(
hAdvapi32
,
CryptAcquireContextA
)
#undef GET_PROC
}
static
const
BYTE
dataEmptyBareContent
[]
=
{
0x04
,
0x00
};
static
const
BYTE
dataEmptyContent
[]
=
{
0x30
,
0x0f
,
0x06
,
0x09
,
0x2a
,
0x86
,
0x48
,
0x86
,
0xf7
,
0x0d
,
0x01
,
0x07
,
0x01
,
0xa0
,
0x02
,
...
...
@@ -1001,7 +1018,7 @@ static void test_sign_message(void)
ok
(
signedBlobSize
,
"bad size
\n
"
);
SetLastError
(
0xdeadbeef
);
ret
=
CryptAcquireContextA
(
&
hCryptProv
,
NULL
,
NULL
,
PROV_RSA_FULL
,
ret
=
p
CryptAcquireContextA
(
&
hCryptProv
,
NULL
,
NULL
,
PROV_RSA_FULL
,
CRYPT_VERIFYCONTEXT
);
ok
(
ret
,
"CryptAcquireContextA failed: %08x
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
...
...
@@ -1188,7 +1205,7 @@ static void test_encrypt_message(void)
DWORD
encryptedBlobSize
;
SetLastError
(
0xdeadbeef
);
ret
=
CryptAcquireContextA
(
&
hCryptProv
,
NULL
,
NULL
,
PROV_RSA_FULL
,
ret
=
p
CryptAcquireContextA
(
&
hCryptProv
,
NULL
,
NULL
,
PROV_RSA_FULL
,
CRYPT_VERIFYCONTEXT
);
ok
(
ret
,
"CryptAcquireContextA failed: %08x
\n
"
,
GetLastError
());
...
...
@@ -1343,6 +1360,8 @@ static void test_encrypt_message(void)
START_TEST
(
message
)
{
init_function_pointers
();
test_msg_get_signer_count
();
test_verify_detached_message_hash
();
test_verify_message_hash
();
...
...
dlls/crypt32/tests/msg.c
View file @
d8cad3eb
...
...
@@ -3100,7 +3100,7 @@ static void test_decode_msg_get_param(void)
check_param
(
"enveloped empty content"
,
msg
,
CMSG_CONTENT_PARAM
,
NULL
,
0
);
CryptMsgClose
(
msg
);
CryptAcquireContextA
(
&
hCryptProv
,
NULL
,
MS_ENHANCED_PROV_A
,
PROV_RSA_FULL
,
p
CryptAcquireContextA
(
&
hCryptProv
,
NULL
,
MS_ENHANCED_PROV_A
,
PROV_RSA_FULL
,
CRYPT_VERIFYCONTEXT
);
SetLastError
(
0xdeadbeef
);
ret
=
CryptImportKey
(
hCryptProv
,
publicPrivateKeyPair
,
...
...
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