net.sf.jradius.client.auth
Class EAPTLSAuthenticator

java.lang.Object
  extended by net.sf.jradius.client.auth.RadiusAuthenticator
      extended by net.sf.jradius.client.auth.EAPAuthenticator
          extended by net.sf.jradius.client.auth.EAPTLSAuthenticator
Direct Known Subclasses:
EAPTTLSAuthenticator

public class EAPTLSAuthenticator
extends EAPAuthenticator

EAP-TLS Authentication (and TLS Tunnel support).

Author:
David Bird

Field Summary
protected  int eapFragmentedOffset
           
protected  byte[] eapFragmentedReply
           
protected  int Finished
           
protected  int Handshaking
           
static java.lang.String NAME
           
protected  int None
           
protected static byte TLS_HAS_LENGTH
           
protected static byte TLS_MORE_FRAGMENTS
           
protected static byte TLS_START
           
 
Fields inherited from class net.sf.jradius.client.auth.EAPAuthenticator
EAP_CISCO_MSCHAPV2, EAP_FAILURE, EAP_GTC, EAP_HEADERLEN, EAP_IDENTITY, EAP_LEAP, EAP_MD5, EAP_MSCHAPV2, EAP_NAK, EAP_NOTIFICATION, EAP_OTP, EAP_PEAP, EAP_REQUEST, EAP_RESPONSE, EAP_SIM, EAP_SUCCESS, EAP_TLS, EAP_TLV, EAP_TTLS
 
Fields inherited from class net.sf.jradius.client.auth.RadiusAuthenticator
client, password, username
 
Constructor Summary
EAPTLSAuthenticator()
           
 
Method Summary
 byte[] doEAPType(byte id, byte[] data)
           
protected  void doTunnelAuthentication(byte id, byte[] in)
           
protected  byte[] getAppBuffer()
           
 java.lang.String getAuthName()
           
 java.lang.String getCaFile()
           
 java.lang.String getCaFileType()
           
 java.lang.String getCaPassword()
           
 java.lang.String getKeyFile()
           
 java.lang.String getKeyFileType()
           
 java.lang.String getKeyPassword()
           
protected  byte[] getPacketInputBuffer()
           
protected  byte[] getPacketOutputBuffer()
           
 java.lang.Boolean getTrustAll()
           
protected  void init()
          Initializs the SSL layer.
protected  byte[] nextFragment()
           
protected  void putAppBuffer(byte[] d)
           
protected  void putPacketBuffer(byte[] d)
           
 void setCaFile(java.lang.String caFile)
           
 void setCaFileType(java.lang.String caFileType)
           
 void setCaPassword(java.lang.String caPassword)
           
 void setKeyFile(java.lang.String keyFile)
           
 void setKeyFileType(java.lang.String keyFileType)
           
 void setKeyPassword(java.lang.String keyPassword)
           
 void setTrustAll(java.lang.Boolean trustAll)
           
 void setupRequest(RadiusClient c, RadiusPacket p)
           
protected  int tlsHandshake()
           
protected  byte[] tlsResponse(byte flags, byte[] data)
           
protected  void updatePacketBuffer(byte[] b)
           
 
Methods inherited from class net.sf.jradius.client.auth.EAPAuthenticator
doEAP, eapResponse, getEAPType, isStartWithIdentity, negotiateEAPType, processChallenge, processRequest, setEAPType, setStartWithIdentity
 
Methods inherited from class net.sf.jradius.client.auth.RadiusAuthenticator
getClient, getPassword, getUsername, setClient
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

None

protected int None

Handshaking

protected int Handshaking

Finished

protected int Finished

TLS_START

protected static final byte TLS_START
See Also:
Constant Field Values

TLS_MORE_FRAGMENTS

protected static final byte TLS_MORE_FRAGMENTS
See Also:
Constant Field Values

TLS_HAS_LENGTH

protected static final byte TLS_HAS_LENGTH
See Also:
Constant Field Values

eapFragmentedReply

protected byte[] eapFragmentedReply

eapFragmentedOffset

protected int eapFragmentedOffset
Constructor Detail

EAPTLSAuthenticator

public EAPTLSAuthenticator()
Method Detail

setupRequest

public void setupRequest(RadiusClient c,
                         RadiusPacket p)
                  throws RadiusException
Overrides:
setupRequest in class RadiusAuthenticator
Parameters:
c - The RadiusClient context being used
p - Setup the Authenticator with packet data
Throws:
RadiusException

init

protected void init()
             throws RadiusException
Initializs the SSL layer.

Throws:
RadiusException

getAuthName

public java.lang.String getAuthName()
Specified by:
getAuthName in class RadiusAuthenticator
Returns:
Returns the name(s) of the protocol(s) provided.
See Also:
RadiusAuthenticator.getAuthName()

tlsHandshake

protected int tlsHandshake()
                    throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException

updatePacketBuffer

protected void updatePacketBuffer(byte[] b)

putPacketBuffer

protected void putPacketBuffer(byte[] d)
                        throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException

getPacketInputBuffer

protected byte[] getPacketInputBuffer()

getPacketOutputBuffer

protected byte[] getPacketOutputBuffer()

putAppBuffer

protected void putAppBuffer(byte[] d)
                     throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException

getAppBuffer

protected byte[] getAppBuffer()
                       throws javax.net.ssl.SSLException
Throws:
javax.net.ssl.SSLException

doEAPType

public byte[] doEAPType(byte id,
                        byte[] data)
                 throws RadiusException
Specified by:
doEAPType in class EAPAuthenticator
Parameters:
id - The EAP ID
data - The EAP Data
Returns:
Returns the EAP-Type specific EAP-Message
Throws:
RadiusException

nextFragment

protected byte[] nextFragment()

tlsResponse

protected byte[] tlsResponse(byte flags,
                             byte[] data)

doTunnelAuthentication

protected void doTunnelAuthentication(byte id,
                                      byte[] in)
                               throws java.lang.Throwable
Throws:
java.lang.Throwable

getCaFile

public java.lang.String getCaFile()

setCaFile

public void setCaFile(java.lang.String caFile)

getCaFileType

public java.lang.String getCaFileType()

setCaFileType

public void setCaFileType(java.lang.String caFileType)

getKeyFile

public java.lang.String getKeyFile()

setKeyFile

public void setKeyFile(java.lang.String keyFile)

getKeyFileType

public java.lang.String getKeyFileType()

setKeyFileType

public void setKeyFileType(java.lang.String keyFileType)

getKeyPassword

public java.lang.String getKeyPassword()

setKeyPassword

public void setKeyPassword(java.lang.String keyPassword)

getCaPassword

public java.lang.String getCaPassword()

setCaPassword

public void setCaPassword(java.lang.String caPassword)

getTrustAll

public java.lang.Boolean getTrustAll()

setTrustAll

public void setTrustAll(java.lang.Boolean trustAll)


Copyright © 2006 The JRadius Project, All Rights Reserved.