summaryrefslogtreecommitdiffstats
path: root/pki/base/util/src/com/netscape/cmsutil/radius
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /pki/base/util/src/com/netscape/cmsutil/radius
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'pki/base/util/src/com/netscape/cmsutil/radius')
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java27
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java27
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java27
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java25
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java97
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java154
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java56
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java24
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java38
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java55
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java43
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java51
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java49
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java54
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java39
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java39
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java39
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java49
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java56
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java54
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java35
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java52
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java52
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java58
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java52
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java41
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java52
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java48
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java53
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/Packet.java70
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java39
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java51
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java230
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java39
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java40
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java44
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java32
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java47
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java61
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java48
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java45
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java55
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java39
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java73
-rw-r--r--pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java52
59 files changed, 0 insertions, 2971 deletions
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java
deleted file mode 100644
index 4824c885f..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessAccept.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class AccessAccept extends ServerPacket {
- public AccessAccept(byte data[]) throws IOException {
- super(data);
- }
-
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java
deleted file mode 100644
index c06f809b1..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessChallenge.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class AccessChallenge extends ServerPacket {
- public AccessChallenge(byte data[]) throws IOException {
- super(data);
- }
-
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java
deleted file mode 100644
index 5f32ef349..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessReject.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class AccessReject extends ServerPacket {
- public AccessReject(byte data[]) throws IOException {
- super(data);
- }
-
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java b/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java
deleted file mode 100644
index 7856b0cc8..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AccessRequest.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-public class AccessRequest extends NASPacket {
- public AccessRequest(short id, Authenticator auth) {
- super(ACCESS_REQUEST, id, auth);
- }
-
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java
deleted file mode 100644
index 5e79816e4..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/Attribute.java
+++ /dev/null
@@ -1,97 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-public abstract class Attribute {
- public static final int USER_NAME = 1;
- public static final int USER_PASSWORD = 2;
- public static final int CHAP_PASSWORD = 3;
- public static final int NAS_IP_ADDRESS = 4;
- public static final int NAS_PORT = 5;
- public static final int SERVICE_TYPE = 6;
- public static final int FRAMED_PROTOCOL = 7;
- public static final int FRAMED_IP_ADDRESS = 8;
- public static final int FRAMED_IP_NETMASK = 9;
- public static final int FRAMED_ROUTING = 10;
- public static final int FILTER_ID = 11;
- public static final int FRAMED_MTU = 12;
- public static final int FRAMED_COMPRESSION = 13;
- public static final int LOGIN_IP_HOST = 14;
- public static final int LOGIN_SERVICE = 15;
- public static final int LOGIN_TCP_PORT = 16;
- // 17 HAS NOT BEEN ASSIGNED
- public static final int REPLY_MESSAGE = 18;
- public static final int CALLBACK_NUMBER = 19;
- public static final int CALLBACK_ID = 20;
- // 21 HAS NOT BEEN ASSIGNED
- public static final int FRAMED_ROUTE = 22;
- public static final int FRAMED_IPX_NETWORK = 23;
- public static final int STATE = 24;
- public static final int NAS_CLASS = 25;
- public static final int VENDOR_SPECIFIC = 26;
- public static final int SESSION_TIMEOUT = 27;
- public static final int IDLE_TIMEOUT = 28;
- public static final int TERMINATION_ACTION = 29;
- public static final int CALLER_STATION_ID = 30;
- public static final int CALLING_STATION_ID = 31;
- public static final int NAS_IDENTIFIER = 32;
- public static final int PROXY_STATE = 33;
- public static final int LOGIN_LAT_SERVICE = 34;
- public static final int LOGIN_LAT_NODE = 35;
- public static final int LOGIN_LAT_GROUP = 36;
- public static final int FRAMED_APPLETALK_LINK = 37;
- public static final int FRAMED_APPLETALK_NETWORK = 38;
- public static final int FRAMED_APPLETALK_ZONE = 39;
- // 40-59 HAS NOT BEEN ASSIGNED
- public static final int CHAP_CHALLENGE = 60;
- public static final int NAS_PORT_TYPE = 61;
- public static final int PORT_LIMIT = 62;
- public static final int LOGIN_LAT_PORT = 63;
-
- protected int _t = 0;
-
- public Attribute() {
- }
-
- public Attribute(int t) {
- _t = t;
- }
-
- public int getType() {
- return _t;
- }
-
- public abstract byte[] getValue()
- throws IOException;
-
- public byte[] getData()
- throws IOException {
- ByteArrayOutputStream attrOS = new ByteArrayOutputStream();
-
- attrOS.write(_t); // type
- byte value[] = getValue();
-
- attrOS.write(value.length + 2); // length
- attrOS.write(value);
-
- return attrOS.toByteArray();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java
deleted file mode 100644
index 021c06720..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeFactory.java
+++ /dev/null
@@ -1,154 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class AttributeFactory {
- public static Attribute createAttribute(byte data[])
- throws IOException {
- switch (data[0] & 0xFF) {
- case Attribute.USER_NAME: // 1
- return new UserNameAttribute(data);
-
- case Attribute.USER_PASSWORD: // 2
- return new UserPasswordAttribute(data);
-
- case Attribute.NAS_IP_ADDRESS: // 4
- return new NASIPAddressAttribute(data);
-
- case Attribute.NAS_PORT: // 5
- return new NASPortAttribute(data);
-
- case Attribute.CHAP_PASSWORD: // 3
- return new CHAPPasswordAttribute(data);
-
- case Attribute.SERVICE_TYPE: // 6
- return new ServiceTypeAttribute(data);
-
- case Attribute.FRAMED_PROTOCOL: // 7
- return new FramedProtocolAttribute(data);
-
- case Attribute.FRAMED_IP_ADDRESS: // 8
- return new FramedIPAddressAttribute(data);
-
- case Attribute.FRAMED_IP_NETMASK: // 9
- return new FramedIPNetmaskAttribute(data);
-
- case Attribute.FRAMED_ROUTING: // 10
- return new FramedRoutingAttribute(data);
-
- case Attribute.FILTER_ID: // 11
- return new FilterIdAttribute(data);
-
- case Attribute.FRAMED_MTU: // 12
- return new FramedMTUAttribute(data);
-
- case Attribute.FRAMED_COMPRESSION: // 13
- return new FramedCompressionAttribute(data);
-
- case Attribute.LOGIN_IP_HOST: // 14
- return new LoginIPHostAttribute(data);
-
- case Attribute.LOGIN_SERVICE: // 15
- return new LoginServiceAttribute(data);
-
- case Attribute.LOGIN_TCP_PORT: // 16
- return new LoginTCPPortAttribute(data);
-
- case Attribute.REPLY_MESSAGE: // 18
- return new ReplyMessageAttribute(data);
-
- case Attribute.CALLBACK_NUMBER: // 19
- return new CallbackNumberAttribute(data);
-
- case Attribute.CALLBACK_ID: // 20
- return new CallbackIdAttribute(data);
-
- case Attribute.FRAMED_ROUTE: // 22
- return new FramedRouteAttribute(data);
-
- case Attribute.FRAMED_IPX_NETWORK: // 23
- return new FramedIPXNetworkAttribute(data);
-
- case Attribute.STATE: // 24
- return new StateAttribute(data);
-
- case Attribute.NAS_CLASS: // 25
- return new NASClassAttribute(data);
-
- case Attribute.VENDOR_SPECIFIC: // 26
- return new VendorSpecificAttribute(data);
-
- case Attribute.SESSION_TIMEOUT: // 27
- return new SessionTimeoutAttribute(data);
-
- case Attribute.IDLE_TIMEOUT: // 28
- return new IdleTimeoutAttribute(data);
-
- case Attribute.TERMINATION_ACTION: // 29
- return new TerminationActionAttribute(data);
-
- case Attribute.CALLER_STATION_ID: // 30
- return new CallerStationIdAttribute(data);
-
- case Attribute.CALLING_STATION_ID: // 31
- return new CallingStationIdAttribute(data);
-
- case Attribute.NAS_IDENTIFIER: // 32
- return new NASIdentifierAttribute(data);
-
- case Attribute.PROXY_STATE: // 33
- return new ProxyStateAttribute(data);
-
- case Attribute.LOGIN_LAT_SERVICE: // 34
- return new LoginLATServiceAttribute(data);
-
- case Attribute.LOGIN_LAT_NODE: // 35
- return new LoginLATNodeAttribute(data);
-
- case Attribute.LOGIN_LAT_GROUP: // 36
- return new LoginLATGroupAttribute(data);
-
- case Attribute.FRAMED_APPLETALK_LINK: // 37
- return new FramedAppleTalkLinkAttribute(data);
-
- case Attribute.FRAMED_APPLETALK_NETWORK: // 38
- return new FramedAppleTalkNetworkAttribute(data);
-
- case Attribute.FRAMED_APPLETALK_ZONE: // 39
- return new FramedAppleTalkZoneAttribute(data);
-
- case Attribute.CHAP_CHALLENGE: // 60
- return new CHAPChallengeAttribute(data);
-
- case Attribute.NAS_PORT_TYPE: // 61
- return new NASPortTypeAttribute(data);
-
- case Attribute.PORT_LIMIT: // 62
- return new PortLimitAttribute(data);
-
- case Attribute.LOGIN_LAT_PORT: // 63
- return new LoginLATPortAttribute(data);
-
- default:
- return new GenericAttribute(data);
- // throw new IOException("Unknown attribute " + (data[0] & 0xFF));
- }
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java b/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
deleted file mode 100644
index d6974d371..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/AttributeSet.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.util.Enumeration;
-import java.util.Vector;
-
-public class AttributeSet {
- private Vector<Attribute> _attrs = new Vector<Attribute>();
-
- public AttributeSet() {
- }
-
- public void addAttribute(Attribute attr) {
- _attrs.addElement(attr);
- }
-
- public int size() {
- return _attrs.size();
- }
-
- public Enumeration<Attribute> getAttributes() {
- return _attrs.elements();
- }
-
- public Attribute getAttributeByType(int type) {
- int l = _attrs.size();
-
- for (int i = 0; i < l; i++) {
- Attribute attr = getAttributeAt(i);
-
- if (attr.getType() == type)
- return attr;
- }
- return null;
- }
-
- public Attribute getAttributeAt(int pos) {
- return _attrs.elementAt(pos);
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java b/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java
deleted file mode 100644
index 008af489a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/Authenticator.java
+++ /dev/null
@@ -1,24 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public abstract class Authenticator {
- public abstract byte[] getData() throws IOException;
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java
deleted file mode 100644
index cd715a031..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPChallengeAttribute.java
+++ /dev/null
@@ -1,38 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class CHAPChallengeAttribute extends Attribute {
- private String _str = null;
-
- public CHAPChallengeAttribute(byte value[]) {
- super();
- _t = CHAP_CHALLENGE;
- _str = new String(value, 2, value.length - 2);
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java
deleted file mode 100644
index 3f0ef1793..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CHAPPasswordAttribute.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class CHAPPasswordAttribute extends Attribute {
- private byte _value[] = null;
- private int _ident = 0;
- private String _str = null;
-
- public CHAPPasswordAttribute(String s) {
- _str = s;
- }
-
- public CHAPPasswordAttribute(byte value[]) {
- super();
- _t = CHAP_PASSWORD;
- _ident = value[2];
- _str = new String(value, 2, 16);
- _value = value;
- }
-
- public int getIdent() {
- return _ident;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- byte val[] = new byte[1 + _str.length()];
- byte s[] = _str.getBytes();
-
- val[0] = (byte) _ident;
- System.arraycopy(s, 0, val, 1, s.length);
- return val;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java
deleted file mode 100644
index 5fd806003..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackIdAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class CallbackIdAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public CallbackIdAttribute(byte value[]) {
- super();
- _t = CALLBACK_ID;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java
deleted file mode 100644
index d6e45cecd..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallbackNumberAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class CallbackNumberAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public CallbackNumberAttribute(byte value[]) {
- super();
- _t = CALLBACK_NUMBER;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java
deleted file mode 100644
index 3b5eec804..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallerStationIdAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class CallerStationIdAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public CallerStationIdAttribute(byte value[]) {
- super();
- _t = CALLER_STATION_ID;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java
deleted file mode 100644
index 9a57f8089..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/CallingStationIdAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class CallingStationIdAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public CallingStationIdAttribute(byte value[]) {
- super();
- _t = CALLING_STATION_ID;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java b/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java
deleted file mode 100644
index 972f7f084..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ChallengeException.java
+++ /dev/null
@@ -1,43 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-public class ChallengeException extends Exception {
- /**
- *
- */
- private static final long serialVersionUID = -3496050461777520369L;
- private AccessChallenge _res = null;
-
- public ChallengeException(AccessChallenge res) {
- _res = res;
- }
-
- public AttributeSet getAttributeSet() {
- return _res.getAttributeSet();
- }
-
- public String getState() {
- return ((StateAttribute) (_res.getAttributeSet().getAttributeByType(Attribute.STATE))).getString();
- }
-
- public String getReplyMessage() {
- return ((ReplyMessageAttribute) (_res.getAttributeSet().getAttributeByType(Attribute.REPLY_MESSAGE)))
- .getString();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java
deleted file mode 100644
index 879d7d5c7..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FilterIdAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FilterIdAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public FilterIdAttribute(byte value[]) {
- super();
- _t = CHAP_PASSWORD;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java
deleted file mode 100644
index 05273780f..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkLinkAttribute.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedAppleTalkLinkAttribute extends Attribute {
- public static int UN_NUMBERED = 0;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public FramedAppleTalkLinkAttribute(byte value[]) {
- super();
- _t = FRAMED_APPLETALK_LINK;
- _value = value;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java
deleted file mode 100644
index cea0d936a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkNetworkAttribute.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedAppleTalkNetworkAttribute extends Attribute {
- private byte _value[] = null;
- private int _type = 0;
-
- public FramedAppleTalkNetworkAttribute(byte value[]) {
- super();
- _t = FRAMED_APPLETALK_NETWORK;
- _value = value;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java
deleted file mode 100644
index 54ee47c45..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedAppleTalkZoneAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedAppleTalkZoneAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public FramedAppleTalkZoneAttribute(byte value[]) {
- super();
- _t = FRAMED_APPLETALK_ZONE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java
deleted file mode 100644
index b57c030b5..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedCompressionAttribute.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedCompressionAttribute extends Attribute {
- public static final int NONE = 1;
- public static final int VJ_TCP_IP_HEADER = 2;
- public static final int IPX_HEADER = 2;
- public static final int STAC_LZS = 3;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public FramedCompressionAttribute(byte value[]) {
- super();
- _t = FRAMED_COMPRESSION;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- _value = value;
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java
deleted file mode 100644
index 2f66ee8c2..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPAddressAttribute.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedIPAddressAttribute extends Attribute {
- private byte _value[] = null;
- private byte _addr[] = new byte[4];
-
- public FramedIPAddressAttribute(byte value[]) {
- super();
- _t = FRAMED_IP_ADDRESS;
- _addr[0] = value[2];
- _addr[1] = value[3];
- _addr[2] = value[4];
- _addr[3] = value[5];
- _value = value;
- }
-
- public byte[] getValue() throws IOException {
- return _addr;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java
deleted file mode 100644
index f8e1980c7..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPNetmaskAttribute.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedIPNetmaskAttribute extends Attribute {
- private byte _value[] = null;
- private byte _mask[] = new byte[4];
-
- public FramedIPNetmaskAttribute(byte value[]) {
- super();
- _t = FRAMED_IP_NETMASK;
- _mask[0] = value[2];
- _mask[1] = value[3];
- _mask[2] = value[4];
- _mask[3] = value[5];
- _value = value;
- }
-
- public byte[] getValue() throws IOException {
- return _mask;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java
deleted file mode 100644
index 92f47eec1..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedIPXNetworkAttribute.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedIPXNetworkAttribute extends Attribute {
- private byte _value[] = null;
- private byte _net[] = new byte[4];
-
- public FramedIPXNetworkAttribute(byte value[]) {
- super();
- _t = FRAMED_IPX_NETWORK;
- _net[0] = value[2];
- _net[1] = value[3];
- _net[2] = value[4];
- _net[3] = value[5];
- _value = value;
- }
-
- public byte[] getValue() throws IOException {
- return _net;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java
deleted file mode 100644
index 5cd9551a2..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedMTUAttribute.java
+++ /dev/null
@@ -1,49 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedMTUAttribute extends Attribute {
- private byte _value[] = null;
- private int _type = 0;
-
- public FramedMTUAttribute(byte value[]) {
- super();
- _t = FRAMED_IP_ADDRESS;
- _value = value;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java
deleted file mode 100644
index 5af219b9a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedProtocolAttribute.java
+++ /dev/null
@@ -1,56 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedProtocolAttribute extends Attribute {
- public static final int PPP = 1;
- public static final int SLIP = 2;
- public static final int ARAP = 3;
- public static final int GANDALF = 4;
- public static final int XYLOGICS = 5;
- public static final int X_75 = 6;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public FramedProtocolAttribute(byte value[]) {
- super();
- _t = SERVICE_TYPE;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- _value = value;
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java
deleted file mode 100644
index 9b123fe2a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRouteAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedRouteAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public FramedRouteAttribute(byte value[]) {
- super();
- _t = FRAMED_ROUTE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java
deleted file mode 100644
index 14d2b0cc8..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/FramedRoutingAttribute.java
+++ /dev/null
@@ -1,54 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class FramedRoutingAttribute extends Attribute {
- public static final int NONE = 0;
- public static final int SEND_ROUTING_PACKETS = 1;
- public static final int LISTEN_FOR_ROUTING_PACKETS = 2;
- public static final int SEND_AND_LISTEN = 3;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public FramedRoutingAttribute(byte value[]) {
- super();
- _t = FRAMED_ROUTING;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- _value = value;
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java
deleted file mode 100644
index ac1798ae3..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/GenericAttribute.java
+++ /dev/null
@@ -1,35 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class GenericAttribute extends Attribute {
- private byte _value[] = null;
-
- public GenericAttribute(byte value[]) {
- super();
- _t = value[0];
- _value = new byte[value.length - 2];
- System.arraycopy(value, 2, _value, 0, _value.length);
- }
-
- public byte[] getValue() throws IOException {
- return _value;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java
deleted file mode 100644
index 44b0c5087..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/IdleTimeoutAttribute.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class IdleTimeoutAttribute extends Attribute {
- private int _timeout = 0;
-
- public IdleTimeoutAttribute(byte value[]) {
- super();
- _t = IDLE_TIMEOUT;
- _timeout = value[5] & 0xFF;
- _timeout |= ((value[4] << 8) & 0xFF00);
- _timeout |= ((value[3] << 16) & 0xFF0000);
- _timeout |= ((value[2] << 24) & 0xFF000000);
- }
-
- public IdleTimeoutAttribute(int timeout) {
- super(IDLE_TIMEOUT);
- _timeout = timeout;
- }
-
- public int getTimeout() {
- return _timeout;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_timeout >>> 24) & 0xFF);
- p[1] = (byte) ((_timeout >>> 16) & 0xFF);
- p[2] = (byte) ((_timeout >>> 8) & 0xFF);
- p[3] = (byte) (_timeout & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java
deleted file mode 100644
index 0d1c0565a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginIPHostAttribute.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginIPHostAttribute extends Attribute {
- public static final int NAS_ALLOW_SELECT = 0xFFFFFFFF;
- public static final int NAS_SELECT = 0;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public LoginIPHostAttribute(byte value[]) {
- super();
- _t = LOGIN_IP_HOST;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- _value = value;
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java
deleted file mode 100644
index 4cee6bc3a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATGroupAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginLATGroupAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public LoginLATGroupAttribute(byte value[]) {
- super();
- _t = LOGIN_LAT_GROUP;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java
deleted file mode 100644
index 2c2d3411e..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATNodeAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginLATNodeAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public LoginLATNodeAttribute(byte value[]) {
- super();
- _t = LOGIN_LAT_NODE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java
deleted file mode 100644
index 330161ec8..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATPortAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginLATPortAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public LoginLATPortAttribute(byte value[]) {
- super();
- _t = PROXY_STATE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java
deleted file mode 100644
index 158630d27..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginLATServiceAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginLATServiceAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public LoginLATServiceAttribute(byte value[]) {
- super();
- _t = LOGIN_LAT_SERVICE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java
deleted file mode 100644
index 73f49d39f..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginServiceAttribute.java
+++ /dev/null
@@ -1,58 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginServiceAttribute extends Attribute {
- public static final int TELNET = 0;
- public static final int RLOGIN = 1;
- public static final int TCP_CLEAR = 2;
- public static final int PORTMASTER = 3;
- public static final int LAT = 4;
- public static final int X25_PAD = 5;
- public static final int X25_T3POS = 6;
- public static final int TCP_CLEAR_QUIET = 8;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public LoginServiceAttribute(byte value[]) {
- super();
- _t = LOGIN_SERVICE;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- _value = value;
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java
deleted file mode 100644
index 6b44f50c6..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/LoginTCPPortAttribute.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class LoginTCPPortAttribute extends Attribute {
- private int _port = 0;
-
- public LoginTCPPortAttribute(byte value[]) {
- super();
- _t = LOGIN_TCP_PORT;
- _port = value[5] & 0xFF;
- _port |= ((value[4] << 8) & 0xFF00);
- _port |= ((value[3] << 16) & 0xFF0000);
- _port |= ((value[2] << 24) & 0xFF000000);
- }
-
- public LoginTCPPortAttribute(int port) {
- super(LOGIN_TCP_PORT);
- _port = port;
- }
-
- public int getPort() {
- return _port;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_port >>> 24) & 0xFF);
- p[1] = (byte) ((_port >>> 16) & 0xFF);
- p[2] = (byte) ((_port >>> 8) & 0xFF);
- p[3] = (byte) (_port & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java
deleted file mode 100644
index 57b983028..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASClassAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class NASClassAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public NASClassAttribute(byte value[]) {
- super();
- _t = NAS_CLASS;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java
deleted file mode 100644
index d4022b3dd..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASIPAddressAttribute.java
+++ /dev/null
@@ -1,41 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-import java.net.InetAddress;
-
-public class NASIPAddressAttribute extends Attribute {
- private InetAddress _ip = null;
- private byte _value[] = null;
-
- public NASIPAddressAttribute(byte value[]) {
- super();
- _t = NAS_IP_ADDRESS;
- _value = value;
- }
-
- public NASIPAddressAttribute(InetAddress ip) {
- super(NAS_IP_ADDRESS);
- _ip = ip;
- }
-
- public byte[] getValue() throws IOException {
- return _ip.getAddress();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java
deleted file mode 100644
index 0a3a62cd8..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASIdentifierAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class NASIdentifierAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public NASIdentifierAttribute(byte value[]) {
- super();
- _t = NAS_IDENTIFIER;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
deleted file mode 100644
index 70d143989..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASPacket.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-
-public abstract class NASPacket extends Packet {
- public NASPacket(int c, short id, Authenticator auth) {
- super(c, id, auth);
- }
-
- public byte[] getData() throws IOException {
- // prepare the attributes first
- ByteArrayOutputStream attrsOS = new ByteArrayOutputStream();
-
- for (int i = 0; i < _attrs.size(); i++) {
- Attribute attr = (Attribute) getAttributeAt(i);
-
- attrsOS.write(attr.getData());
- }
- byte attrsData[] = attrsOS.toByteArray();
-
- ByteArrayOutputStream dataOS = new ByteArrayOutputStream();
-
- dataOS.write(_c); // code
- dataOS.write(_id); // identifier
- int len = attrsData.length + 20;
-
- dataOS.write((len >>> 8) & 0xFF);
- dataOS.write(len & 0xFF);
- dataOS.write(_auth.getData());
- dataOS.write(attrsData);
-
- return dataOS.toByteArray();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java
deleted file mode 100644
index 0f7b31e75..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortAttribute.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class NASPortAttribute extends Attribute {
- private int _port = 0;
-
- public NASPortAttribute(byte value[]) {
- super();
- _t = NAS_PORT;
- _port = value[5] & 0xFF;
- _port |= ((value[4] << 8) & 0xFF00);
- _port |= ((value[3] << 16) & 0xFF0000);
- _port |= ((value[2] << 24) & 0xFF000000);
- }
-
- public NASPortAttribute(int port) {
- super(NAS_PORT);
- _port = port;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_port >>> 24) & 0xFF);
- p[1] = (byte) ((_port >>> 16) & 0xFF);
- p[2] = (byte) ((_port >>> 8) & 0xFF);
- p[3] = (byte) (_port & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java
deleted file mode 100644
index 84ccc3ae1..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/NASPortTypeAttribute.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class NASPortTypeAttribute extends Attribute {
- public static final int ASYNC = 0;
- public static final int SYNC = 1;
- public static final int ISDN_SYNC = 2;
- public static final int ISDN_ASYNC_V120 = 3;
- public static final int ISDN_ASYNC_V110 = 4;
- public static final int VIRTUAL = 5;
- public static final int PIAFS = 6;
- public static final int HDLC = 7;
- public static final int X_25 = 8;
- public static final int X_75 = 9;
- public static final int G3_FAX = 10;
- public static final int SDSL = 11;
- public static final int ADSL_CAP = 12;
- public static final int ADSL_DMT = 13;
- public static final int IDSL = 14;
- public static final int ETHERNET = 15;
- public static final int XDSL = 16;
- public static final int CABLE = 17;
-
- private byte _value[] = null;
-
- public NASPortTypeAttribute(byte value[]) {
- super();
- _t = NAS_PORT_TYPE;
- _value = value;
- }
-
- public byte[] getValue() throws IOException {
- return _value;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java b/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java
deleted file mode 100644
index 4fad0ba79..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/Packet.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-public abstract class Packet {
- public static final int ACCESS_REQUEST = 1;
- public static final int ACCESS_ACCEPT = 2;
- public static final int ACCESS_REJECT = 3;
- // public static final int ACCOUNTING_REQUEST = 4;
- // public static final int ACCOUNTING_RESPONSE = 5;
- public static final int ACCESS_CHALLENGE = 11;
- public static final int RESERVED = 255;
-
- protected int _c = 0;
- protected short _id = 0;
- protected Authenticator _auth = null;
- protected AttributeSet _attrs = new AttributeSet();
-
- public Packet() {
- }
-
- public Packet(int c, short id, Authenticator auth) {
- _c = c;
- _id = id;
- _auth = auth;
- }
-
- public int getCode() {
- return _c;
- }
-
- public short getIdentifier() {
- return _id;
- }
-
- public Authenticator getAuthenticator() {
- return _auth;
- }
-
- public void addAttribute(Attribute attr) {
- _attrs.addAttribute(attr);
- }
-
- public AttributeSet getAttributeSet() {
- return _attrs;
- }
-
- public Attribute getAttributeAt(int pos) {
- return _attrs.getAttributeAt(pos);
- }
-
- public String toString() {
- return "Packet [code=" + _c + ",id=" + (_id & 0xFF) + "]";
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java b/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java
deleted file mode 100644
index 8d2e20e74..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/PacketFactory.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class PacketFactory {
- public static ServerPacket createServerPacket(byte data[])
- throws IOException {
- switch (data[0] & 0xFF) {
- case Packet.ACCESS_ACCEPT:
- return new AccessAccept(data);
-
- case Packet.ACCESS_REJECT:
- return new AccessReject(data);
-
- case Packet.ACCESS_CHALLENGE:
- return new AccessChallenge(data);
-
- default:
- throw new IOException("Unknown server packet " + (data[0] & 0xFF));
- }
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java
deleted file mode 100644
index 7903bb1fd..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/PortLimitAttribute.java
+++ /dev/null
@@ -1,51 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class PortLimitAttribute extends Attribute {
- private int _port = 0;
-
- private byte _value[] = null;
-
- public PortLimitAttribute(byte value[]) {
- super();
- _t = FRAMED_IP_ADDRESS;
- _value = value;
- _port = value[5] & 0xFF;
- _port |= ((value[4] << 8) & 0xFF00);
- _port |= ((value[3] << 16) & 0xFF0000);
- _port |= ((value[2] << 24) & 0xFF000000);
-
- }
-
- public int getPort() {
- return _port;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_port >>> 24) & 0xFF);
- p[1] = (byte) ((_port >>> 16) & 0xFF);
- p[2] = (byte) ((_port >>> 8) & 0xFF);
- p[3] = (byte) (_port & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java
deleted file mode 100644
index 83831b652..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ProxyStateAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class ProxyStateAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public ProxyStateAttribute(byte value[]) {
- super();
- _t = PROXY_STATE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java b/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java
deleted file mode 100644
index b22807a5d..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/RadiusConn.java
+++ /dev/null
@@ -1,230 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-import java.io.InterruptedIOException;
-import java.net.DatagramPacket;
-import java.net.DatagramSocket;
-import java.net.InetAddress;
-import java.net.SocketException;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-import java.util.Properties;
-
-/**
- * This class implements RFC2865 - Remote Authentication Dial In
- * User Service (RADIUS), June 2000.
- */
-public class RadiusConn {
- public static int MAX_RETRIES = 10;
- public static int OFFICAL_PORT = 1812;
- public static int DEFAULT_PORT = 1645;
- public static int DEFAULT_TIMEOUT = 5;
-
- public static String OPTION_DEBUG = "OPTION_DEBUG";
-
- private Properties _options = null;
- private boolean _traceOn = true;
- private String _host[] = new String[2];
- private int _port[] = new int[2];
- private int _selected = 0;
- private String _secret = null;
- private DatagramSocket _socket = null;
- private short _id = (short) System.currentTimeMillis();
- private int _maxRetries = MAX_RETRIES;
- private SecureRandom _rand = null;
-
- public RadiusConn(String host1, String host2, int port, String secret,
- int timeout) throws SocketException {
- this(host1, port, host2, port, secret, timeout, null, null);
- }
-
- public RadiusConn(String host, int port, String secret, byte seed[],
- Properties options)
- throws SocketException {
- this(host, port, host, port, secret, DEFAULT_TIMEOUT, seed, options);
- }
-
- public RadiusConn(String host1, int port1, String host2, int port2,
- String secret, int timeout, byte seed[], Properties options)
- throws SocketException {
- _host[0] = host1;
- _port[0] = port1;
- _host[1] = host2;
- _port[1] = port2;
- _selected = 0;
- _secret = secret;
- _options = options;
- _socket = new DatagramSocket();
- _socket.setSoTimeout(timeout * 1000);
- if (seed == null) {
- _rand = new SecureRandom();
- } else {
- _rand = new SecureRandom(seed);
- }
- }
-
- public void disconnect() throws IOException {
- _socket.disconnect();
- }
-
- public void authenticate(String name, String password)
- throws IOException, NoSuchAlgorithmException,
- RejectException, ChallengeException {
- int retries = 0;
- Packet res = null;
-
- do {
- AccessRequest req = createAccessRequest();
-
- req.addAttribute(new UserNameAttribute(name));
- req.addAttribute(new UserPasswordAttribute(req.getAuthenticator(),
- _secret, password));
- req.addAttribute(new NASIPAddressAttribute(InetAddress.getLocalHost()));
- req.addAttribute(new NASPortAttribute(_socket.getLocalPort()));
-
- send(req, _host[_selected], _port[_selected]);
- try {
- retries++;
- res = receive();
- if (res instanceof AccessReject) {
- throw new RejectException((AccessReject) res);
- } else if (res instanceof AccessChallenge) {
- throw new ChallengeException((AccessChallenge) res);
- }
- } catch (InterruptedIOException e) {
- if (retries >= _maxRetries) {
- // switch server if maxRetries reaches limit
- retries = 0;
- if (_selected == 0) {
- _selected = 1;
- } else {
- _selected = 0;
- }
- // throw e;
- }
-
- }
- } while (res == null);
- }
-
- public void replyChallenge(String password, ChallengeException ce)
- throws IOException, NoSuchAlgorithmException,
- RejectException, ChallengeException {
- replyChallenge(null, password, ce);
- }
-
- public void replyChallenge(String name, String password,
- ChallengeException ce)
- throws IOException, NoSuchAlgorithmException,
- RejectException, ChallengeException {
- StateAttribute state = (StateAttribute)
- ce.getAttributeSet().getAttributeByType(Attribute.STATE);
-
- if (state == null)
- throw new IOException("State not found in challenge");
- AccessRequest req = createAccessRequest();
-
- req.addAttribute(state); // needed in challenge
- if (name != null) {
- req.addAttribute(new UserNameAttribute(name));
- }
- req.addAttribute(new UserPasswordAttribute(req.getAuthenticator(),
- _secret, password));
- req.addAttribute(new NASIPAddressAttribute(InetAddress.getLocalHost()));
- req.addAttribute(new NASPortAttribute(_socket.getLocalPort()));
-
- send(req, _host[_selected], _port[_selected]);
- Packet res = receive();
-
- if (res instanceof AccessReject) {
- throw new RejectException((AccessReject) res);
- } else if (res instanceof AccessChallenge) {
- throw new ChallengeException((AccessChallenge) res);
- }
- }
-
- public void replyChallenge(String name, String password, String state)
- throws IOException, NoSuchAlgorithmException,
- RejectException, ChallengeException {
- if (state == null)
- throw new IOException("State not found in challenge");
- AccessRequest req = createAccessRequest();
-
- req.addAttribute(new StateAttribute(state)); // needed in challenge
- req.addAttribute(new UserNameAttribute(name));
- req.addAttribute(new UserPasswordAttribute(req.getAuthenticator(),
- _secret, password));
- req.addAttribute(new NASIPAddressAttribute(InetAddress.getLocalHost()));
- req.addAttribute(new NASPortAttribute(_socket.getLocalPort()));
-
- send(req, _host[_selected], _port[_selected]);
- Packet res = receive();
-
- if (res instanceof AccessReject) {
- throw new RejectException((AccessReject) res);
- } else if (res instanceof AccessChallenge) {
- throw new ChallengeException((AccessChallenge) res);
- }
- }
-
- private short getIdentifier() {
- return _id++;
- }
-
- private void send(NASPacket packet, String host, int port)
- throws IOException {
- DatagramPacket dp = new DatagramPacket(new byte[4096], 4096);
-
- dp.setPort(port);
- dp.setAddress(InetAddress.getByName(host));
- byte data[] = packet.getData();
-
- dp.setLength(data.length);
- dp.setData(data);
- _socket.send(dp);
- if (_traceOn)
- trace("Sent " + packet);
- }
-
- private ServerPacket receive()
- throws IOException {
- DatagramPacket dp = new DatagramPacket(new byte[4096], 4096);
-
- _socket.receive(dp);
- byte data[] = dp.getData();
- ServerPacket p = PacketFactory.createServerPacket(data);
-
- if (_traceOn)
- trace("Received " + p + " size=" + p.getAttributeSet().size());
- return p;
- }
-
- private AccessRequest createAccessRequest() throws NoSuchAlgorithmException {
- RequestAuthenticator ra = new RequestAuthenticator(_rand, _secret);
- AccessRequest req = new AccessRequest(getIdentifier(), ra);
-
- return req;
- }
-
- private void trace(String msg) {
- System.out.println("TRACE: " + msg);
- System.out.flush();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java b/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java
deleted file mode 100644
index f312ef2a4..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/RejectException.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-public class RejectException extends Exception {
- /**
- *
- */
- private static final long serialVersionUID = -6410697638175895003L;
- private AccessReject _res = null;
-
- public RejectException(AccessReject res) {
- _res = res;
- }
-
- public AttributeSet getAttributeSet() {
- return _res.getAttributeSet();
- }
-
- public String getReplyMessage() {
- return ((ReplyMessageAttribute) (_res.getAttributeSet().getAttributeByType(Attribute.REPLY_MESSAGE)))
- .getString();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java
deleted file mode 100644
index 5ec4ea052..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ReplyMessageAttribute.java
+++ /dev/null
@@ -1,40 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class ReplyMessageAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public ReplyMessageAttribute(byte value[]) {
- super();
- _t = REPLY_MESSAGE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java b/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java
deleted file mode 100644
index 5d82752dd..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/RequestAuthenticator.java
+++ /dev/null
@@ -1,44 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-import java.security.SecureRandom;
-
-public class RequestAuthenticator extends Authenticator {
- private byte _ra[] = null;
-
- public RequestAuthenticator(SecureRandom rand, String secret)
- throws NoSuchAlgorithmException {
- byte[] authenticator = new byte[16];
-
- rand.nextBytes(authenticator);
-
- MessageDigest md5 = MessageDigest.getInstance("MD5");
-
- md5.update(authenticator);
- md5.update(secret.getBytes());
- _ra = md5.digest();
- }
-
- public byte[] getData() throws IOException {
- return _ra;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java b/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java
deleted file mode 100644
index 3c3de33c4..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ResponseAuthenticator.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class ResponseAuthenticator extends Authenticator {
- private byte _data[] = null;
-
- public ResponseAuthenticator(byte data[]) {
- _data = data;
- }
-
- public byte[] getData() throws IOException {
- return _data;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java b/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java
deleted file mode 100644
index f7d7fa302..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ServerPacket.java
+++ /dev/null
@@ -1,47 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public abstract class ServerPacket extends Packet {
- public ServerPacket(byte data[]) throws IOException {
- super();
- _c = data[0];
- _id = data[1];
- int datalen = data[3] & 0xFF;
-
- datalen |= ((data[2] << 8) & 0xFF00);
- byte authData[] = new byte[16];
-
- System.arraycopy(data, 4, authData, 0, 16);
- _auth = new ResponseAuthenticator(authData);
-
- // building attributes
- int startp = 20;
-
- while (startp != datalen) {
- int attrLen = (data[startp + 1] & 0xFF);
- byte attrData[] = new byte[attrLen];
-
- System.arraycopy(data, startp, attrData, 0, attrData.length);
- addAttribute(AttributeFactory.createAttribute(attrData));
- startp += attrData.length;
- }
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java
deleted file mode 100644
index f31c74f9a..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/ServiceTypeAttribute.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class ServiceTypeAttribute extends Attribute {
- public static final int LOGIN = 1;
- public static final int FRAMED = 2;
- public static final int CALLBACK_LOGIN = 3;
- public static final int CALLBACK_FRAMED = 4;
- public static final int OUTBOUND = 5;
- public static final int ADMINSITRATIVE = 6;
- public static final int NAS_PROMPT = 7;
- public static final int AUTHENTICATE_ONLY = 8;
- public static final int CALLBACK_NAS_PROMPT = 9;
- public static final int CALL_CHECK = 10;
- public static final int CALLBACK_ADMINISTRATIVE = 11;
-
- private byte _value[] = null;
- private int _type = 0;
-
- public ServiceTypeAttribute(byte value[]) {
- super();
- _t = SERVICE_TYPE;
- _type = value[5] & 0xFF;
- _type |= ((value[4] << 8) & 0xFF00);
- _type |= ((value[3] << 16) & 0xFF0000);
- _type |= ((value[2] << 24) & 0xFF000000);
- _value = value;
- }
-
- public int getType() {
- return _type;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_type >>> 24) & 0xFF);
- p[1] = (byte) ((_type >>> 16) & 0xFF);
- p[2] = (byte) ((_type >>> 8) & 0xFF);
- p[3] = (byte) (_type & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java
deleted file mode 100644
index 2809aee4b..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/SessionTimeoutAttribute.java
+++ /dev/null
@@ -1,48 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class SessionTimeoutAttribute extends Attribute {
- private int _timeout = 0;
-
- public SessionTimeoutAttribute(byte value[]) {
- super();
- _t = SESSION_TIMEOUT;
- _timeout = value[5] & 0xFF;
- _timeout |= ((value[4] << 8) & 0xFF00);
- _timeout |= ((value[3] << 16) & 0xFF0000);
- _timeout |= ((value[2] << 24) & 0xFF000000);
- }
-
- public SessionTimeoutAttribute(int timeout) {
- super(SESSION_TIMEOUT);
- _timeout = timeout;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_timeout >>> 24) & 0xFF);
- p[1] = (byte) ((_timeout >>> 16) & 0xFF);
- p[2] = (byte) ((_timeout >>> 8) & 0xFF);
- p[3] = (byte) (_timeout & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java
deleted file mode 100644
index 027f95620..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/StateAttribute.java
+++ /dev/null
@@ -1,45 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class StateAttribute extends Attribute {
- private byte _value[] = null;
- private String _str = null;
-
- public StateAttribute(String str) {
- _t = STATE;
- _str = str;
- }
-
- public StateAttribute(byte value[]) {
- super();
- _t = STATE;
- _str = new String(value, 2, value.length - 2);
- _value = value;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- return _str.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java
deleted file mode 100644
index b47a70d8c..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/TerminationActionAttribute.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class TerminationActionAttribute extends Attribute {
- public static final int DEFAULT = 0;
- public static final int RADIUS_REQUEST = 1;
-
- private int _action = 0;
-
- public TerminationActionAttribute(byte value[]) {
- super();
- _t = TERMINATION_ACTION;
- _action = value[5] & 0xFF;
- _action |= ((value[4] << 8) & 0xFF00);
- _action |= ((value[3] << 16) & 0xFF0000);
- _action |= ((value[2] << 24) & 0xFF000000);
- }
-
- public TerminationActionAttribute(int action) {
- super(TERMINATION_ACTION);
- _action = action;
- }
-
- public int getAction() {
- return _action;
- }
-
- public byte[] getValue() throws IOException {
- byte[] p = new byte[4];
-
- p[0] = (byte) ((_action >>> 24) & 0xFF);
- p[1] = (byte) ((_action >>> 16) & 0xFF);
- p[2] = (byte) ((_action >>> 8) & 0xFF);
- p[3] = (byte) (_action & 0xFF);
- return p;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java
deleted file mode 100644
index af7ce6bbe..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/UserNameAttribute.java
+++ /dev/null
@@ -1,39 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class UserNameAttribute extends Attribute {
- private String _name = null;
-
- public UserNameAttribute(byte value[]) {
- super();
- _t = USER_NAME;
- _name = new String(value, 2, value.length - 2);
- }
-
- public UserNameAttribute(String name) {
- super(USER_NAME);
- _name = name;
- }
-
- public byte[] getValue() throws IOException {
- return _name.getBytes();
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java
deleted file mode 100644
index 31c27cdfd..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/UserPasswordAttribute.java
+++ /dev/null
@@ -1,73 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-import java.security.MessageDigest;
-import java.security.NoSuchAlgorithmException;
-
-public class UserPasswordAttribute extends Attribute {
- private Authenticator _ra = null;
- private String _secret = null;
- private String _password = null;
-
- public UserPasswordAttribute(byte value[]) {
- //
- }
-
- public UserPasswordAttribute(Authenticator ra, String secret, String password) {
- super(USER_PASSWORD);
- _ra = ra;
- _secret = secret;
- _password = password;
- }
-
- public byte[] getValue() throws IOException {
- MessageDigest md5 = null;
-
- try {
- md5 = MessageDigest.getInstance("MD5");
- } catch (NoSuchAlgorithmException e) {
- throw new IOException(e.getMessage());
- }
- md5.update(_secret.getBytes());
- md5.update(_ra.getData());
- byte sum[] = md5.digest();
-
- byte up[] = _password.getBytes();
- int oglen = (up.length / 16) + 1;
- byte ret[] = new byte[oglen * 16];
-
- for (int i = 0; i < ret.length; i++) {
- if ((i % 16) == 0) {
- md5.reset();
- md5.update(_secret.getBytes());
- }
- if (i < up.length) {
- ret[i] = (byte) (sum[i % 16] ^ up[i]);
- } else {
- ret[i] = (byte) (sum[i % 16] ^ 0);
- }
- md5.update(ret[i]);
- if ((i % 16) == 15) {
- sum = md5.digest();
- }
- }
- return ret;
- }
-}
diff --git a/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java b/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java
deleted file mode 100644
index 5f3d9f170..000000000
--- a/pki/base/util/src/com/netscape/cmsutil/radius/VendorSpecificAttribute.java
+++ /dev/null
@@ -1,52 +0,0 @@
-// --- BEGIN COPYRIGHT BLOCK ---
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; version 2 of the License.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License along
-// with this program; if not, write to the Free Software Foundation, Inc.,
-// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-//
-// (C) 2007 Red Hat, Inc.
-// All rights reserved.
-// --- END COPYRIGHT BLOCK ---
-package com.netscape.cmsutil.radius;
-
-import java.io.IOException;
-
-public class VendorSpecificAttribute extends Attribute {
- private byte _value[] = null;
- private String _id = null;
- private String _str = null;
-
- public VendorSpecificAttribute(byte value[]) {
- super();
- _t = VENDOR_SPECIFIC;
- _id = new String(value, 2, 4);
- _str = new String(value, 6, value.length - 6);
- _value = value;
- }
-
- public String getId() {
- return _id;
- }
-
- public String getString() {
- return _str;
- }
-
- public byte[] getValue() throws IOException {
- byte v[] = new byte[_id.length() + _str.length()];
- byte idData[] = _id.getBytes();
- byte strData[] = _str.getBytes();
-
- System.arraycopy(idData, 0, v, 0, _id.length());
- System.arraycopy(strData, 0, v, _id.length(), _str.length());
- return v;
- }
-}