Package net.handle.hdllib
Class SessionSetupRequest
- java.lang.Object
-
- net.handle.hdllib.AbstractMessage
-
- net.handle.hdllib.AbstractRequest
-
- net.handle.hdllib.SessionSetupRequest
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SessionSetupRequest extends AbstractRequest
Request used to setup a new session. Holds the identity of the client, exchange key (either a public key or a handle/index pair).
-
-
Field Summary
Fields Modifier and Type Field Description boolean
authAllSessionMsg
boolean
encryptAllSessionMsg
byte[]
exchangeKeyHandle
int
exchangeKeyIndex
byte[]
identityHandle
int
identityIndex
int
keyExchangeMode
byte[]
publicKey
int
timeout
-
Fields inherited from class net.handle.hdllib.AbstractRequest
authInfo, completed, connectionLock, handle, isAdminRequest, multithread, requiresConnection, sessionInfo, sessionTracker, socketRef, streaming
-
Fields inherited from class net.handle.hdllib.AbstractMessage
authoritative, cacheCertify, certify, continuous, doNotRefer, encodedMessage, encrypt, expiration, ignoreRestrictedValues, keepAlive, majorProtocolVersion, messageBody, minorProtocolVersion, mintNewSuffix, OC_ADD_VALUE, OC_BACKUP_SERVER, OC_CREATE_HANDLE, OC_DELETE_HANDLE, OC_DUMP_HANDLES, OC_GET_NEXT_TXN_ID, OC_GET_SITE_INFO, OC_HOME_NA, OC_LIST_HANDLES, OC_LIST_HOMED_NAS, OC_MODIFY_VALUE, OC_REMOVE_VALUE, OC_RESERVED, OC_RESOLUTION, OC_RESPONSE_TO_CHALLENGE, OC_RETRIEVE_TXN_LOG, OC_SESSION_EXCHANGEKEY, OC_SESSION_SETUP, OC_SESSION_TERMINATE, OC_UNHOME_NA, OC_VERIFY_CHALLENGE, opCode, overwriteWhenExists, RC_AUTHEN_ERROR, RC_AUTHEN_TIMEOUT, RC_AUTHENTICATION_FAILED, RC_AUTHENTICATION_NEEDED, RC_ERROR, RC_HANDLE_ALREADY_EXISTS, RC_HANDLE_NOT_FOUND, RC_INSUFFICIENT_PERMISSIONS, RC_INVALID_ADMIN, RC_INVALID_CREDENTIAL, RC_INVALID_HANDLE, RC_INVALID_SESSION_KEY, RC_INVALID_SESSIONSETUP_REQUEST, RC_INVALID_VALUE, RC_NEED_RSAKEY_FOR_SESSIONEXCHANGE, RC_OPERATION_NOT_SUPPORTED, RC_OUT_OF_DATE_SITE_INFO, RC_PREFIX_REFERRAL, RC_PROTOCOL_ERROR, RC_RECURSION_COUNT_TOO_HIGH, RC_RESERVED, RC_SERVER_BACKUP, RC_SERVER_NOT_RESP, RC_SERVER_TOO_BUSY, RC_SERVICE_REFERRAL, RC_SESSION_FAILED, RC_SESSION_MESSAGE_REJECTED, RC_SESSION_TIMEOUT, RC_SUCCESS, RC_VALUE_ALREADY_EXISTS, RC_VALUES_NOT_FOUND, rdHashType, recursionCount, recursive, requestDigest, requestId, responseCode, returnRequestDigest, sessionCounter, sessionId, signature, signerHdl, signerHdlIdx, siteInfoSerial, suggestMajorProtocolVersion, suggestMinorProtocolVersion
-
-
Constructor Summary
Constructors Constructor Description SessionSetupRequest()
Empty request.SessionSetupRequest(byte[] exchangeKeyHandle, int exchangeKeyIndex)
SessionSetupRequest(byte[] identityHandle, int identityIndex, byte[] exchangeKeyHandle, int exchangeKeyIndex)
SessionSetupRequest(int mode, byte[] publicKey)
SessionSetupRequest(int mode, byte[] identityHandle, int identityIndex)
use server generated keysSessionSetupRequest(int mode, byte[] identityHandle, int identityIndex, byte[] publicKey)
used for creating a new session request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
getShouldInitSession()
Returns false because if the resolver tries to setup a session for a session setup request it will be a recursive nightmare!void
setTimeOut(int timeout)
-
Methods inherited from class net.handle.hdllib.AbstractRequest
clearBuffers, clone, getNamespace, setNamespace, setNamespaceExactly, signMessageForSession, toString
-
Methods inherited from class net.handle.hdllib.AbstractMessage
getEncodedMessage, getEncodedMessageBody, getResponseCodeMessage, hasEqualOrGreaterVersion, hasEqualOrGreaterVersion, setSupportedProtocolVersion, setSupportedProtocolVersion, setSupportedProtocolVersion, shouldEncrypt, signatureIsMac, signMessage, signMessage, takeValuesFrom, verifyMessage, verifyMessage
-
-
-
-
Field Detail
-
identityHandle
public byte[] identityHandle
-
identityIndex
public int identityIndex
-
exchangeKeyHandle
public byte[] exchangeKeyHandle
-
exchangeKeyIndex
public int exchangeKeyIndex
-
publicKey
public byte[] publicKey
-
timeout
public int timeout
-
encryptAllSessionMsg
public boolean encryptAllSessionMsg
-
authAllSessionMsg
public boolean authAllSessionMsg
-
keyExchangeMode
public int keyExchangeMode
-
-
Constructor Detail
-
SessionSetupRequest
public SessionSetupRequest()
Empty request. Caller should initialize.
-
SessionSetupRequest
public SessionSetupRequest(int mode, byte[] publicKey)
-
SessionSetupRequest
public SessionSetupRequest(byte[] exchangeKeyHandle, int exchangeKeyIndex)
-
SessionSetupRequest
public SessionSetupRequest(byte[] identityHandle, int identityIndex, byte[] exchangeKeyHandle, int exchangeKeyIndex)
-
SessionSetupRequest
public SessionSetupRequest(int mode, byte[] identityHandle, int identityIndex, byte[] publicKey)
used for creating a new session request. identityHandle can be null,- Parameters:
identityIndex
- can be -1mode
- KEY_EXCHANGE_CIPHER_CLIENT or KEY_EXCHANGE_DH
-
SessionSetupRequest
public SessionSetupRequest(int mode, byte[] identityHandle, int identityIndex)
use server generated keys- Parameters:
mode
- usually KEY_EXCHANGE_CIPHER_SERVER
-
-