Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
a63affe5
Commit
a63affe5
authored
Nov 17, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Nov 18, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Don't apply directory name constraints to an empty subject name.
parent
c464875a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
chain.c
dlls/crypt32/chain.c
+23
-1
No files found.
dlls/crypt32/chain.c
View file @
a63affe5
...
...
@@ -950,6 +950,22 @@ static void compare_subject_with_email_constraints(
CERT_TRUST_INVALID_EXTENSION
|
CERT_TRUST_INVALID_NAME_CONSTRAINTS
;
}
static
BOOL
CRYPT_IsEmptyName
(
const
CERT_NAME_BLOB
*
name
)
{
BOOL
empty
;
if
(
!
name
->
cbData
)
empty
=
TRUE
;
else
if
(
name
->
cbData
==
2
&&
name
->
pbData
[
1
]
==
0
)
{
/* An empty sequence is also empty */
empty
=
TRUE
;
}
else
empty
=
FALSE
;
return
empty
;
}
static
void
compare_subject_with_constraints
(
const
CERT_NAME_BLOB
*
subjectName
,
const
CERT_NAME_CONSTRAINTS_INFO
*
nameConstraints
,
DWORD
*
trustErrorStatus
)
{
...
...
@@ -987,7 +1003,13 @@ static void compare_subject_with_constraints(const CERT_NAME_BLOB *subjectName,
*
trustErrorStatus
|=
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
}
if
(
nameConstraints
->
cPermittedSubtree
)
/* RFC 5280, section 4.2.1.10:
* "Restrictions apply only when the specified name form is present.
* If no name of the type is in the certificate, the certificate is
* acceptable."
* An empty name can't have the name form present, so don't check it.
*/
if
(
nameConstraints
->
cPermittedSubtree
&&
!
CRYPT_IsEmptyName
(
subjectName
))
{
BOOL
match
=
FALSE
;
...
...
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