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
d6958d76
Commit
d6958d76
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: Trace reasons for name constraint failure.
parent
1db8a6ab
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
0 deletions
+22
-0
chain.c
dlls/crypt32/chain.c
+22
-0
No files found.
dlls/crypt32/chain.c
View file @
d6958d76
...
@@ -849,15 +849,23 @@ static void compare_alt_name_with_constraints(const CERT_EXTENSION *altNameExt,
...
@@ -849,15 +849,23 @@ static void compare_alt_name_with_constraints(const CERT_EXTENSION *altNameExt,
if
(
alt_name_matches_excluded_name
(
if
(
alt_name_matches_excluded_name
(
&
subjectAltName
->
rgAltEntry
[
i
],
nameConstraints
,
&
subjectAltName
->
rgAltEntry
[
i
],
nameConstraints
,
trustErrorStatus
))
trustErrorStatus
))
{
TRACE_
(
chain
)(
"subject alternate name form %d excluded
\n
"
,
subjectAltName
->
rgAltEntry
[
i
].
dwAltNameChoice
);
*
trustErrorStatus
|=
*
trustErrorStatus
|=
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
}
nameFormPresent
=
FALSE
;
nameFormPresent
=
FALSE
;
if
(
!
alt_name_matches_permitted_name
(
if
(
!
alt_name_matches_permitted_name
(
&
subjectAltName
->
rgAltEntry
[
i
],
nameConstraints
,
&
subjectAltName
->
rgAltEntry
[
i
],
nameConstraints
,
trustErrorStatus
,
&
nameFormPresent
)
&&
nameFormPresent
)
trustErrorStatus
,
&
nameFormPresent
)
&&
nameFormPresent
)
{
TRACE_
(
chain
)(
"subject alternate name form %d not permitted
\n
"
,
subjectAltName
->
rgAltEntry
[
i
].
dwAltNameChoice
);
*
trustErrorStatus
|=
*
trustErrorStatus
|=
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
}
}
}
LocalFree
(
subjectAltName
);
LocalFree
(
subjectAltName
);
}
}
else
else
...
@@ -934,15 +942,23 @@ static void compare_subject_with_email_constraints(
...
@@ -934,15 +942,23 @@ static void compare_subject_with_email_constraints(
if
(
rfc822_attr_matches_excluded_name
(
if
(
rfc822_attr_matches_excluded_name
(
&
name
->
rgRDN
[
i
].
rgRDNAttr
[
j
],
nameConstraints
,
&
name
->
rgRDN
[
i
].
rgRDNAttr
[
j
],
nameConstraints
,
trustErrorStatus
))
trustErrorStatus
))
{
TRACE_
(
chain
)(
"email address in subject name is excluded
\n
"
);
*
trustErrorStatus
|=
*
trustErrorStatus
|=
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
}
nameFormPresent
=
FALSE
;
nameFormPresent
=
FALSE
;
if
(
!
rfc822_attr_matches_permitted_name
(
if
(
!
rfc822_attr_matches_permitted_name
(
&
name
->
rgRDN
[
i
].
rgRDNAttr
[
j
],
nameConstraints
,
&
name
->
rgRDN
[
i
].
rgRDNAttr
[
j
],
nameConstraints
,
trustErrorStatus
,
&
nameFormPresent
)
&&
nameFormPresent
)
trustErrorStatus
,
&
nameFormPresent
)
&&
nameFormPresent
)
{
TRACE_
(
chain
)(
"email address in subject name is not permitted
\n
"
);
*
trustErrorStatus
|=
*
trustErrorStatus
|=
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
}
}
}
LocalFree
(
name
);
LocalFree
(
name
);
}
}
else
else
...
@@ -1000,9 +1016,12 @@ static void compare_subject_with_constraints(const CERT_NAME_BLOB *subjectName,
...
@@ -1000,9 +1016,12 @@ static void compare_subject_with_constraints(const CERT_NAME_BLOB *subjectName,
if
(
constraint
->
dwAltNameChoice
==
CERT_ALT_NAME_DIRECTORY_NAME
&&
if
(
constraint
->
dwAltNameChoice
==
CERT_ALT_NAME_DIRECTORY_NAME
&&
directory_name_matches
(
&
constraint
->
u
.
DirectoryName
,
subjectName
))
directory_name_matches
(
&
constraint
->
u
.
DirectoryName
,
subjectName
))
{
TRACE_
(
chain
)(
"subject name is excluded
\n
"
);
*
trustErrorStatus
|=
*
trustErrorStatus
|=
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
CERT_TRUST_HAS_EXCLUDED_NAME_CONSTRAINT
;
}
}
}
/* RFC 5280, section 4.2.1.10:
/* RFC 5280, section 4.2.1.10:
* "Restrictions apply only when the specified name form is present.
* "Restrictions apply only when the specified name form is present.
* If no name of the type is in the certificate, the certificate is
* If no name of the type is in the certificate, the certificate is
...
@@ -1026,8 +1045,11 @@ static void compare_subject_with_constraints(const CERT_NAME_BLOB *subjectName,
...
@@ -1026,8 +1045,11 @@ static void compare_subject_with_constraints(const CERT_NAME_BLOB *subjectName,
}
}
}
}
if
(
hasDirectoryConstraint
&&
!
match
)
if
(
hasDirectoryConstraint
&&
!
match
)
{
TRACE_
(
chain
)(
"subject name is not permitted
\n
"
);
*
trustErrorStatus
|=
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
*
trustErrorStatus
|=
CERT_TRUST_HAS_NOT_PERMITTED_NAME_CONSTRAINT
;
}
}
}
}
}
static
void
CRYPT_CheckNameConstraints
(
static
void
CRYPT_CheckNameConstraints
(
...
...
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