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
d74c4f7c
Commit
d74c4f7c
authored
Sep 29, 2010
by
Juan Lang
Committed by
Alexandre Julliard
Sep 30, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Honor more SECURITY_FLAG_IGNORE flags when verifying the SSL policy.
parent
54429016
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
chain.c
dlls/crypt32/chain.c
+12
-5
chain.c
dlls/crypt32/tests/chain.c
+2
-8
No files found.
dlls/crypt32/chain.c
View file @
d74c4f7c
...
...
@@ -3285,6 +3285,13 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID,
PCCERT_CHAIN_CONTEXT
pChainContext
,
PCERT_CHAIN_POLICY_PARA
pPolicyPara
,
PCERT_CHAIN_POLICY_STATUS
pPolicyStatus
)
{
HTTPSPolicyCallbackData
*
sslPara
=
NULL
;
DWORD
checks
=
0
;
if
(
pPolicyPara
)
sslPara
=
pPolicyPara
->
pvExtraPolicyPara
;
if
(
sslPara
&&
sslPara
->
u
.
cbSize
>=
sizeof
(
HTTPSPolicyCallbackData
))
checks
=
sslPara
->
fdwChecks
;
pPolicyStatus
->
lChainIndex
=
pPolicyStatus
->
lElementIndex
=
-
1
;
if
(
pChainContext
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_NOT_SIGNATURE_VALID
)
...
...
@@ -3295,7 +3302,8 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID,
&
pPolicyStatus
->
lElementIndex
);
}
else
if
(
pChainContext
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_UNTRUSTED_ROOT
)
CERT_TRUST_IS_UNTRUSTED_ROOT
&&
!
(
checks
&
SECURITY_FLAG_IGNORE_UNKNOWN_CA
))
{
pPolicyStatus
->
dwError
=
CERT_E_UNTRUSTEDROOT
;
find_element_with_error
(
pChainContext
,
...
...
@@ -3312,7 +3320,8 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID,
pPolicyStatus
->
lElementIndex
=
-
1
;
}
else
if
(
pChainContext
->
TrustStatus
.
dwErrorStatus
&
CERT_TRUST_IS_NOT_TIME_VALID
)
CERT_TRUST_IS_NOT_TIME_VALID
&&
!
(
checks
&
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID
))
{
pPolicyStatus
->
dwError
=
CERT_E_EXPIRED
;
find_element_with_error
(
pChainContext
,
...
...
@@ -3327,13 +3336,11 @@ static BOOL WINAPI verify_ssl_policy(LPCSTR szPolicyOID,
if
(
!
pPolicyStatus
->
dwError
&&
pPolicyPara
&&
pPolicyPara
->
cbSize
>=
sizeof
(
CERT_CHAIN_POLICY_PARA
))
{
HTTPSPolicyCallbackData
*
sslPara
=
pPolicyPara
->
pvExtraPolicyPara
;
if
(
sslPara
&&
sslPara
->
u
.
cbSize
>=
sizeof
(
HTTPSPolicyCallbackData
))
{
if
(
sslPara
->
dwAuthType
==
AUTHTYPE_SERVER
&&
sslPara
->
pwszServerName
&&
!
(
sslPara
->
fdwC
hecks
&
SECURITY_FLAG_IGNORE_CERT_CN_INVALID
))
!
(
c
hecks
&
SECURITY_FLAG_IGNORE_CERT_CN_INVALID
))
{
PCCERT_CONTEXT
cert
;
PCERT_EXTENSION
altNameExt
;
...
...
dlls/crypt32/tests/chain.c
View file @
d74c4f7c
...
...
@@ -3790,7 +3790,7 @@ static const ChainPolicyCheck sslPolicyCheck[] = {
static
const
ChainPolicyCheck
ignoredUnknownCAPolicyCheck
=
{
{
sizeof
(
chain0
)
/
sizeof
(
chain0
[
0
]),
chain0
},
{
0
,
CERT_E_EXPIRED
,
0
,
0
,
NULL
},
NULL
,
TODO_ERROR
{
0
,
CERT_E_EXPIRED
,
0
,
0
,
NULL
},
NULL
,
0
};
static
const
ChainPolicyCheck
googlePolicyCheckWithMatchingNameExpired
=
{
...
...
@@ -3798,11 +3798,6 @@ static const ChainPolicyCheck googlePolicyCheckWithMatchingNameExpired = {
{
0
,
CERT_E_EXPIRED
,
0
,
0
,
NULL
},
NULL
,
0
};
static
const
ChainPolicyCheck
googlePolicyCheckWithMatchingNameIgnoringExpired
=
{
{
sizeof
(
googleChain
)
/
sizeof
(
googleChain
[
0
]),
googleChain
},
{
0
,
0
,
-
1
,
-
1
,
NULL
},
NULL
,
TODO_ERROR
};
static
const
ChainPolicyCheck
googlePolicyCheckWithMatchingName
=
{
{
sizeof
(
googleChain
)
/
sizeof
(
googleChain
[
0
]),
googleChain
},
{
0
,
0
,
-
1
,
-
1
,
NULL
},
NULL
,
0
...
...
@@ -4157,8 +4152,7 @@ static void check_ssl_policy(void)
*/
sslPolicyPara
.
fdwChecks
=
SECURITY_FLAG_IGNORE_CERT_DATE_INVALID
;
checkChainPolicyStatus
(
CERT_CHAIN_POLICY_SSL
,
NULL
,
&
googlePolicyCheckWithMatchingNameIgnoringExpired
,
0
,
&
oct2007
,
&
policyPara
);
&
googlePolicyCheckWithMatchingName
,
0
,
&
oct2007
,
&
policyPara
);
sslPolicyPara
.
fdwChecks
=
0
;
/* And again, but checking the Google chain at a good date */
sslPolicyPara
.
pwszServerName
=
google_dot_com
;
...
...
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