Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
a9ba7e65
Commit
a9ba7e65
authored
Sep 12, 2000
by
Brian Wellington
Browse files
Allow a keyset to be self-signed if the signing key is a trusted-key.
parent
c0bf5197
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/dns/validator.c
View file @
a9ba7e65
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
*/
/* $Id: validator.c,v 1.8
0
2000/09/12 1
0:21:45
bwelling Exp $ */
/* $Id: validator.c,v 1.8
1
2000/09/12 1
2:01:50
bwelling Exp $ */
#include <config.h>
#include <config.h>
...
@@ -697,19 +697,13 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
...
@@ -697,19 +697,13 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
/*
/*
* Is the key name appropriate for this signature?
* Is the key name appropriate for this signature?
* This previously checked for self-signed keys. Now, if the key
* is self signed with a preconfigured key, it's ok.
*/
*/
namereln
=
dns_name_fullcompare
(
event
->
name
,
&
siginfo
->
signer
,
namereln
=
dns_name_fullcompare
(
event
->
name
,
&
siginfo
->
signer
,
&
order
,
&
nlabels
,
&
nbits
);
&
order
,
&
nlabels
,
&
nbits
);
if
(
event
->
rdataset
->
type
==
dns_rdatatype_key
&&
if
(
namereln
!=
dns_namereln_subdomain
&&
namereln
!=
dns_namereln_subdomain
)
{
namereln
!=
dns_namereln_equal
)
{
/*
* We don't want a KEY RR to authenticate
* itself, so we ignore the signature if it
* was not made by an ancestor of the KEY.
*/
return
(
DNS_R_CONTINUE
);
}
else
if
(
namereln
!=
dns_namereln_subdomain
&&
namereln
!=
dns_namereln_equal
)
{
/*
/*
* The key name is not at the same level
* The key name is not at the same level
* as 'rdataset', nor is it closer to the
* as 'rdataset', nor is it closer to the
...
@@ -735,6 +729,20 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
...
@@ -735,6 +729,20 @@ get_key(dns_validator_t *val, dns_rdata_sig_t *siginfo) {
return
(
ISC_R_SUCCESS
);
return
(
ISC_R_SUCCESS
);
}
}
/*
* A key set may not be self-signed unless the signing key is a
* security root. We don't want a KEY RR to authenticate
* itself, so we ignore the signature if it was not made by
* an ancestor of the KEY or a preconfigured key.
*/
if
(
event
->
rdataset
->
type
==
dns_rdatatype_key
&&
namereln
==
dns_namereln_equal
)
{
validator_log
(
val
,
ISC_LOG_DEBUG
(
3
),
"keyset was self-signed but not preconfigured"
);
return
(
DNS_R_CONTINUE
);
}
/*
/*
* Do we know about this key?
* Do we know about this key?
*/
*/
...
...
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