From: Michal 'vorner' Vaner Date: Thu, 6 Sep 2012 11:10:52 +0000 (+0200) Subject: [1357] Update documentation and interface of TSIGContext X-Git-Tag: trac2351_base~49^2~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=40e0500ef5b5b39e698bf7c0ab6f8872cfdf1d07;p=thirdparty%2Fkea.git [1357] Update documentation and interface of TSIGContext Preparation for the upcoming changes: * Remove the TODO that'll be solved by this branch. * Add a method needed to use it correctly. --- diff --git a/src/lib/dns/tsig.h b/src/lib/dns/tsig.h index 028d29586c..29a6ec5235 100644 --- a/src/lib/dns/tsig.h +++ b/src/lib/dns/tsig.h @@ -339,7 +339,6 @@ public: /// returns (without an exception being thrown), the internal state of /// the \c TSIGContext won't be modified. /// - /// \todo Support intermediate TCP DNS messages without TSIG (RFC2845 4.4) /// \todo Signature truncation support based on RFC4635 /// /// \exception TSIGContextError Context already signed a response. @@ -353,6 +352,19 @@ public: TSIGError verify(const TSIGRecord* const record, const void* const data, const size_t data_len); + /// \brief If the last verified message was signed. + /// + /// The RFC2845 allows for some of the messages not to be signed. However, + /// the last message must be signed and the class has knowledge if a given + /// message is last, therefore it can't check that. + /// + /// It is up to the caller to check if the last verified message was signed + /// after all are verified by calling this function. + /// + /// \return If the last message was signed or not. + /// \exception TSIGContextError if no message was verified yet. + bool lastHadSignature() const; + /// Return the expected length of TSIG RR after \c sign() /// /// This method returns the length of the TSIG RR that would be