Java API
HSM Dinamo
Loading...
Looking for...
No entries found
Session

Detailed description

Client session management with HSM.

Functions

void openSession (String strAddr, String strUsrId, String strPwd) throws TacException
 Establishes an encrypted connection with the HSM.
 
void openSession (String strAddr, String strUsrId, String strPwd, boolean bLoadBalance) throws TacException
 Establishes an encrypted connection with the HSM.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp, boolean bLoadBalance) throws TacException
 Establishes an encrypted connection with the HSM using OTP.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp) throws TacException
 Establishes an encrypted connection with the HSM using OTP.
 
void openSession (String strAddr, String strUsrId, String strPwd, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection to the HSM using the load balance settings.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection with the HSM using the load balance and OTP configurations.
 
void setOpenSession (byte[] session)
 Defines a previously opened session handle to be used in this instance.
 
void openSession (String strAddr, TacAccessToken stAToken, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection with the HSM using AToken.
 
void openSession (String strAddr, byte[] jbaAToken, int nPort, int nFlags) throws TacException
 Establishes an encrypted connection with the HSM using AToken.
 
void openSession (String strAddr, TacAccessToken stAToken, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes a connection with the HSM using AToken.
 
void openSession (String strAddr, byte[] jbaAToken, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes a connection with the HSM using AToken.
 
void openSession (String strAddr, String strUsrId, String strPwd, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes an encrypted connection with the HSM.
 
void openSession (String strAddr, String strUsrId, String strPwd, String strOtp, int nPort, boolean bLoadBalance, boolean bSessionCache, boolean bEncrypted) throws TacException
 Establishes an encrypted connection with the HSM using OTP.
 
void closeSession (int nFlags) throws TacException
 Terminates the connection to the HSM.
 
void closeSession (boolean bPhysicallyClose) throws TacException
 Terminates the connection to the HSM.
 
void closeSession () throws TacException
 Ends the session by handing back the open connection to the management pool.
 
long getCID () throws TacException
 Retrieves the CID (Correlation ID) of the current session.
 

Functions

openSession() [1/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd ) throws TacException

Establishes an encrypted connection with the HSM.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
strUsrIdHSM user.
strPwdHSM user password.
Exceptions
TacExceptionPosted when a user access or validation error occurs.

openSession() [2/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
boolean bLoadBalance ) throws TacException

Establishes an encrypted connection with the HSM.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
strUsrIdHSM user.
strPwdHSM user password.
bLoadBalanceIf true, use load balance
Exceptions
TacExceptionPosted when a user access or validation error occurs.

openSession() [3/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
String strOtp,
boolean bLoadBalance ) throws TacException

Establishes an encrypted connection with the HSM using OTP.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
strUsrIdHSM user.
strPwdHSM user password.
strOtpHSM user OTP.
bLoadBalanceIf true, use load balance
Exceptions
TacExceptionPosted when a user access or validation error occurs.

openSession() [4/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
String strOtp ) throws TacException

Establishes an encrypted connection with the HSM using OTP.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
strUsrIdHSM user.
strPwdHSM user password.
strOtpHSM user OTP.
Exceptions
TacExceptionPosted when a user access or validation error occurs.

openSession() [5/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
int nPort,
int nFlags ) throws TacException

Establishes an encrypted connection to the HSM using the load balance settings.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
strUsrIdHSM user.
strPwdHSM User Password.
nPortHSM port. Please note: only 4433 can be used.
nFlagsAlways equal to zero.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

openSession() [6/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
String strOtp,
int nPort,
int nFlags ) throws TacException

Establishes an encrypted connection with the HSM using the load balance and OTP configurations.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
strUsrIdHSM user.
strPwdHSM User Password.
strOtpHSM User Otp.
nPortHSM port. Please note: only 4433 can be used.
nFlagsAlways equal to zero.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

setOpenSession()

void setOpenSession ( byte[] session)

Defines a previously opened session handle to be used in this instance.

Parameters
sessionPreviously opened session handle

openSession() [7/12]

void openSession ( String strAddr,
TacAccessToken stAToken,
int nPort,
int nFlags ) throws TacException

Establishes an encrypted connection with the HSM using AToken.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
stATokenHSM access token.
nPortHSM port. Please note: only 4433 can be used.
nFlagsAlways equal to zero.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

openSession() [8/12]

void openSession ( String strAddr,
byte[] jbaAToken,
int nPort,
int nFlags ) throws TacException

Establishes an encrypted connection with the HSM using AToken.

Parameters
strAddrIP address of the HSM. If left blank, the system uses load balancing
jbaATokenHSM access token.
nPortHSM port. Please note: only 4433 can be used.
nFlagsAlways equal to zero.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

openSession() [9/12]

void openSession ( String strAddr,
TacAccessToken stAToken,
int nPort,
boolean bLoadBalance,
boolean bSessionCache,
boolean bEncrypted ) throws TacException

Establishes a connection with the HSM using AToken.

Parameters
strAddrIP address of the HSM.
stATokenHSM access token.
nPortHSM port. Please note: only 4433 can be used.
bLoadBalanceIf true, use load balance
bSessionCacheIf true, it uses the session cache manager.
bEncryptedIf true, use an encrypted connection. Some operations, such as generating keys or changing a user's password, can only be used with encrypted connections.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

openSession() [10/12]

void openSession ( String strAddr,
byte[] jbaAToken,
int nPort,
boolean bLoadBalance,
boolean bSessionCache,
boolean bEncrypted ) throws TacException

Establishes a connection with the HSM using AToken.

Parameters
strAddrIP address of the HSM.
jbaATokenHSM access token.
nPortHSM port. Please note: only 4433 can be used.
bLoadBalanceIf true, use load balance
bSessionCacheIf true, it uses the session cache manager.
bEncryptedIf true, use an encrypted connection. Some operations, such as generating keys or changing a user's password, can only be used with encrypted connections.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

openSession() [11/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
int nPort,
boolean bLoadBalance,
boolean bSessionCache,
boolean bEncrypted ) throws TacException

Establishes an encrypted connection with the HSM.

Parameters
strAddrIP address of the HSM.
strUsrIdHSM user.
strPwdHSM User Password.
nPortHSM port. Please note: only 4433 can be used.
bLoadBalanceIf true, use load balance
bSessionCacheIf true, it uses the session cache manager.
bEncryptedIf true, use an encrypted connection. Some operations, such as generating keys or changing a user's password, can only be used with encrypted connections.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

openSession() [12/12]

void openSession ( String strAddr,
String strUsrId,
String strPwd,
String strOtp,
int nPort,
boolean bLoadBalance,
boolean bSessionCache,
boolean bEncrypted ) throws TacException

Establishes an encrypted connection with the HSM using OTP.

Parameters
strAddrIP address of the HSM.
strUsrIdHSM user.
strPwdHSM User Password.
strOtpHSM User OTP.
nPortHSM port. Please note: only 4433 can be used.
bLoadBalanceIf true, use load balance
bSessionCacheIf true, it uses the session cache manager.
bEncryptedIf true, use an encrypted connection. Some operations, such as generating keys or changing a user's password, can only be used with encrypted connections.
Exceptions
TacExceptionPosted when there is an error in accessing or validating the User.

closeSession() [1/3]

void closeSession ( int nFlags) throws TacException

Terminates the connection to the HSM.

Parameters
nFlagsAlways equal to zero.
Exceptions
TacExceptionPosted in the event of failure to close the session.

closeSession() [2/3]

void closeSession ( boolean bPhysicallyClose) throws TacException

Terminates the connection to the HSM.

Parameters
bPhysicallyCloseDetermines whether the session will be physically closed, or only released in the local cache.
Exceptions
TacExceptionPosted in the event of failure to close the session.

closeSession() [3/3]

void closeSession ( ) throws TacException

Ends the session by handing back the open connection to the management pool.

Exceptions
TacExceptionPosted in the event of failure to close the session.

getCID()

long getCID ( ) throws TacException

Retrieves the CID (Correlation ID) of the current session.

The CID makes it possible to relate the operation on the HSM client to the HSM logs. The CID is only available when there is an established session with the HSM, otherwise the value will be 0 (zero). This number is usually represented in hexadecimal.

Return
CID
Exceptions
TacExceptionThrows exception in case of error