Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
602
Issues
602
List
Boards
Labels
Service Desk
Milestones
Merge Requests
113
Merge Requests
113
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
5d01eab0
Commit
5d01eab0
authored
Apr 21, 2017
by
Mukund Sivaraman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ignore SHA-1 DS digest type when SHA-384 DS digest type is present (#45017)
parent
b0dbcba2
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
12 deletions
+33
-12
CHANGES
CHANGES
+5
-0
lib/dns/validator.c
lib/dns/validator.c
+28
-12
No files found.
CHANGES
View file @
5d01eab0
4597. [bug] The validator now ignores SHA-1 DS digest type
when a DS record with SHA-384 digest type is
present and is a supported digest type.
[RT #45017]
4596. [bug] Validate glue before adding it to the additional
section. This also fixes incorrect TTL capping
when the RRSIG expired earlier than the TTL.
...
...
lib/dns/validator.c
View file @
5d01eab0
...
...
@@ -1812,10 +1812,10 @@ dlv_validatezonekey(dns_validator_t *val) {
supported_algorithm
=
ISC_FALSE
;
/*
* If DNS_DSDIGEST_SHA256
is present we are required to prefer
*
it over DNS_DSDIGEST_SHA1. This in practice means that we
*
need to ignore DNS_DSDIGEST_SHA1 if a DNS_DSDIGEST_SHA256
* is present.
* If DNS_DSDIGEST_SHA256
or DNS_DSDIGEST_SHA384 is present we
*
are required to prefer it over DNS_DSDIGEST_SHA1. This in
*
practice means that we need to ignore DNS_DSDIGEST_SHA1 if a
*
DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384
is present.
*/
memset
(
digest_types
,
1
,
sizeof
(
digest_types
));
for
(
result
=
dns_rdataset_first
(
&
val
->
dlv
);
...
...
@@ -1826,13 +1826,21 @@ dlv_validatezonekey(dns_validator_t *val) {
result
=
dns_rdata_tostruct
(
&
dlvrdata
,
&
dlv
,
NULL
);
RUNTIME_CHECK
(
result
==
ISC_R_SUCCESS
);
if
(
!
dns_resolver_ds_digest_supported
(
val
->
view
->
resolver
,
val
->
event
->
name
,
dlv
.
digest_type
))
continue
;
if
(
!
dns_resolver_algorithm_supported
(
val
->
view
->
resolver
,
val
->
event
->
name
,
dlv
.
algorithm
))
continue
;
if
(
dlv
.
digest_type
==
DNS_DSDIGEST_SHA256
&&
dlv
.
length
==
ISC_SHA256_DIGESTLENGTH
)
{
if
((
dlv
.
digest_type
==
DNS_DSDIGEST_SHA256
&&
dlv
.
length
==
ISC_SHA256_DIGESTLENGTH
)
||
(
dlv
.
digest_type
==
DNS_DSDIGEST_SHA384
&&
dlv
.
length
==
ISC_SHA384_DIGESTLENGTH
))
{
digest_types
[
DNS_DSDIGEST_SHA1
]
=
0
;
break
;
}
...
...
@@ -2164,10 +2172,10 @@ validatezonekey(dns_validator_t *val) {
supported_algorithm
=
ISC_FALSE
;
/*
* If DNS_DSDIGEST_SHA256
is present we are required to prefer
*
it over DNS_DSDIGEST_SHA1. This in practice means that we
*
need to ignore DNS_DSDIGEST_SHA1 if a DNS_DSDIGEST_SHA256
* is present.
* If DNS_DSDIGEST_SHA256
or DNS_DSDIGEST_SHA384 is present we
*
are required to prefer it over DNS_DSDIGEST_SHA1. This in
*
practice means that we need to ignore DNS_DSDIGEST_SHA1 if a
*
DNS_DSDIGEST_SHA256 or DNS_DSDIGEST_SHA384
is present.
*/
memset
(
digest_types
,
1
,
sizeof
(
digest_types
));
for
(
result
=
dns_rdataset_first
(
val
->
dsset
);
...
...
@@ -2178,13 +2186,21 @@ validatezonekey(dns_validator_t *val) {
result
=
dns_rdata_tostruct
(
&
dsrdata
,
&
ds
,
NULL
);
RUNTIME_CHECK
(
result
==
ISC_R_SUCCESS
);
if
(
!
dns_resolver_ds_digest_supported
(
val
->
view
->
resolver
,
val
->
event
->
name
,
ds
.
digest_type
))
continue
;
if
(
!
dns_resolver_algorithm_supported
(
val
->
view
->
resolver
,
val
->
event
->
name
,
ds
.
algorithm
))
continue
;
if
(
ds
.
digest_type
==
DNS_DSDIGEST_SHA256
&&
ds
.
length
==
ISC_SHA256_DIGESTLENGTH
)
{
if
((
ds
.
digest_type
==
DNS_DSDIGEST_SHA256
&&
ds
.
length
==
ISC_SHA256_DIGESTLENGTH
)
||
(
ds
.
digest_type
==
DNS_DSDIGEST_SHA384
&&
ds
.
length
==
ISC_SHA384_DIGESTLENGTH
))
{
digest_types
[
DNS_DSDIGEST_SHA1
]
=
0
;
break
;
}
...
...
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