Package net.handle.hdllib
Class SessionSetupInfo
java.lang.Object
net.handle.hdllib.SessionSetupInfo
Class for passing session options to HandleResolver.
keyExchangeMode indicates what key exchange method to use:
KEY_EXCHANGE_NONE - No session
KEY_EXCHANGE_CIPHER_CLIENT - Exchange key is encrypted with client's
asymmetric key. Requires RSA.
KEY_EXCHANGE_CIPHER_SERVER - Exchange key is encrypted with server's
asymmetric key, which should be stored in
the NA handle. Requires RSA.
KEY_EXCHANGE_DH - Use diffie-hellman key exchange
The public variables used depend on the key mode. Polymorphism might be
a cleaner way to go than the different modes, but this should be simple
enough to rely on delegation.
The different constructors can be used as shortcuts for particular modes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanbooleanbyte[]intintbyte[]int -
Constructor Summary
ConstructorsConstructorDescriptionSessionSetupInfo(byte[] exchangeHandle, int exchangeIndex, PrivateKey privateKey) SessionSetupInfo(int mode) SessionSetupInfo(int mode, byte[] exchangekey, PrivateKey privateKey) SessionSetupInfo(int mode, PublicKey exchangekey, PrivateKey privateKey) SessionSetupInfo(String exchangeHandle, int exchangeIndex, PrivateKey privateKey) SessionSetupInfo(AuthenticationInfo authInfo) Deprecated. -
Method Summary
-
Field Details
-
keyExchangeMode
public int keyExchangeMode -
exchangeKeyHandle
public byte[] exchangeKeyHandle -
exchangeKeyIndex
public int exchangeKeyIndex -
publicExchangeKey
public byte[] publicExchangeKey -
privateExchangeKey
-
timeout
public int timeout -
encrypted
public boolean encrypted -
authenticated
public boolean authenticated
-
-
Constructor Details
-
SessionSetupInfo
-
SessionSetupInfo
-
SessionSetupInfo
Deprecated.Usenew SessionSetupInfo()instead.Constructs a SessionSetupInfo. The authentication info is not used.- Parameters:
authInfo- ignored
-
SessionSetupInfo
public SessionSetupInfo() -
SessionSetupInfo
-
SessionSetupInfo
- Throws:
Exception
-
SessionSetupInfo
public SessionSetupInfo(int mode)
-
-
Method Details
-
reset
public void reset() -
toString
-
initDHKeys
- Throws:
HandleException
-
new SessionSetupInfo()instead.