]> git.pld-linux.org Git - packages/php-pear-Crypt_CHAP.git/commitdiff
- s/mhash/hash/ by Adam Chabin auto/ac/php-pear-Crypt_CHAP-1_0_2-3 auto/th/php-pear-Crypt_CHAP-1_0_2-3
authorareq <areq@pld-linux.org>
Wed, 1 Sep 2010 20:35:18 +0000 (20:35 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mhash.patch -> 1.1
    php-pear-Crypt_CHAP.spec -> 1.36

mhash.patch [new file with mode: 0644]
php-pear-Crypt_CHAP.spec

diff --git a/mhash.patch b/mhash.patch
new file mode 100644 (file)
index 0000000..03d3508
--- /dev/null
@@ -0,0 +1,53 @@
+--- /usr/share/pear/Crypt/CHAP.php.org 2010-09-01 14:51:08.000000000 +0000
++++ /usr/share/pear/Crypt/CHAP.php     2010-09-01 14:53:38.000000000 +0000
+@@ -164,13 +164,13 @@
+     /**
+      * Constructor
+      *
+-     * Loads the mhash extension
++     * Loads the hash extension
+      * @return void
+      */
+     function Crypt_CHAP_MSv1()
+     {
+         $this->Crypt_CHAP();
+-        $this->loadExtension('mhash');        
++        $this->loadExtension('hash');        
+     }
+     
+     /**
+@@ -182,10 +182,11 @@
+     function ntPasswordHash($password = null) 
+     {
+         if (isset($password)) {
+-            return mhash(MHASH_MD4, $this->str2unicode($password));
++            return pack('H*',hash('md4', $this->str2unicode($password)));            
+         } else {
+-            return mhash(MHASH_MD4, $this->str2unicode($this->password));
++            return pack('H*',hash('md4', $this->str2unicode($this->password)));            
+         }
++        
+     }
+     
+     /**
+@@ -431,7 +432,8 @@
+      */    
+     function ntPasswordHashHash($nthash) 
+     {
+-        return mhash(MHASH_MD4, $nthash);
++        return pack('H*',hash('md4', $nthash));
++        
+     }
+     
+     /**
+@@ -443,8 +445,8 @@
+      */   
+     function challengeHash() 
+     {
+-        return substr(mhash(MHASH_SHA1, $this->peerChallenge . $this->authChallenge . $this->username), 0, 8);
+-    }    
++       return substr(pack('H*',hash('sha1', $this->peerChallenge . $this->authChallenge . $this->username)), 0, 8);
++    } 
+     /**
+      * Generates the response. 
index 54624250d20263f484ea681d1b4d71bd304fff20..b6481a5ab81220f2b7f0ef3421a00398223ac9aa 100644 (file)
@@ -7,12 +7,13 @@ Summary:      %{_pearname} - Generating CHAP packets
 Summary(pl.UTF-8):     %{_pearname} - Generowanie pakietów CHAP
 Name:          php-pear-%{_pearname}
 Version:       1.0.2
-Release:       2
+Release:       3
 Epoch:         0
 License:       PHP 2.02
 Group:         Development/Languages/PHP
 Source0:       http://pear.php.net/get/%{_pearname}-%{version}.tgz
 # Source0-md5: 4175a1d5486f305831adba517009c253
+Patch0:                mhash.patch
 URL:           http://pear.php.net/package/Crypt_CHAP/
 BuildRequires: php-pear-PEAR
 BuildRequires: rpm-php-pearprov >= 4.4.2-11
@@ -23,6 +24,7 @@ Suggests:     php-mhash
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+
 %description
 This package provides Classes for generating CHAP packets. Currently
 these types of CHAP are supported:
@@ -57,6 +59,7 @@ Testy dla PEAR::%{_pearname}.
 
 %prep
 %pear_package_setup
+%patch0 -p1 
 
 %install
 rm -rf $RPM_BUILD_ROOT
This page took 0.034252 seconds and 4 git commands to generate.