--- /dev/null
+--- /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.
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
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:
%prep
%pear_package_setup
+%patch0 -p1
%install
rm -rf $RPM_BUILD_ROOT