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
e9ee8c87
Commit
e9ee8c87
authored
Sep 06, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 10, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Open world store when creating chain, not when building a simple chain.
parent
1a059879
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
15 deletions
+16
-15
chain.c
dlls/crypt32/chain.c
+16
-15
No files found.
dlls/crypt32/chain.c
View file @
e9ee8c87
...
...
@@ -515,23 +515,15 @@ static BOOL CRYPT_CheckSimpleChain(PCertificateChainEngine engine,
}
static
BOOL
CRYPT_BuildSimpleChain
(
HCERTCHAINENGINE
hChainEngine
,
PCCERT_CONTEXT
cert
,
LPFILETIME
pTime
,
HCERTSTORE
hAdditionalStor
e
,
HCERTSTORE
world
,
PCCERT_CONTEXT
cert
,
LPFILETIME
pTim
e
,
PCERT_SIMPLE_CHAIN
*
ppChain
)
{
BOOL
ret
=
FALSE
;
PCertificateChainEngine
engine
=
(
PCertificateChainEngine
)
hChainEngine
;
PCERT_SIMPLE_CHAIN
chain
;
HCERTSTORE
world
;
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
hChainEngine
,
cert
,
pTime
,
hAdditionalStor
e
);
TRACE
(
"(%p, %p, %p, %p)
\n
"
,
hChainEngine
,
world
,
cert
,
pTim
e
);
world
=
CertOpenStore
(
CERT_STORE_PROV_COLLECTION
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
CertAddStoreToCollection
(
world
,
engine
->
hWorld
,
0
,
0
);
if
(
cert
->
hCertStore
)
CertAddStoreToCollection
(
world
,
cert
->
hCertStore
,
0
,
0
);
if
(
hAdditionalStore
)
CertAddStoreToCollection
(
world
,
hAdditionalStore
,
0
,
0
);
chain
=
CryptMemAlloc
(
sizeof
(
CERT_SIMPLE_CHAIN
));
if
(
chain
)
{
...
...
@@ -565,22 +557,30 @@ static BOOL CRYPT_BuildSimpleChain(HCERTCHAINENGINE hChainEngine,
}
*
ppChain
=
chain
;
}
CertCloseStore
(
world
,
0
);
return
ret
;
}
static
BOOL
CRYPT_BuildCandidateChainFromCert
(
HCERTCHAINENGINE
hChainEngine
,
PCCERT_CONTEXT
pCertContex
t
,
LPFILETIME
pTime
,
HCERTSTORE
hAdditionalStore
,
PCCERT_CONTEXT
cer
t
,
LPFILETIME
pTime
,
HCERTSTORE
hAdditionalStore
,
PCertificateChain
*
ppChain
)
{
PCertificateChainEngine
engine
=
(
PCertificateChainEngine
)
hChainEngine
;
PCERT_SIMPLE_CHAIN
simpleChain
=
NULL
;
HCERTSTORE
world
;
BOOL
ret
;
world
=
CertOpenStore
(
CERT_STORE_PROV_COLLECTION
,
0
,
0
,
CERT_STORE_CREATE_NEW_FLAG
,
NULL
);
CertAddStoreToCollection
(
world
,
engine
->
hWorld
,
0
,
0
);
if
(
cert
->
hCertStore
)
CertAddStoreToCollection
(
world
,
cert
->
hCertStore
,
0
,
0
);
if
(
hAdditionalStore
)
CertAddStoreToCollection
(
world
,
hAdditionalStore
,
0
,
0
);
/* FIXME: only simple chains are supported for now, as CTLs aren't
* supported yet.
*/
if
((
ret
=
CRYPT_BuildSimpleChain
(
hChainEngine
,
pCertContex
t
,
pTime
,
hAdditionalStore
,
&
simpleChain
)))
if
((
ret
=
CRYPT_BuildSimpleChain
(
hChainEngine
,
world
,
cer
t
,
pTime
,
&
simpleChain
)))
{
PCertificateChain
chain
=
CryptMemAlloc
(
sizeof
(
CertificateChain
));
...
...
@@ -602,6 +602,7 @@ static BOOL CRYPT_BuildCandidateChainFromCert(HCERTCHAINENGINE hChainEngine,
ret
=
FALSE
;
*
ppChain
=
chain
;
}
CertCloseStore
(
world
,
0
);
return
ret
;
}
...
...
@@ -625,7 +626,7 @@ BOOL WINAPI CertGetCertificateChain(HCERTCHAINENGINE hChainEngine,
PCCERT_CHAIN_CONTEXT
*
ppChainContext
)
{
BOOL
ret
;
PCertificateChain
chain
;
PCertificateChain
chain
=
NULL
;
TRACE
(
"(%p, %p, %p, %p, %p, %08x, %p, %p)
\n
"
,
hChainEngine
,
pCertContext
,
pTime
,
hAdditionalStore
,
pChainPara
,
dwFlags
,
pvReserved
,
ppChainContext
);
...
...
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