Commit 2d18614f authored by Ondrej Sury's avatar Ondrej Sury

Imported Upstream version 1.2.5

parents
<?xml version="1.0" encoding="UTF-8"?>
<package packagerversion="1.4.11" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
<name>radius</name>
<channel>pecl.php.net</channel>
<summary>Radius client library</summary>
<description>This package is based on the libradius of FreeBSD, with some modifications and extensions.
This PECL provides full support for RADIUS authentication (RFC 2865) and RADIUS accounting (RFC 2866),
works on Unix and on Windows. Its an easy way to authenticate your users against the user-database of your
OS (for example against Windows Active-Directory via IAS).</description>
<lead>
<name>Michael Bretterklieber</name>
<user>mbretter</user>
<email>mbretter@php.net</email>
<active>yes</active>
</lead>
<date>2007-03-18</date>
<time>22:59:40</time>
<version>
<release>1.2.5</release>
<api>1.2.5</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- amd64 arch fixes</notes>
<contents>
<dir name="/">
<file md5sum="1a8f43c22c7615cc509387e1a0b8f097" name="examples/des.php" role="doc" />
<file md5sum="ee5ca6cbc188b510d452c70f6aff17b7" name="examples/mschap.php" role="doc" />
<file md5sum="5a85a24eded94aa56fcab8b0c8e1ba43" name="examples/mschaptest.php" role="doc" />
<file md5sum="27519773a7ebc30a72a979a6e783c438" name="examples/radius-acct.php" role="doc" />
<file md5sum="165628d96f03e14f2b00ec23254b83ba" name="examples/radius-auth.php" role="doc" />
<file md5sum="5f91177b229d1b5ac2b78d581f82527c" name="config.m4" role="src" />
<file md5sum="0635a86eeedccbd9871cc7a073cdedfe" name="CREDITS" role="src" />
<file md5sum="0df56da4ebe67b4de0b793c688a7d054" name="Makefile.in" role="src" />
<file md5sum="86b102d8c6997fcdc9d22ecfb6fa2086" name="php_radius.h" role="src" />
<file md5sum="45fcd01a1aad40e85314fa442093d08d" name="radius.c" role="src" />
<file md5sum="32314145ab4a36966dade15c2261a51a" name="radius.conf" role="src" />
<file md5sum="a01a9e5453ddccebc5efe87099c24b73" name="radius.dsp" role="src" />
<file md5sum="c7b1fcf55179bf615e35742eb3f3769c" name="radius.dsw" role="src" />
<file md5sum="3964936e545261420948f7476bd6ecc9" name="radius_init_const.h" role="src" />
<file md5sum="16227e1dc1380bb03d61f5125a50501a" name="radlib.c" role="src" />
<file md5sum="55624d3c28b5aa21e9542837af17d417" name="radlib.h" role="src" />
<file md5sum="de4000780ac104c1fe8bb82e5ff6c5e5" name="radlib_compat.c" role="src" />
<file md5sum="8e02153235155da6590ad7f1cc302d16" name="radlib_compat.h" role="src" />
<file md5sum="bfa8ae0ceca967265d21fef5409577b4" name="radlib_md5.h" role="src" />
<file md5sum="bea965f3d945cbb4faebca3edf2c259d" name="radlib_private.h" role="src" />
<file md5sum="bfe3915ea4e8b15a250df42c4012531e" name="radlib_vs.h" role="src" />
</dir>
</contents>
<dependencies>
<required>
<php>
<min>4.0.0</min>
</php>
<pearinstaller>
<min>1.4.0b1</min>
</pearinstaller>
</required>
</dependencies>
<providesextension>radius</providesextension>
<extsrcrelease />
<changelog>
<release>
<version>
<release>1.2.5</release>
<api>1.2.5</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2007-03-18</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.2.5
- amd64 arch fixes</notes>
</release>
<release>
<version>
<release>1.2.4</release>
<api>1.2.4</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-11-17</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.2.4
- Forgot including updated radius_init_const.h</notes>
</release>
<release>
<version>
<release>1.2.3</release>
<api>1.2.3</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-11-04</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.2.3
- Fixed a typo in radius_init_const.h wich caused RADIUS_ACCT_STATUS_TYPE to be undefined.
- Re-added Makefile.in</notes>
</release>
<release>
<version>
<release>1.2.2</release>
<api>1.2.2</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-07-17</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.2.2
- Changed role for example-files to doc
- Removed deprecated files
- Added IPv6 related attributes defined in RFC3162</notes>
</release>
<release>
<version>
<release>1.2.1</release>
<api>1.2.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-05-02</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.2.1
- Change License to BSD
- BugFix: The MS-CHAPv2 Authenticator-Challenge has 16 Bytes and not 8 Bytes
- BugFix: build under Solaris
- Generate better challenges
- Many source-code-style fixes
- Removed unneeded sources
- Some cleanup&apos;s</notes>
</release>
<release>
<version>
<release>1.2</release>
<api>1.2</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2003-01-11</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.2
- BugFix: a to short challenge was generated sometimes (MS-CHAPv1, MS-CHAPv2)
- New functions:
radius_demangle: demangles radius passwords and mppe MS-CHAPv1 Keys
radius_demangle_mppe_key: demangles mppe send- and recvkey (MS-CHAPv2)
- Provide examples for radius-accounting
- Replaced mcrypt-functions with own des-ecb-encryption function
- Some minor changes in radius-auth.php
- Added php-script for testing MS-CHAP functions</notes>
</release>
<release>
<version>
<release>1.1</release>
<api>1.1</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-12-22</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.1
- Fixed source code style
- added examples directory
- added examples for MS-CHAPv1 and MS-CHAPv2</notes>
</release>
<release>
<version>
<release>1.0</release>
<api>1.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<date>2002-12-17</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Release 1.0</notes>
</release>
<release>
<version>
<release>0.9</release>
<api>0.9</api>
</version>
<stability>
<release>beta</release>
<api>beta</api>
</stability>
<date>2002-12-11</date>
<license uri="http://www.opensource.org/licenses/bsd-license.php">BSD</license>
<notes>- Well tested under Linux, FreeBSD and Windows</notes>
</release>
</changelog>
</package>
RADIUS
Michael Bretterklieber, The FreeBSD Project http://www.freebsd.org
\ No newline at end of file
# $Id: Makefile.in,v 1.3 2003/11/04 19:14:39 mbretter Exp $
LTLIBRARY_NAME = libradius.la
LTLIBRARY_SOURCES = radius.c radlib.c
LTLIBRARY_SHARED_NAME = radius.la
LTLIBRARY_LIBADD = $(RADIUS_LIBADD)
LTLIBRARY_SHARED_LIBADD = $(RADIUS_SHARED_LIBADD)
include $(top_srcdir)/build/dynlib.mk
\ No newline at end of file
dnl $Id: config.m4,v 1.4 2003/07/17 13:54:39 mbretter Exp $
dnl config.m4 for extension radius
PHP_ARG_ENABLE(radius, whether to enable radius support,
dnl Make sure that the comment is aligned:
[ --enable-radius Enable radius support])
if test "$PHP_RADIUS" != "no"; then
AC_TRY_COMPILE([
#include <sys/types.h>
], [
u_int32_t ulongint;
ulongint = 1;
], [
AC_DEFINE(HAVE_U_INT32_T, 1, [ ])
])
PHP_NEW_EXTENSION(radius, radius.c radlib.c, $ext_shared)
fi
This diff is collapsed.
<?php
/*
Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This code cannot simply be copied and put under the GNU Public License or
any other GPL-like (LGPL, GPL2) License.
$Id: mschap.php,v 1.5 2003/01/26 20:31:11 mbretter Exp $
*/
include_once 'des.php';
function NtPasswordHash($plain)
{
return mhash (MHASH_MD4, str2unicode($plain));
}
function str2unicode($str)
{
for ($i=0;$i<strlen($str);$i++) {
$a = ord($str{$i}) << 8;
$uni .= sprintf("%X",$a);
}
return pack('H*', $uni);
}
function GenerateChallenge($size = 8)
{
mt_srand(hexdec(substr(md5(microtime()), -8)) & 0x7fffffff);
for($i = 0; $i < $size; $i++) {
$chall .= pack('C', 1 + mt_rand() % 255);
}
return $chall;
}
function ChallengeResponse($challenge, $nthash)
{
while (strlen($nthash) < 21)
$nthash .= "\0";
$resp1 = des_encrypt_ecb(substr($nthash, 0, 7), $challenge);
$resp2 = des_encrypt_ecb(substr($nthash, 7, 7), $challenge);
$resp3 = des_encrypt_ecb(substr($nthash, 14, 7), $challenge);
return $resp1 . $resp2 . $resp3;
}
// MS-CHAPv2
function GeneratePeerChallenge()
{
return GenerateChallenge(16);
}
function NtPasswordHashHash($hash)
{
return mhash (MHASH_MD4, $hash);
}
function ChallengeHash($challenge, $peerChallenge, $username)
{
return substr(mhash (MHASH_SHA1, $peerChallenge . $challenge . $username), 0, 8);
}
function GenerateNTResponse($challenge, $peerChallenge, $username, $password)
{
$challengeHash = ChallengeHash($challenge, $peerChallenge, $username);
$pwhash = NtPasswordHash($password);
return ChallengeResponse($challengeHash, $pwhash);
}
?>
<?php
/*
Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This code cannot simply be copied and put under the GNU Public License or
any other GPL-like (LGPL, GPL2) License.
$Id: mschaptest.php,v 1.2 2003/01/26 20:31:11 mbretter Exp $
*/
include_once('mschap.php');
echo "MS-CHAPv1 TEST\n";
$pass = 'MyPw';
$challenge = pack('H*', '102DB5DF085D3041');
printf ("Test Challenge: %s\n", bin2hex($challenge));
$unipw = str2unicode($pass);
printf ("Unicode PW: %s\nexpected : 4d00790050007700\n", bin2hex($unipw));
$nthash = NtPasswordHash($pass);
printf ("NT HASH : %s\nexpected : fc156af7edcd6c0edde3337d427f4eac\n", bin2hex($nthash));
$challresp = ChallengeResponse($challenge, $nthash);
printf ("ChallResp : %s\nexpected : 4e9d3c8f9cfd385d5bf4d3246791956ca4c351ab409a3d61\n", bin2hex($challresp));
echo "\n";
echo "MS-CHAPv2 TEST\n";
$user = 'User';
$pass = 'clientPass';
printf ("Username : %s\nexpected : 55736572\n", bin2hex($user));
$challenge = pack('H*', 'd02e4386bce91226');
printf ("Challenge : %s\n", bin2hex($challenge));
$authchallenge = pack('H*', '5b5d7c7d7b3f2f3e3c2c602132262628');
printf ("Auth Challenge: %s\n", bin2hex($authchallenge));
$peerChallenge = pack('H*', '21402324255E262A28295F2B3A337C7E');
printf ("Peer Challenge: %s\n", bin2hex($peerChallenge));
$nthash = NtPasswordHash($pass);
printf ("NT HASH : %s\nexpected : 44ebba8d5312b8d611474411f56989ae\n", bin2hex($nthash));
$nthashhash = NtPasswordHashHash($nthash);
printf ("NT HASH-HASH : %s\nexpected : 41c00c584bd2d91c4017a2a12fa59f3f\n", bin2hex($nthashhash));
$resp = GenerateNtResponse($authchallenge, $peerChallenge, $user, $pass);
printf ("ChallResp : %s\nexpected : 82309ecd8d708b5ea08faa3981cd83544233114a3d85d6df\n", bin2hex($resp));
echo "\n";
?>
<?php
/*
Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This code cannot simply be copied and put under the GNU Public License or
any other GPL-like (LGPL, GPL2) License.
$Id: radius-acct.php,v 1.3 2007/03/18 21:17:02 mbretter Exp $
*/
if(!extension_loaded('radius')) {
if (preg_match('/windows/i', getenv('OS'))) {
dl('php_radius.dll');
} else {
dl('radius.so');
}
}
$username = 'sepp';
$radserver = 'localhost';
$radport = 1813;
$starttime = time();
$sharedsecret = 'testing123';
if (!isset($REMOTE_ADDR)) $REMOTE_ADDR = '127.0.0.1';
$res = radius_acct_open();
echo "$res<br>\n";
//if (!radius_config($res, '/etc/radius.conf')) {
/*if (!radius_config($res, 'D:/php-devel/pear/PECL/radius/radius.conf')) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}*/
if (!radius_add_server($res, $radserver, $radport, $sharedsecret, 3, 3)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_create_request($res, RADIUS_ACCOUNTING_REQUEST)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_string($res, RADIUS_NAS_IDENTIFIER, isset($HTTP_HOST) ? $HTTP_HOST : 'localhost')) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_int($res, RADIUS_SERVICE_TYPE, RADIUS_FRAMED)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_int($res, RADIUS_FRAMED_PROTOCOL, RADIUS_PPP)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_string($res, RADIUS_CALLING_STATION_ID, isset($REMOTE_HOST) ? $REMOTE_HOST : '127.0.0.1') == -1) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_string($res, RADIUS_USER_NAME, $username)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_addr($res, RADIUS_FRAMED_IP_ADDRESS, $REMOTE_ADDR)) {
echo 'RadiusError1:' . radius_strerror($res). "\n<br>";
exit;
}
// RADIUS_START => start accounting
// RADIUS_STOP => stop accounting
if (!radius_put_int($res, RADIUS_ACCT_STATUS_TYPE, RADIUS_START)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
/* Generate a session ID */
$sessionid = sprintf("%s:%d-%s", $REMOTE_ADDR, getmypid(), get_current_user());
if (!radius_put_string($res, RADIUS_ACCT_SESSION_ID, $sessionid)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
// RADIUS_AUTH_RADIUS => authenticated via Radius
// RADIUS_AUTH_LOCAL => authenicated local
// RADIUS_AUTH_REMOTE => authenticated remote
if (!radius_put_int($res, RADIUS_ACCT_AUTHENTIC, RADIUS_AUTH_LOCAL)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
sleep(3);
// if RADIUS_ACCT_STATUS_TYPE == RADIUS_STOP
if (!radius_put_int($res, RADIUS_ACCT_TERMINATE_CAUSE, RADIUS_TERM_USER_REQUEST)) {
echo 'RadiusError2:' . radius_strerror($res). "\n<br>";
exit;
}
if (!radius_put_int($res, RADIUS_ACCT_SESSION_TIME, time() - $starttime)) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
// endif
$req = radius_send_request($res);
if (!$req) {
echo 'RadiusError:' . radius_strerror($res). "\n<br>";
exit;
}
switch($req) {
case RADIUS_ACCOUNTING_RESPONSE:
echo "Radius Accounting response<br>\n";
break;
default:
echo "Unexpected return value:$req\n<br>";
}
radius_close($res);
?>
This diff is collapsed.
/*
Copyright (c) 2003, Michael Bretterklieber <michael@bretterklieber.com>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. The names of the authors may not be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This code cannot simply be copied and put under the GNU Public License or
any other GPL-like (LGPL, GPL2) License.
$Id: php_radius.h,v 1.7 2003/05/17 19:22:32 mbretter Exp $
*/
#include "radlib.h"
#include "radlib_private.h"
#ifndef PHP_RADIUS_H
#define PHP_RADIUS_H
#define phpext_radius_ptr &radius_module_entry
#ifdef PHP_WIN32
#define PHP_RADIUS_API __declspec(dllexport)
#else
#define PHP_RADIUS_API
#endif
#ifdef ZTS
#include "TSRM.h"
#endif
extern zend_module_entry radius_module_entry;
typedef struct {
int id;
struct rad_handle *radh;
} radius_descriptor;
PHP_MINIT_FUNCTION(radius);
PHP_MSHUTDOWN_FUNCTION(radius);
PHP_MINFO_FUNCTION(radius);
PHP_FUNCTION(radius_auth_open);
PHP_FUNCTION(radius_acct_open);
PHP_FUNCTION(radius_close);
PHP_FUNCTION(radius_strerror);
PHP_FUNCTION(radius_config);
PHP_FUNCTION(radius_add_server);
PHP_FUNCTION(radius_create_request);
PHP_FUNCTION(radius_put_string);
PHP_FUNCTION(radius_put_int);
PHP_FUNCTION(radius_put_attr);
PHP_FUNCTION(radius_put_addr);
PHP_FUNCTION(radius_put_vendor_string);
PHP_FUNCTION(radius_put_vendor_int);
PHP_FUNCTION(radius_put_vendor_attr);
PHP_FUNCTION(radius_put_vendor_addr);
PHP_FUNCTION(radius_send_request);
PHP_FUNCTION(radius_get_attr);
PHP_FUNCTION(radius_get_vendor_attr);
PHP_FUNCTION(radius_cvt_addr);
PHP_FUNCTION(radius_cvt_int);
PHP_FUNCTION(radius_cvt_string);
PHP_FUNCTION(radius_request_authenticator);
PHP_FUNCTION(radius_server_secret);
PHP_FUNCTION(radius_demangle);
PHP_FUNCTION(radius_demangle_mppe_key);
#ifdef ZTS
#define RADIUS_G(v) TSRMG(radius_globals_id, zend_radius_globals *, v)
#else
#define RADIUS_G(v) (radius_globals.v)
#endif
#endif /* PHP_RADIUS_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* indent-tabs-mode: t
* End:
*/
This diff is collapsed.
# Service-type Server Shared-secret Timeout Retries
#auth|acct host[:port] secret 3 3
# A simple entry using all the defaults:
#acct radius1.domain.com OurLittleSecret
# A server still using the obsolete RADIUS port, with increased
# timeout and maximum tries:
#auth auth.domain.com:1645 "I can't see you" 5 4
# A server specified by its IP address:
#auth 192.168.27.81 $X*#..38947ax-+=
\ No newline at end of file
# Microsoft Developer Studio Project File - Name="radius" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=radius - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "radius.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "radius.mak" CFG="radius - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "radius - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "radius - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "radius - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "radius___Win32_Debug_TS"
# PROP BASE Intermediate_Dir "radius___Win32_Debug_TS"
# PROP BASE Ignore_Export_Lib 0
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "ZEND_WIN32" /D "_MBCS" /D "_USRDLL" /D "RADIUS_EXPORTS" /D HAVE_SOCKETS=1 /D ZEND_DEBUG=0 /D "PHP_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\..\..\php4" /I "..\..\..\php4\main" /I "..\..\..\php4\Zend" /I "..\..\..\php4\TSRM" /I "..\..\..\php4\win32" /I "..\..\..\\bindlib_w32" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_SOCKETS" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_RADIUS=1 /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
# ADD RSC /l 0xc07 /d "_DEBUG"
BSC32=bscmake.exe