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
05492ae9
Commit
05492ae9
authored
Sep 11, 2007
by
Juan Lang
Committed by
Alexandre Julliard
Sep 12, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: (Re)introduce helper function to get issuer certificate.
parent
f0d2766f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
chain.c
dlls/crypt32/chain.c
+15
-7
No files found.
dlls/crypt32/chain.c
View file @
05492ae9
...
...
@@ -511,6 +511,17 @@ static void CRYPT_CheckSimpleChain(PCertificateChainEngine engine,
CRYPT_CombineTrustStatus
(
&
chain
->
TrustStatus
,
&
rootElement
->
TrustStatus
);
}
static
PCCERT_CONTEXT
CRYPT_GetIssuer
(
HCERTSTORE
store
,
PCCERT_CONTEXT
subject
,
PCCERT_CONTEXT
prevIssuer
)
{
PCCERT_CONTEXT
issuer
;
DWORD
flags
=
0
;
issuer
=
CertGetIssuerCertificateFromStore
(
store
,
subject
,
prevIssuer
,
&
flags
);
return
issuer
;
}
/* Builds a simple chain by finding an issuer for the last cert in the chain,
* until reaching a self-signed cert, or until no issuer can be found.
*/
...
...
@@ -523,9 +534,7 @@ static BOOL CRYPT_BuildSimpleChain(PCertificateChainEngine engine,
while
(
ret
&&
!
CRYPT_IsSimpleChainCyclic
(
chain
)
&&
!
CRYPT_IsCertificateSelfSigned
(
cert
))
{
DWORD
flags
=
0
;
PCCERT_CONTEXT
issuer
=
CertGetIssuerCertificateFromStore
(
world
,
cert
,
NULL
,
&
flags
);
PCCERT_CONTEXT
issuer
=
CRYPT_GetIssuer
(
world
,
cert
,
NULL
);
if
(
issuer
)
{
...
...
@@ -782,7 +791,7 @@ static PCertificateChain CRYPT_BuildAlternateContextFromChain(
alternate
=
NULL
;
else
{
DWORD
i
,
j
,
flags
;
DWORD
i
,
j
;
PCCERT_CONTEXT
alternateIssuer
=
NULL
;
alternate
=
NULL
;
...
...
@@ -795,9 +804,8 @@ static PCertificateChain CRYPT_BuildAlternateContextFromChain(
PCCERT_CONTEXT
prevIssuer
=
CertDuplicateCertificateContext
(
chain
->
context
.
rgpChain
[
i
]
->
rgpElement
[
j
+
1
]
->
pCertContext
);
flags
=
CERT_STORE_REVOCATION_FLAG
|
CERT_STORE_SIGNATURE_FLAG
;
alternateIssuer
=
CertGetIssuerCertificateFromStore
(
prevIssuer
->
hCertStore
,
subject
,
prevIssuer
,
&
flags
);
alternateIssuer
=
CRYPT_GetIssuer
(
prevIssuer
->
hCertStore
,
subject
,
prevIssuer
);
}
if
(
alternateIssuer
)
{
...
...
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