Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.7

Bug #17431 hmac is not calculated properly in TSIG
Submitted: 2010-05-24 22:55 UTC
From: vchepkov Assigned:
Status: Duplicate Package: Net_DNS (version 1.0.1)
PHP Version: 5.3.2 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2010-05-24 22:55 UTC] vchepkov (Vadym Chepkov)
Description: ------------ After upgrading to fedora 12 the TSIG code stopped working. I took a look and find out this code $this->mac = mhash(MHASH_MD5, $sigdata, $key); was replaced with $this->mac = $this->hmac($sigdata, $key, 'md5'); and hmac function was added. I assume due to lack of mhash support in PHP 5.3. I didn't look enough in the function, what it does wrong, but there is no need for it at all. Instead code should be changed to $this->mac = hash_hmac('md5', $sigdata, $key, true); And all works fine with standard PHP5.3 functions

Comments

 [2010-05-25 07:57 UTC] doconnor (Daniel O'Connor)
-Status: Open +Status: Feedback
What's specifically wrong with the hmac calculation? (reproduce steps would be handy) This package has to maintain BC with PHP 4.2+, so cannot simply rely on just the php5 hmac fu8nctionality unfortunately.
 [2010-05-25 18:48 UTC] vchepkov (Vadym Chepkov)
Last Net_DNS module was released on 2009-06-08, this is what comes with Fedora Linux. And If I use the TSIG module from there I get rcode NOAUTH. If I change it the way I described, I get rcode NOERROR. I complained to Fedora about it and they told me to take it to upstream. I browsed through the source code and I see this problem was solved r295333 | clockwerx | 2010-02-21 18:15:57 -0500 (Sun, 21 Feb 2010) | 1 line Changed paths: M /pear/packages/Net_DNS/trunk/Net/DNS/RR/TSIG.php Applied patches for Bug #16501, Bug #16502 Maybe it justifies the release of version 1.0.2 so vendor can package it? Thank you.
 [2010-08-08 16:41 UTC] doconnor (Daniel O'Connor)
-Status: Feedback +Status: Duplicate
You are right, it justifies a release :) Bug #16501