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
56a1326a
Commit
56a1326a
authored
May 07, 2007
by
Mounir IDRASSI
Committed by
Alexandre Julliard
May 08, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rsaenh: Use the correct registry key in RSAENH_CPAcquireContext.
parent
526d2b4c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
1 deletion
+26
-1
rsaenh.c
dlls/rsaenh/rsaenh.c
+6
-1
rsaenh.c
dlls/rsaenh/tests/rsaenh.c
+20
-0
No files found.
dlls/rsaenh/rsaenh.c
View file @
56a1326a
...
@@ -1476,7 +1476,12 @@ BOOL WINAPI RSAENH_CPAcquireContext(HCRYPTPROV *phProv, LPSTR pszContainer,
...
@@ -1476,7 +1476,12 @@ BOOL WINAPI RSAENH_CPAcquireContext(HCRYPTPROV *phProv, LPSTR pszContainer,
SetLastError
(
NTE_BAD_KEYSET_PARAM
);
SetLastError
(
NTE_BAD_KEYSET_PARAM
);
return
FALSE
;
return
FALSE
;
}
else
{
}
else
{
if
(
!
RegDeleteKeyA
(
HKEY_CURRENT_USER
,
szRegKey
))
{
HKEY
hRootKey
;
if
(
dwFlags
&
CRYPT_MACHINE_KEYSET
)
hRootKey
=
HKEY_LOCAL_MACHINE
;
else
hRootKey
=
HKEY_CURRENT_USER
;
if
(
!
RegDeleteKeyA
(
hRootKey
,
szRegKey
))
{
SetLastError
(
ERROR_SUCCESS
);
SetLastError
(
ERROR_SUCCESS
);
return
TRUE
;
return
TRUE
;
}
else
{
}
else
{
...
...
dlls/rsaenh/tests/rsaenh.c
View file @
56a1326a
...
@@ -1623,6 +1623,26 @@ static void test_null_provider(void)
...
@@ -1623,6 +1623,26 @@ static void test_null_provider(void)
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CRYPT_DELETEKEYSET
);
CRYPT_DELETEKEYSET
);
/* test the machine key set */
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CRYPT_DELETEKEYSET
|
CRYPT_MACHINE_KEYSET
);
result
=
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CRYPT_NEWKEYSET
|
CRYPT_MACHINE_KEYSET
);
ok
(
result
,
"CryptAcquireContext with CRYPT_MACHINE_KEYSET failed: %08x
\n
"
,
GetLastError
());
CryptReleaseContext
(
prov
,
0
);
result
=
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CRYPT_MACHINE_KEYSET
);
ok
(
result
,
"CryptAcquireContext with CRYPT_MACHINE_KEYSET failed: %08x
\n
"
,
GetLastError
());
CryptReleaseContext
(
prov
,
0
);
result
=
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CRYPT_DELETEKEYSET
|
CRYPT_MACHINE_KEYSET
);
ok
(
result
,
"CryptAcquireContext with CRYPT_DELETEKEYSET|CRYPT_MACHINE_KEYSET failed: %08x
\n
"
,
GetLastError
());
result
=
CryptAcquireContext
(
&
prov
,
szContainer
,
NULL
,
PROV_RSA_FULL
,
CRYPT_MACHINE_KEYSET
);
ok
(
!
result
&&
GetLastError
()
==
NTE_BAD_KEYSET
,
"Expected NTE_BAD_KEYSET, got %08x
\n
"
,
GetLastError
());
}
}
START_TEST
(
rsaenh
)
START_TEST
(
rsaenh
)
...
...
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