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
e5256d98
Commit
e5256d98
authored
May 21, 2007
by
Mounir IDRASSI
Committed by
Alexandre Julliard
May 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Fix CertAddCertificateContextToStore when called with CERT_STORE_ADD_USE_EXISTING.
parent
b4536734
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
store.c
dlls/crypt32/store.c
+5
-0
cert.c
dlls/crypt32/tests/cert.c
+10
-0
No files found.
dlls/crypt32/store.c
View file @
e5256d98
...
...
@@ -2160,7 +2160,12 @@ BOOL WINAPI CertAddCertificateContextToStore(HCERTSTORE hCertStore,
break
;
case
CERT_STORE_ADD_USE_EXISTING
:
if
(
existing
)
{
CertContext_CopyProperties
(
existing
,
pCertContext
);
*
ppStoreContext
=
CertDuplicateCertificateContext
(
existing
);
}
else
toAdd
=
CertDuplicateCertificateContext
(
pCertContext
);
break
;
default:
FIXME
(
"Unimplemented add disposition %d
\n
"
,
dwAddDisposition
);
...
...
dlls/crypt32/tests/cert.c
View file @
e5256d98
...
...
@@ -134,6 +134,7 @@ static void testAddCert(void)
HCERTSTORE
store
;
HCERTSTORE
collection
;
PCCERT_CONTEXT
context
;
PCCERT_CONTEXT
copyContext
;
BOOL
ret
;
store
=
CertOpenStore
(
CERT_STORE_PROV_MEMORY
,
0
,
0
,
...
...
@@ -274,6 +275,15 @@ static void testAddCert(void)
CERT_STORE_ADD_REPLACE_EXISTING
,
NULL
);
ok
(
ret
,
"CertAddCertificateContextToStore failed: %08x
\n
"
,
GetLastError
());
/* use the existing certificate and ask for a copy of the context*/
copyContext
=
NULL
;
ret
=
CertAddCertificateContextToStore
(
collection
,
context
,
CERT_STORE_ADD_USE_EXISTING
,
&
copyContext
);
ok
(
ret
,
"CertAddCertificateContextToStore failed: %08x
\n
"
,
GetLastError
());
ok
(
copyContext
!=
NULL
,
"Expected on output a non NULL copyContext
\n
"
);
if
(
copyContext
)
CertFreeCertificateContext
(
copyContext
);
/* but adding a new certificate isn't allowed. */
ret
=
CertAddCertificateContextToStore
(
collection
,
context
,
CERT_STORE_ADD_ALWAYS
,
NULL
);
...
...
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