|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.waveset.adapter.RASecureConnection
This class handles both the "client" and the "server" side of a connection. It does mutual authentication (via the RASecureChallenge class) and has an embedded encryption class (RAEncryptor).
Nested Class Summary | |
static interface |
RASecureConnection.RASecureConnectionAccessor
|
Field Summary | |
static int |
_defaultPort
|
protected static Trace |
_trace
|
static java.lang.String |
code_id
|
static int |
MAX_COMMAND_SIZE
|
Constructor Summary | |
RASecureConnection(java.net.InetAddress addr,
int port,
byte[] key)
|
|
RASecureConnection(java.net.Socket socket,
byte[] key)
|
|
RASecureConnection(java.lang.String host,
int port,
byte[] key)
|
Method Summary | |
void |
close()
|
void |
Disconnect()
|
void |
ExchangeAuth(boolean isInitiator)
Deprecated. , replaced by ExchangeAuth(boolean,byte[]) |
void |
ExchangeAuth(boolean isInitiator,
byte[] resourceName)
Trade authentication messages with remote side. |
void |
FailConnection()
|
java.util.Map |
getApplicationData()
Returns a refernce to the actual application data map. |
java.lang.Object |
getApplicationDataValue(java.lang.Object key)
The application using the secure connection can get data back that it previously stashed on the connection. |
long |
getLastUse()
|
int |
getProtocolVersion()
|
boolean |
inUse()
|
boolean |
isOk()
|
boolean |
lease(AgentConnectionPool pool)
|
void |
putApplicationDataValue(java.lang.Object key,
java.lang.Object value)
The application using the secure connection can stash data about the connection here and get it back later. |
byte[] |
ReceivePrivate()
ReceivePrivate The data coming in looks like: int length;// 4 bytes, length of unpadded data, sequence#, flags, + MAC int flags;// 4 bytes, {encrypted, keychange, 30 reserved} int sequenceNumber; // increments 1 per Send() call byte[] user data... |
byte[] |
ReceivePrivate(int rxFlags)
|
byte[] |
ReceivePrivate(int rxFlags,
long timeout)
|
byte[] |
ReceivePrivate(long timeout)
|
void |
ResetEncryption(byte[] key)
|
void |
returnConnection(boolean isBogus)
|
boolean |
SendConnectionKey(byte[] key)
SendConnectionKey Send a new encryption key to the remote end. |
void |
SendPrivate(byte[] buf)
SendPrivate(byte[] buf) Always make a copy of buf to add sequence number and padding before encryption Send the requested bytes as a block, wrapping them with the length and optionally a MAC (message authentication code, basically a secure checksum to validate that the data has not been messed with). |
void |
SendPrivate(byte[] buf,
int flags)
|
void |
SendPrivate(byte[] buf,
int flags,
long timeout)
|
void |
SendPrivate(byte[] buf,
long timeout)
|
void |
setGatewayKeyView(GenericObject view)
|
void |
setLighthouseContext(LighthouseContext ctx)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String code_id
public static int _defaultPort
public static final int MAX_COMMAND_SIZE
protected static final Trace _trace
Constructor Detail |
public RASecureConnection(java.net.Socket socket, byte[] key) throws java.io.IOException
public RASecureConnection(java.net.InetAddress addr, int port, byte[] key) throws java.io.IOException
public RASecureConnection(java.lang.String host, int port, byte[] key) throws java.io.IOException
Method Detail |
public void putApplicationDataValue(java.lang.Object key, java.lang.Object value)
public java.lang.Object getApplicationDataValue(java.lang.Object key)
public java.util.Map getApplicationData()
public void SendPrivate(byte[] buf) throws java.io.IOException
java.io.IOException
public void SendPrivate(byte[] buf, int flags) throws java.io.IOException
java.io.IOException
public void SendPrivate(byte[] buf, long timeout) throws java.io.IOException
java.io.IOException
public void SendPrivate(byte[] buf, int flags, long timeout) throws java.io.IOException
java.io.IOException
public byte[] ReceivePrivate() throws java.io.IOException, java.net.ProtocolException
java.io.IOException
java.net.ProtocolException
public byte[] ReceivePrivate(int rxFlags) throws java.io.IOException, java.net.ProtocolException
java.io.IOException
java.net.ProtocolException
public byte[] ReceivePrivate(long timeout) throws java.io.IOException, java.net.ProtocolException
java.io.IOException
java.net.ProtocolException
public byte[] ReceivePrivate(int rxFlags, long timeout) throws java.io.IOException, java.net.ProtocolException
java.io.IOException
java.net.ProtocolException
public void FailConnection() throws java.io.IOException
java.io.IOException
public void ResetEncryption(byte[] key) throws java.security.InvalidKeyException
java.security.InvalidKeyException
public boolean SendConnectionKey(byte[] key) throws java.io.IOException, java.net.ProtocolException, java.security.InvalidKeyException
java.io.IOException
java.net.ProtocolException
java.security.InvalidKeyException
public void ExchangeAuth(boolean isInitiator) throws java.io.IOException, java.security.InvalidKeyException
ExchangeAuth(boolean,byte[])
java.io.IOException
java.security.InvalidKeyException
public void ExchangeAuth(boolean isInitiator, byte[] resourceName) throws java.lang.SecurityException, java.io.IOException, java.security.InvalidKeyException
java.lang.SecurityException
java.io.IOException
java.security.InvalidKeyException
public boolean inUse()
public boolean isOk()
public boolean lease(AgentConnectionPool pool)
public long getLastUse()
public void close()
public void Disconnect() throws java.io.IOException
java.io.IOException
public void returnConnection(boolean isBogus)
public void setGatewayKeyView(GenericObject view)
public void setLighthouseContext(LighthouseContext ctx)
public int getProtocolVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |