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
13b0e284
Commit
13b0e284
authored
Feb 04, 2011
by
Austin English
Committed by
Alexandre Julliard
Feb 07, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh/tests: Make sure to use return values (LLVM/Clang).
parent
5ca437e7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+7
-4
No files found.
dlls/rsaenh/tests/rsaenh.c
View file @
13b0e284
...
...
@@ -1248,6 +1248,7 @@ static void test_rc2(void)
dwKeyLen
=
1025
;
SetLastError
(
0xdeadbeef
);
result
=
CryptSetKeyParam
(
hKey
,
KP_EFFECTIVE_KEYLEN
,
(
LPBYTE
)
&
dwKeyLen
,
0
);
ok
(
!
result
,
"CryptSetKeyParam failed: %08x
\n
"
,
GetLastError
());
dwLen
=
sizeof
(
dwKeyLen
);
CryptGetKeyParam
(
hKey
,
KP_KEYLEN
,
(
BYTE
*
)
&
dwKeyLen
,
&
dwLen
,
0
);
...
...
@@ -2483,6 +2484,7 @@ static void test_rsa_round_trip(void)
exportedKey
=
HeapAlloc
(
GetProcessHeap
(),
0
,
keyLen
);
result
=
CryptExportKey
(
keyExchangeKey
,
0
,
PRIVATEKEYBLOB
,
0
,
exportedKey
,
&
keyLen
);
ok
(
result
,
"CryptExportKey failed: %08x
\n
"
,
GetLastError
());
/* destroy the key... */
CryptDestroyKey
(
keyExchangeKey
);
CryptDestroyKey
(
signKey
);
...
...
@@ -2922,22 +2924,23 @@ static void test_key_initialization(void)
{
result
=
CryptAcquireContext
(
&
prov1
,
szContainer
,
szProvider
,
PROV_RSA_FULL
,
CRYPT_NEWKEYSET
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"
CryptAcquireContext failed:
%08x
\n
"
,
GetLastError
());
}
dwLen
=
(
DWORD
)
sizeof
(
abPlainPrivateKey
);
result
=
CryptImportKey
(
prov1
,
abPlainPrivateKey
,
dwLen
,
0
,
0
,
&
hKeyExchangeKey
);
ok
(
result
,
"CryptImportKey failed: %08x
\n
"
,
GetLastError
());
dwLen
=
(
DWORD
)
sizeof
(
abSessionKey
);
result
=
CryptImportKey
(
prov1
,
abSessionKey
,
dwLen
,
hKeyExchangeKey
,
0
,
&
hSessionKey
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"
CryptImportKey failed:
%08x
\n
"
,
GetLastError
());
/* Once the key has been imported, subsequently acquiring a context with
* the same name will allow retrieving the key.
*/
result
=
CryptAcquireContext
(
&
prov2
,
szContainer
,
szProvider
,
PROV_RSA_FULL
,
0
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"
CryptAcquireContext failed:
%08x
\n
"
,
GetLastError
());
result
=
CryptGetUserKey
(
prov2
,
AT_KEYEXCHANGE
,
&
hKey
);
ok
(
result
,
"%08x
\n
"
,
GetLastError
());
ok
(
result
,
"
CryptGetUserKey failed:
%08x
\n
"
,
GetLastError
());
if
(
result
)
CryptDestroyKey
(
hKey
);
CryptReleaseContext
(
prov2
,
0
);
...
...
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