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
ab7f8a16
Commit
ab7f8a16
authored
Jan 31, 2012
by
Juan Lang
Committed by
Alexandre Julliard
Jan 31, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Only accept trailing NULLs in a certificate common name.
parent
4775c762
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
chain.c
dlls/crypt32/chain.c
+7
-4
No files found.
dlls/crypt32/chain.c
View file @
ab7f8a16
...
@@ -3163,10 +3163,6 @@ static BOOL match_domain_component(LPCWSTR allowed_component, DWORD allowed_len,
...
@@ -3163,10 +3163,6 @@ static BOOL match_domain_component(LPCWSTR allowed_component, DWORD allowed_len,
*
see_wildcard
=
FALSE
;
*
see_wildcard
=
FALSE
;
/* permit server_len to be one byte short if allowed_component is NULL terminated */
if
(
allowed_component
[
allowed_len
-
1
]
==
0
)
allowed_len
--
;
if
(
server_len
<
allowed_len
)
if
(
server_len
<
allowed_len
)
{
{
WARN_
(
chain
)(
"domain component %s too short for %s
\n
"
,
WARN_
(
chain
)(
"domain component %s too short for %s
\n
"
,
...
@@ -3226,6 +3222,13 @@ static BOOL match_common_name(LPCWSTR server_name, const CERT_RDN_ATTR *nameAttr
...
@@ -3226,6 +3222,13 @@ static BOOL match_common_name(LPCWSTR server_name, const CERT_RDN_ATTR *nameAttr
TRACE_
(
chain
)(
"CN = %s
\n
"
,
debugstr_wn
(
allowed_component
,
allowed_len
));
TRACE_
(
chain
)(
"CN = %s
\n
"
,
debugstr_wn
(
allowed_component
,
allowed_len
));
/* Remove trailing NULLs from the allowed name; while they shouldn't appear
* in a certificate in the first place, they sometimes do, and they should
* be ignored.
*/
while
(
allowed_len
&&
allowed_component
[
allowed_len
-
1
]
==
0
)
allowed_len
--
;
/* From RFC 2818 (HTTP over TLS), section 3.1:
/* From RFC 2818 (HTTP over TLS), section 3.1:
* "Names may contain the wildcard character * which is considered to match
* "Names may contain the wildcard character * which is considered to match
* any single domain name component or component fragment. E.g.,
* any single domain name component or component fragment. E.g.,
...
...
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