cvs: pear /Net_DNS/DNS/RR TSIG.php

From: Date: Thu, 15 Aug 2002 16:28:02 +0000
Subject: cvs: pear /Net_DNS/DNS/RR TSIG.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-5761@lists.php.net to get a copy of this message
ekilfoil Thu Aug 15 12:28:02 2002 EDT Modified files: /pear/Net_DNS/DNS/RR TSIG.php Log: Fixed the problems with invalid transaction signatures. signatures can now be generated from a hmac-md5 key. Index: pear/Net_DNS/DNS/RR/TSIG.php diff -u pear/Net_DNS/DNS/RR/TSIG.php:1.1 pear/Net_DNS/DNS/RR/TSIG.php:1.2 --- pear/Net_DNS/DNS/RR/TSIG.php:1.1 Thu Aug 15 09:59:39 2002 +++ pear/Net_DNS/DNS/RR/TSIG.php Thu Aug 15 12:28:02 2002 @@ -91,8 +91,7 @@ } $this->algorithm = NET_DNS_DEFAULT_ALGORITHM; - //$this->time_signed = time(); - $this->time_signed = 1028243762; + $this->time_signed = time(); $this->fudge = NET_DNS_DEFAULT_FUDGE; $this->mac_size = 0; @@ -149,15 +148,6 @@ $key = base64_decode($key); $newpacket = $packet; - $newpacket->header->qdcount = 0; - $newpacket->question = array(); - $newpacket->header->ancount = 0; - $newpacket->answer = array(); - $newpacket->header->nscount = 0; - $newpacket->authority = array(); - $newpacket->header->arcount = 0; - $newpacket->additional = array(); - $newpacket->display(); $newoffset = $offset; array_pop($newpacket->additional); $newpacket->header->arcount--; @@ -194,10 +184,7 @@ $sigdata .= pack("nN", 0, $this->other_data); } - $r = new Net_DNS_Resolver(); - $r->printhex($sigdata); $this->mac = mhash(MHASH_MD5, $sigdata, $key); - echo bin2hex($this->mac) . "<br>" . bin2hex($key) . "<br>"; $this->mac_size = strlen($this->mac); /*

« previous php.pear.cvs (#5761) next »