From a98a4f8bb56eacffff1765ff09dd29af26e5fc12 Mon Sep 17 00:00:00 2001 From: Thomas Bruederli Date: Wed, 27 Aug 2014 17:45:21 +0200 Subject: Remove 3rd party libs from our repository and define the dependencies in composer.json-dist. Also remove the ancient utf8 lib and replace it with 'Patchwork UTF-8 for PHP'. For direct git checkouts, copy composer.json-dist into composer.json and run `php composer.phar install` to install the dependencies. --- program/lib/Auth/SASL/DigestMD5.php | 197 ------------------------------------ 1 file changed, 197 deletions(-) delete mode 100644 program/lib/Auth/SASL/DigestMD5.php (limited to 'program/lib/Auth/SASL/DigestMD5.php') diff --git a/program/lib/Auth/SASL/DigestMD5.php b/program/lib/Auth/SASL/DigestMD5.php deleted file mode 100644 index 07007b7c9..000000000 --- a/program/lib/Auth/SASL/DigestMD5.php +++ /dev/null @@ -1,197 +0,0 @@ - | -// +-----------------------------------------------------------------------+ -// -// $Id$ - -/** -* Implmentation of DIGEST-MD5 SASL mechanism -* -* @author Richard Heyes -* @access public -* @version 1.0 -* @package Auth_SASL -*/ - -require_once('Auth/SASL/Common.php'); - -class Auth_SASL_DigestMD5 extends Auth_SASL_Common -{ - /** - * Provides the (main) client response for DIGEST-MD5 - * requires a few extra parameters than the other - * mechanisms, which are unavoidable. - * - * @param string $authcid Authentication id (username) - * @param string $pass Password - * @param string $challenge The digest challenge sent by the server - * @param string $hostname The hostname of the machine you're connecting to - * @param string $service The servicename (eg. imap, pop, acap etc) - * @param string $authzid Authorization id (username to proxy as) - * @return string The digest response (NOT base64 encoded) - * @access public - */ - function getResponse($authcid, $pass, $challenge, $hostname, $service, $authzid = '') - { - $challenge = $this->_parseChallenge($challenge); - $authzid_string = ''; - if ($authzid != '') { - $authzid_string = ',authzid="' . $authzid . '"'; - } - - if (!empty($challenge)) { - $cnonce = $this->_getCnonce(); - $digest_uri = sprintf('%s/%s', $service, $hostname); - $response_value = $this->_getResponseValue($authcid, $pass, $challenge['realm'], $challenge['nonce'], $cnonce, $digest_uri, $authzid); - - if ($challenge['realm']) { - return sprintf('username="%s",realm="%s"' . $authzid_string . -',nonce="%s",cnonce="%s",nc=00000001,qop=auth,digest-uri="%s",response=%s,maxbuf=%d', $authcid, $challenge['realm'], $challenge['nonce'], $cnonce, $digest_uri, $response_value, $challenge['maxbuf']); - } else { - return sprintf('username="%s"' . $authzid_string . ',nonce="%s",cnonce="%s",nc=00000001,qop=auth,digest-uri="%s",response=%s,maxbuf=%d', $authcid, $challenge['nonce'], $cnonce, $digest_uri, $response_value, $challenge['maxbuf']); - } - } else { - return PEAR::raiseError('Invalid digest challenge'); - } - } - - /** - * Parses and verifies the digest challenge* - * - * @param string $challenge The digest challenge - * @return array The parsed challenge as an assoc - * array in the form "directive => value". - * @access private - */ - function _parseChallenge($challenge) - { - $tokens = array(); - while (preg_match('/^([a-z-]+)=("[^"]+(? -- cgit v1.2.3