Class 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 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 -1
        mode - 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
    • Method Detail

      • setTimeOut

        public void setTimeOut​(int timeout)
      • getShouldInitSession

        public final boolean getShouldInitSession()
        Returns false because if the resolver tries to setup a session for a session setup request it will be a recursive nightmare!