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
600
Issues
600
List
Boards
Labels
Service Desk
Milestones
Merge Requests
111
Merge Requests
111
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
bb71d640
Commit
bb71d640
authored
Oct 27, 2000
by
Brian Wellington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dns_message_checksig should not require a view in all cases
parent
f1cae4bc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
lib/dns/include/dns/message.h
lib/dns/include/dns/message.h
+2
-2
lib/dns/message.c
lib/dns/message.c
+9
-5
No files found.
lib/dns/include/dns/message.h
View file @
bb71d640
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.h,v 1.7
8 2000/10/06 18:58:24
bwelling Exp $ */
/* $Id: message.h,v 1.7
9 2000/10/27 21:56:57
bwelling Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
...
...
@@ -1151,7 +1151,7 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view);
* Requires:
*
* msg is a valid parsed message.
* view is a valid view
* view is a valid view
or NULL
*
* Returns:
*
...
...
lib/dns/message.c
View file @
bb71d640
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.15
5 2000/10/25 04:26:38 marka
Exp $ */
/* $Id: message.c,v 1.15
6 2000/10/27 21:56:56 bwelling
Exp $ */
/***
*** Imports
...
...
@@ -2640,16 +2640,18 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view) {
isc_buffer_t
b
,
msgb
;
REQUIRE
(
DNS_MESSAGE_VALID
(
msg
));
REQUIRE
(
view
!=
NULL
);
if
(
msg
->
tsigkey
==
NULL
&&
msg
->
tsig
==
NULL
&&
msg
->
sig0
==
NULL
)
return
(
ISC_R_SUCCESS
);
INSIST
(
msg
->
saved
!=
NULL
);
isc_buffer_init
(
&
msgb
,
msg
->
saved
->
base
,
msg
->
saved
->
length
);
isc_buffer_add
(
&
msgb
,
msg
->
saved
->
length
);
if
(
msg
->
tsigkey
!=
NULL
||
msg
->
tsig
!=
NULL
)
return
(
dns_view_checksig
(
view
,
&
msgb
,
msg
));
else
{
if
(
msg
->
tsigkey
!=
NULL
||
msg
->
tsig
!=
NULL
)
{
if
(
view
!=
NULL
)
return
(
dns_view_checksig
(
view
,
&
msgb
,
msg
));
else
return
(
dns_tsig_verify
(
&
msgb
,
msg
,
NULL
,
NULL
));
}
else
{
dns_rdata_t
rdata
=
DNS_RDATA_INIT
;
dns_rdata_sig_t
sig
;
dns_rdataset_t
keyset
;
...
...
@@ -2674,6 +2676,8 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view) {
return
(
result
);
dns_rdataset_init
(
&
keyset
);
if
(
view
==
NULL
)
return
DNS_R_KEYUNAUTHORIZED
;
result
=
dns_view_simplefind
(
view
,
&
sig
.
signer
,
dns_rdatatype_key
,
0
,
0
,
ISC_FALSE
,
&
keyset
,
NULL
);
...
...
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