Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Adam Osuchowski
Kea
Commits
f52ff519
Commit
f52ff519
authored
Jul 14, 2011
by
JINMEI Tatuya
Browse files
[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
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
Supports
Markdown
0%
Try again
or
attach a new 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