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
f8044948
Commit
f8044948
authored
Nov 16, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Nov 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Remove an unnecessary if.
parent
85852031
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
38 deletions
+31
-38
chain.c
dlls/crypt32/chain.c
+31
-38
No files found.
dlls/crypt32/chain.c
View file @
f8044948
...
@@ -778,50 +778,43 @@ static void CRYPT_CheckNameConstraints(
...
@@ -778,50 +778,43 @@ static void CRYPT_CheckNameConstraints(
const
CERT_NAME_CONSTRAINTS_INFO
*
nameConstraints
,
const
CERT_INFO
*
cert
,
const
CERT_NAME_CONSTRAINTS_INFO
*
nameConstraints
,
const
CERT_INFO
*
cert
,
DWORD
*
trustErrorStatus
)
DWORD
*
trustErrorStatus
)
{
{
/* If there aren't any existing constraints, don't bother checking */
CERT_EXTENSION
*
ext
=
get_subject_alt_name_ext
(
cert
);
if
(
nameConstraints
->
cPermittedSubtree
||
nameConstraints
->
cExcludedSubtree
)
if
(
ext
)
{
{
CERT_EXTENSION
*
ext
=
get_subject_alt_name_ext
(
cert
);
CERT_ALT_NAME_INFO
*
subjectName
;
DWORD
size
;
if
(
ext
)
if
(
CryptDecodeObjectEx
(
X509_ASN_ENCODING
,
X509_ALTERNATE_NAME
,
ext
->
Value
.
pbData
,
ext
->
Value
.
cbData
,
CRYPT_DECODE_ALLOC_FLAG
|
CRYPT_DECODE_NOCOPY_FLAG
,
NULL
,
&
subjectName
,
&
size
))
{
{
CERT_ALT_NAME_INFO
*
subjectName
;
DWORD
i
;
DWORD
size
;
if
(
CryptDecodeObjectEx
(
X509_ASN_ENCODING
,
X509_ALTERNATE_NAME
,
ext
->
Value
.
pbData
,
ext
->
Value
.
cbData
,
CRYPT_DECODE_ALLOC_FLAG
|
CRYPT_DECODE_NOCOPY_FLAG
,
NULL
,
&
subjectName
,
&
size
))
{
DWORD
i
;
for
(
i
=
0
;
i
<
nameConstraints
->
cExcludedSubtree
;
i
++
)
for
(
i
=
0
;
i
<
nameConstraints
->
cExcludedSubtree
;
i
++
)
CRYPT_FindMatchingNameEntry
(
CRYPT_FindMatchingNameEntry
(
&
nameConstraints
->
rgExcludedSubtree
[
i
].
Base
,
subjectName
,
&
nameConstraints
->
rgExcludedSubtree
[
i
].
Base
,
subjectName
,
trustErrorStatus
,
trustErrorStatus
,
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
,
0
);
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
,
0
);
for
(
i
=
0
;
i
<
nameConstraints
->
cPermittedSubtree
;
i
++
)
for
(
i
=
0
;
i
<
nameConstraints
->
cPermittedSubtree
;
i
++
)
CRYPT_FindMatchingNameEntry
(
CRYPT_FindMatchingNameEntry
(
&
nameConstraints
->
rgPermittedSubtree
[
i
].
Base
,
subjectName
,
&
nameConstraints
->
rgPermittedSubtree
[
i
].
Base
,
subjectName
,
trustErrorStatus
,
0
,
trustErrorStatus
,
0
,
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
);
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
);
LocalFree
(
subjectName
);
LocalFree
(
subjectName
);
}
else
*
trustErrorStatus
|=
CERT_TRUST_INVALID_EXTENSION
|
CERT_TRUST_INVALID_NAME_CONSTRAINTS
;
}
}
else
else
{
*
trustErrorStatus
|=
if
(
nameConstraints
->
cPermittedSubtree
)
CERT_TRUST_INVALID_EXTENSION
|
CERT_TRUST_INVALID_NAME_CONSTRAINTS
;
*
trustErrorStatus
|=
}
CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT
|
else
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
{
if
(
nameConstraints
->
cExcludedSubtree
)
if
(
nameConstraints
->
cPermittedSubtree
)
*
trustErrorStatus
|=
*
trustErrorStatus
|=
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
CERT_TRUST_HAS_NOT_DEFINED_NAME_CONSTRAINT
|
}
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
if
(
nameConstraints
->
cExcludedSubtree
)
*
trustErrorStatus
|=
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
}
}
}
}
...
...
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