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
24399bd3
Commit
24399bd3
authored
Oct 23, 2009
by
Juan Lang
Committed by
Alexandre Julliard
Oct 29, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
crypt32: Support IPv6 addresses in name constraint comparison.
parent
bcb4bc6b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
chain.c
dlls/crypt32/chain.c
+19
-2
No files found.
dlls/crypt32/chain.c
View file @
24399bd3
...
...
@@ -548,9 +548,13 @@ static BOOL ip_address_matches(const CRYPT_DATA_BLOB *constraint,
TRACE
(
"(%d, %p), (%d, %p)
\n
"
,
constraint
->
cbData
,
constraint
->
pbData
,
name
->
cbData
,
name
->
pbData
);
if
(
constraint
->
cbData
!=
sizeof
(
DWORD
)
*
2
)
/* RFC5280, section 4.2.1.10, iPAddress syntax: either 8 or 32 bytes, for
* IPv4 or IPv6 addresses, respectively.
*/
if
(
constraint
->
cbData
!=
sizeof
(
DWORD
)
*
2
&&
constraint
->
cbData
!=
32
)
*
trustErrorStatus
|=
CERT_TRUST_INVALID_NAME_CONSTRAINTS
;
else
if
(
name
->
cbData
==
sizeof
(
DWORD
))
else
if
(
name
->
cbData
==
sizeof
(
DWORD
)
&&
constraint
->
cbData
==
sizeof
(
DWORD
)
*
2
)
{
DWORD
subnet
,
mask
,
addr
;
...
...
@@ -562,6 +566,19 @@ static BOOL ip_address_matches(const CRYPT_DATA_BLOB *constraint,
*/
match
=
(
subnet
&
mask
)
==
(
addr
&
mask
);
}
else
if
(
name
->
cbData
==
16
&&
constraint
->
cbData
==
32
)
{
const
BYTE
*
subnet
,
*
mask
,
*
addr
;
DWORD
i
;
subnet
=
constraint
->
pbData
;
mask
=
constraint
->
pbData
+
16
;
addr
=
name
->
pbData
;
match
=
TRUE
;
for
(
i
=
0
;
match
&&
i
<
16
;
i
++
)
if
((
subnet
[
i
]
&
mask
[
i
])
!=
(
addr
[
i
]
&
mask
[
i
]))
match
=
FALSE
;
}
/* else: name is wrong size, no match */
return
match
;
...
...
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