806. [bug] DNS_R_SEENINCLUDE was failing to propagate back up
the calling stack to the zone maintence level.
+ 771. [cleanup] TSIG errors related to unsynchronized clocks
+ are logged better. [RT #919]
+
669. [bug] dnssec-keygen now makes the public key file
non-world-readable for symmetric keys. [RT #403]
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tsig.h,v 1.36.4.1 2001/01/09 22:46:24 bwelling Exp $ */
+/* $Id: tsig.h,v 1.36.4.2 2001/05/18 21:28:43 gson Exp $ */
#ifndef DNS_TSIG_H
#define DNS_TSIG_H 1
* DNS_R_UNEXPECTEDTSIG - A TSIG was seen but not expected
* DNS_R_TSIGERRORSET - the TSIG verified but ->error was set
* and this is a query
+ * DNS_R_CLOCKSKEW - the TSIG failed to verify because of
+ * the time was out of the allowed range.
* DNS_R_TSIGVERIFYFAILURE - the TSIG failed to verify
*/
*/
/*
- * $Id: tsig.c,v 1.98.4.5 2001/01/22 20:42:29 gson Exp $
+ * $Id: tsig.c,v 1.98.4.6 2001/05/18 21:28:41 gson Exp $
* Principal Author: Brian Wellington
*/
else
tsig_log(msg->tsigkey, 2,
"signature is in the future");
- return (DNS_R_TSIGVERIFYFAILURE);
+ return (DNS_R_CLOCKSKEW);
}
if (tsig.siglen > 0) {
msg->tsigstatus = dns_rcode_noerror;
- if (tsig.error != dns_rcode_noerror)
- return (DNS_R_TSIGERRORSET);
+ if (tsig.error != dns_rcode_noerror) {
+ if (tsig.error == dns_tsigerror_badtime)
+ return (DNS_R_CLOCKSKEW);
+ else
+ return (DNS_R_TSIGERRORSET);
+ }
msg->verified_sig = 1;
isc_stdtime_get(&now);
if (abs(now - tsig.timesigned) > tsig.fudge) {
msg->tsigstatus = dns_tsigerror_badtime;
- ret = DNS_R_TSIGVERIFYFAILURE;
+ ret = DNS_R_CLOCKSKEW;
if (now > tsig.timesigned + tsig.fudge)
tsig_log(msg->tsigkey, 2,
"signature has expired");
sig_r.base = tsig.signature;
sig_r.length = tsig.siglen;
if (tsig.siglen == 0) {
- if (tsig.error != dns_rcode_noerror)
- ret = DNS_R_TSIGERRORSET;
- else {
+ if (tsig.error != dns_rcode_noerror) {
+ if (tsig.error == dns_tsigerror_badtime)
+ ret = DNS_R_CLOCKSKEW;
+ else
+ ret = DNS_R_TSIGERRORSET;
+ } else {
tsig_log(msg->tsigkey, 2,
"signature is empty");
ret = DNS_R_TSIGVERIFYFAILURE;