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
Kea
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian Schrader
Kea
Commits
f52ff519
Commit
f52ff519
authored
Jul 14, 2011
by
JINMEI Tatuya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[trac910] clarified an internal method name with some more comments as
suggested in review.
parent
dfd8332b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
8 deletions
+10
-8
src/lib/dns/tsig.cc
src/lib/dns/tsig.cc
+6
-4
src/lib/dns/tsig.h
src/lib/dns/tsig.h
+4
-4
No files found.
src/lib/dns/tsig.cc
View file @
f52ff519
...
...
@@ -109,8 +109,10 @@ struct TSIGContext::TSIGContextImpl {
// A shortcut method to create an HMAC object for sign/verify. If one
// has been successfully created in the constructor, return it; otherwise
// create a new one and return it.
HMACPtr
getHMAC
()
{
// create a new one and return it. In the former case, the ownership is
// transferred to the caller; the stored HMAC will be reset after the
// call.
HMACPtr
createHMAC
()
{
if
(
hmac_
)
{
HMACPtr
ret
=
HMACPtr
();
ret
.
swap
(
hmac_
);
...
...
@@ -353,7 +355,7 @@ TSIGContext::sign(const uint16_t qid, const void* const data,
return
(
tsig
);
}
HMACPtr
hmac
(
impl_
->
get
HMAC
());
HMACPtr
hmac
(
impl_
->
create
HMAC
());
// If the context has previous MAC (either the Request MAC or its own
// previous MAC), digest it.
...
...
@@ -479,7 +481,7 @@ TSIGContext::verify(const TSIGRecord* const record, const void* const data,
return
(
impl_
->
postVerifyUpdate
(
error
,
NULL
,
0
));
}
HMACPtr
hmac
(
impl_
->
get
HMAC
());
HMACPtr
hmac
(
impl_
->
create
HMAC
());
// If the context has previous MAC (either the Request MAC or its own
// previous MAC), digest it.
...
...
src/lib/dns/tsig.h
View file @
f52ff519
...
...
@@ -355,7 +355,7 @@ public:
/// Return the expected length of TSIG RR after \c sign()
///
/// This method returns the length of the TSIG RR
based
that would be
/// This method returns the length of the TSIG RR that would be
/// produced as a result of \c sign() with the state of the context
/// at the time of the call. The expected length can be decided
/// from the key and the algorithm (which determines the MAC size if
...
...
@@ -363,9 +363,9 @@ public:
/// related error has been identified, the MAC will be excluded; if
/// a time error has occurred, the TSIG will include "other data".
///
/// This method is provided mainly for the convenien
t of the Message class,
///
which needs to know the expected TSIG length in rendering a signed
/// DNS message so that it can handle truncated messages with TSIG
/// This method is provided mainly for the convenien
ce of the Message
///
class, which needs to know the expected TSIG length in rendering a
///
signed
DNS message so that it can handle truncated messages with TSIG
/// correctly. Normal applications wouldn't need this method. The Python
/// binding for this method won't be provided for the same reason.
///
...
...
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