BIND 10 trac910, updated. f52ff519388e7f3ab4e903695b731a2a7000fcf5 [trac910] clarified an internal method name with some more comments as suggested in review.
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jul 14 22:15:16 UTC 2011
The branch, trac910 has been updated
via f52ff519388e7f3ab4e903695b731a2a7000fcf5 (commit)
from dfd8332b1a958ed9aeb6ae423ea937b5e08024f8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f52ff519388e7f3ab4e903695b731a2a7000fcf5
Author: JINMEI Tatuya <jinmei at isc.org>
Date: Thu Jul 14 15:13:41 2011 -0700
[trac910] clarified an internal method name with some more comments as
suggested in review.
-----------------------------------------------------------------------
Summary of changes:
src/lib/dns/tsig.cc | 10 ++++++----
src/lib/dns/tsig.h | 8 ++++----
2 files changed, 10 insertions(+), 8 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/dns/tsig.cc b/src/lib/dns/tsig.cc
index 0472e4b..1bda021 100644
--- a/src/lib/dns/tsig.cc
+++ b/src/lib/dns/tsig.cc
@@ -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_->getHMAC());
+ HMACPtr hmac(impl_->createHMAC());
// 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_->getHMAC());
+ HMACPtr hmac(impl_->createHMAC());
// If the context has previous MAC (either the Request MAC or its own
// previous MAC), digest it.
diff --git a/src/lib/dns/tsig.h b/src/lib/dns/tsig.h
index 13d599c..028d295 100644
--- a/src/lib/dns/tsig.h
+++ b/src/lib/dns/tsig.h
@@ -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 convenient 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 convenience 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.
///
More information about the bind10-changes
mailing list