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
ca7512d2
Commit
ca7512d2
authored
Oct 07, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Oct 19, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Trace certificate chain verification parameters.
parent
c6546064
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
0 deletions
+43
-0
chain.c
dlls/crypt32/chain.c
+43
-0
No files found.
dlls/crypt32/chain.c
View file @
ca7512d2
...
...
@@ -2989,13 +2989,30 @@ static BYTE msTestPubKey2[] = {
0x71
,
0x9e
,
0x06
,
0xd9
,
0xbf
,
0xbb
,
0x31
,
0x69
,
0xa3
,
0xf6
,
0x30
,
0xa0
,
0x78
,
0x7b
,
0x18
,
0xdd
,
0x50
,
0x4d
,
0x79
,
0x1e
,
0xeb
,
0x61
,
0xc1
,
0x02
,
0x03
,
0x01
,
0x00
,
0x01
};
static
void
dump_authenticode_extra_chain_policy_para
(
AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA
*
extraPara
)
{
if
(
extraPara
)
{
TRACE_
(
chain
)(
"cbSize = %d
\n
"
,
extraPara
->
cbSize
);
TRACE_
(
chain
)(
"dwRegPolicySettings = %08x
\n
"
,
extraPara
->
dwRegPolicySettings
);
TRACE_
(
chain
)(
"pSignerInfo = %p
\n
"
,
extraPara
->
pSignerInfo
);
}
}
static
BOOL
WINAPI
verify_authenticode_policy
(
LPCSTR
szPolicyOID
,
PCCERT_CHAIN_CONTEXT
pChainContext
,
PCERT_CHAIN_POLICY_PARA
pPolicyPara
,
PCERT_CHAIN_POLICY_STATUS
pPolicyStatus
)
{
BOOL
ret
=
verify_base_policy
(
szPolicyOID
,
pChainContext
,
pPolicyPara
,
pPolicyStatus
);
AUTHENTICODE_EXTRA_CERT_CHAIN_POLICY_PARA
*
extraPara
=
NULL
;
if
(
pPolicyPara
)
extraPara
=
pPolicyPara
->
pvExtraPolicyPara
;
if
(
TRACE_ON
(
chain
))
dump_authenticode_extra_chain_policy_para
(
extraPara
);
if
(
ret
&&
pPolicyStatus
->
dwError
==
CERT_E_UNTRUSTEDROOT
)
{
CERT_PUBLIC_KEY_INFO
msPubKey
=
{
{
0
}
};
...
...
@@ -3323,6 +3340,18 @@ static BOOL match_dns_to_subject_dn(PCCERT_CONTEXT cert, LPCWSTR server_name)
return
matches
;
}
static
void
dump_ssl_extra_chain_policy_para
(
HTTPSPolicyCallbackData
*
sslPara
)
{
if
(
sslPara
)
{
TRACE_
(
chain
)(
"cbSize = %d
\n
"
,
sslPara
->
u
.
cbSize
);
TRACE_
(
chain
)(
"dwAuthType = %d
\n
"
,
sslPara
->
dwAuthType
);
TRACE_
(
chain
)(
"fdwChecks = %08x
\n
"
,
sslPara
->
fdwChecks
);
TRACE_
(
chain
)(
"pwszServerName = %s
\n
"
,
debugstr_w
(
sslPara
->
pwszServerName
));
}
}
static
BOOL
WINAPI
verify_ssl_policy
(
LPCSTR
szPolicyOID
,
PCCERT_CHAIN_CONTEXT
pChainContext
,
PCERT_CHAIN_POLICY_PARA
pPolicyPara
,
PCERT_CHAIN_POLICY_STATUS
pPolicyStatus
)
...
...
@@ -3332,6 +3361,8 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID,
if
(
pPolicyPara
)
sslPara
=
pPolicyPara
->
pvExtraPolicyPara
;
if
(
TRACE_ON
(
chain
))
dump_ssl_extra_chain_policy_para
(
sslPara
);
if
(
sslPara
&&
sslPara
->
u
.
cbSize
>=
sizeof
(
HTTPSPolicyCallbackData
))
checks
=
sslPara
->
fdwChecks
;
pPolicyStatus
->
lChainIndex
=
pPolicyStatus
->
lElementIndex
=
-
1
;
...
...
@@ -3570,6 +3601,16 @@ typedef BOOL (WINAPI *CertVerifyCertificateChainPolicyFunc)(LPCSTR szPolicyOID,
PCCERT_CHAIN_CONTEXT
pChainContext
,
PCERT_CHAIN_POLICY_PARA
pPolicyPara
,
PCERT_CHAIN_POLICY_STATUS
pPolicyStatus
);
static
void
dump_policy_para
(
PCERT_CHAIN_POLICY_PARA
para
)
{
if
(
para
)
{
TRACE_
(
chain
)(
"cbSize = %d
\n
"
,
para
->
cbSize
);
TRACE_
(
chain
)(
"dwFlags = %08x
\n
"
,
para
->
dwFlags
);
TRACE_
(
chain
)(
"pvExtraPolicyPara = %p
\n
"
,
para
->
pvExtraPolicyPara
);
}
}
BOOL
WINAPI
CertVerifyCertificateChainPolicy
(
LPCSTR
szPolicyOID
,
PCCERT_CHAIN_CONTEXT
pChainContext
,
PCERT_CHAIN_POLICY_PARA
pPolicyPara
,
PCERT_CHAIN_POLICY_STATUS
pPolicyStatus
)
...
...
@@ -3581,6 +3622,8 @@ BOOL WINAPI CertVerifyCertificateChainPolicy(LPCSTR szPolicyOID,
TRACE
(
"(%s, %p, %p, %p)
\n
"
,
debugstr_a
(
szPolicyOID
),
pChainContext
,
pPolicyPara
,
pPolicyStatus
);
if
(
TRACE_ON
(
chain
))
dump_policy_para
(
pPolicyPara
);
if
(
IS_INTOID
(
szPolicyOID
))
{
...
...
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