public class GSCBSI extends java.lang.Object implements BSI, BSIReturnCodes, CryptographicAlgoID, BSIAccessControlRules, BSICardCapabilities
BSI_ACCESS_DENIED, BSI_ACR_NOT_AVAILABLE, BSI_BAD_AID, BSI_BAD_ALGO_ID, BSI_BAD_AUTH, BSI_BAD_HANDLE, BSI_BAD_PARAM, BSI_BAD_TAG, BSI_CARD_ABSENT, BSI_CARD_REMOVED, BSI_INSUFFICIENT_BUFFER, BSI_IO_ERROR, BSI_NO_CARDSERVICE, BSI_NO_MORE_SPACE, BSI_NO_SPSSERVICE, BSI_NO_TEXT_AVAILABLE, BSI_NOT_TRANSACTED, BSI_OK, BSI_PIN_LOCKED, BSI_SC_LOCKED, BSI_TAG_EXISTS, BSI_TERMINAL_AUTH, BSI_TIMEOUT_ERROR, BSI_UNKNOWN_ERROR, BSI_UNKNOWN_READERBSI_DES3_CBC, BSI_DES3_ECB, ECDSA_256_NO_PAD, ECDSA_384_NO_PAD, RSA_NO_PADBSI_ACR_ALWAYS, BSI_ACR_NEVER, BSI_ACR_PIN, BSI_ACR_PIN_ALWAYS, BSI_ACR_PIN_THEN_XAUTH, BSI_ACR_UPDATE_ONCE, BSI_ACR_XAUTH, BSI_ACR_XAUTH_AND_PIN, BSI_ACR_XAUTH_OR_PIN, BSI_ACR_XAUTH_THEN_PIN, BSI_SECURE_CHANNEL_GP, BSI_SECURE_CHANNEL_ISOBSI_GCCDM, BSI_PKI, BSI_SKI| Constructor and Description |
|---|
GSCBSI() |
| Modifier and Type | Method and Description |
|---|---|
void |
gscBsiGcDataCreate(int hCard,
java.lang.String AID,
short tag,
byte[] value)
Create a new data item in {Tag, Length, Value} format in the selected container.
|
void |
gscBsiGcDataDelete(int hCard,
java.lang.String AID,
short tag)
Delete the data item associated with the tag value in the specified container.
|
ContainerProperties |
gscBsiGcGetContainerProperties(int hCard,
java.lang.String AID)
Retrieves the properties of the specified container.
|
short[] |
gscBsiGcReadTagList(int hCard,
java.lang.String AID)
Return the list of tags in the selected container.
|
byte[] |
gscBsiGcReadValue(int hCard,
java.lang.String AID,
short tag)
Returns the Value associated with the specified Tag.
|
void |
gscBsiGcUpdateValue(int hCard,
java.lang.String AID,
short tag,
byte[] value)
Updates the Value associated with the specified Tag.
|
byte[] |
gscBsiGetChallenge(int hCard,
java.lang.String AID)
Retrieves a randomly generated challenge from the card as the first step of a
challenge-response authentication protocol between the client application and the
card.
|
CryptoProperties |
gscBsiGetCryptoProperties(int hCard,
java.lang.String AID)
Retrieves the Access Control Rules associated with the PKI provider module.
|
byte[] |
gscBsiPkiCompute(int hCard,
java.lang.String AID,
short algoID,
byte[] message)
Performs a private key computation on the message digest using the private key associated with the specified AID.
|
byte[] |
gscBsiPkiGetCertificate(int hCard,
java.lang.String AID)
Reads the certificate from the card.
|
byte[] |
gscBsiSkiInternalAuthenticate(int hCard,
java.lang.String AID,
short algoID,
byte[] challenge)
Computes a symmetric key cryptogram in response to a challenge.
|
void |
gscBsiUtilAcquireContext(int hCard,
java.lang.String AID,
java.util.Vector strctAuthenticator)
This function shall establish a session with a target container on the smart card by
submitting the appropriate Authenticator in the BSIAuthenticator structure.
|
void |
gscBsiUtilBeginTransaction(int hCard,
boolean blType)
Starts an exclusive transaction with the smart card referenced by hCard.
|
int |
gscBsiUtilConnect(java.lang.String readerName)
Establish a logical connection with the card in a specified reader.
|
void |
gscBsiUtilDisconnect(int hCard)
Terminate a logical connection to a card.
|
void |
gscBsiUtilEndTransaction(int hCard)
Completes a previously started transaction, allowing other applications to resume
interactions with the card.
|
CardProperties |
gscBsiUtilGetCardProperties(int hCard)
Retrieves ID and capability information for the card.
|
void |
gscBsiUtilGetCardStatus(int hCard)
Checks whether a given card handle is associated with a card that is inserted into a powered up reader.
|
java.lang.String |
gscBsiUtilGetExtendedErrorText(int hCard)
When a BSI function call throws a BSIException , an application can make a
subsequent call to this function to receive additional error information from the card
reader driver layer, if available.
|
java.util.Vector |
gscBsiUtilGetReaderList()
Retrieves the list of available readers.
|
java.lang.String |
gscBsiUtilGetVersion()
Returns the BSI implementation version.
|
byte[] |
gscBsiUtilPassthru(int hCard,
byte[] cardCommand)
Allows a client application to send a "raw" APDU through the BSI directly to the
card and receive the APDU-level response.
|
void |
gscBsiUtilReleaseContext(int hCard,
java.lang.String AID)
Terminate a session with the target container on the card.
|
int |
gscXsiNotifySynchronizationEnd(int hCard)
Stops to notify synchronisation.
|
int |
gscXsiNotifySynchronizationStart(int hCard)
Starts to notify synchronisation.
|
void |
gscXsiUtilChangePIN(int hCard,
java.lang.String AID,
byte[] oldPIN,
byte[] newPIN)
Change the PIN of the card.
|
java.lang.String |
gscXsiUtilGetCardATR(int hCard)
Retrieve the ATR of the card.
|
int |
gscXsiUtilGetCardManagerState(int hCard)
Retrieves the Card Manager state.
|
java.lang.String |
gscXsiUtilGetCuid(int hCard)
Retrieve the CUID of the card.
|
int |
utilGetLeftPINTries(int hCard,
java.lang.String AID)
Get the number of left PIN tries of the card.
|
boolean |
utilIsPINVerified(int hCard,
java.lang.String AID)
Check if the PIN is verified.
|
public GSCBSI()
throws BSIException
BSIExceptionpublic void gscBsiUtilAcquireContext(int hCard,
java.lang.String AID,
java.util.Vector strctAuthenticator)
throws BSIException
gscBsiUtilAcquireContext in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.strctAuthenticator: - Vector of BSIAuthenticator objects containing the
authenticator(s) specified by the ACR required to access
a value in the container. The required list of
authenticators is returned by
gscBsiGcGetContainerProperties(). The
calling application is responsible for constructing this object.BSIException - if an error occurred.BSIAuthenticatorpublic int gscBsiUtilConnect(java.lang.String readerName)
throws BSIException
gscBsiUtilConnect in interface BSIreaderName: - Name of the reader that the card is inserted into. If this field
is an empty String, the SPS shall attempt to connect to the
card in the first available reader, as returned by a call to the
BSI’s function gscBsiUtilGetReaderList(). The
Name of the reader shall be stored as ASCII encoding Strings.BSIException - if an error occurred.public void gscBsiUtilDisconnect(int hCard)
throws BSIException
gscBsiUtilDisconnect in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public void gscBsiUtilBeginTransaction(int hCard,
boolean blType)
throws BSIException
gscBsiUtilBeginTransaction in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().blType: - Boolean specifying the type of transaction call ( blType set to true in blocking mode.
blType set to false in non blocking mode). In this version it should be true (blocking mode).BSIException - if an error occurred.public void gscBsiUtilEndTransaction(int hCard)
throws BSIException
gscBsiUtilEndTransaction in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public java.lang.String gscBsiUtilGetVersion()
throws BSIException
gscBsiUtilGetVersion in interface BSIBSIException - if an error occurred.public CardProperties gscBsiUtilGetCardProperties(int hCard) throws BSIException
gscBsiUtilGetCardProperties in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.CardPropertiespublic void gscBsiUtilGetCardStatus(int hCard)
throws BSIException
gscBsiUtilGetCardStatus in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public java.lang.String gscBsiUtilGetExtendedErrorText(int hCard)
throws BSIException
gscBsiUtilGetExtendedErrorText in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public java.util.Vector gscBsiUtilGetReaderList()
throws BSIException
gscBsiUtilGetReaderList in interface BSIBSIException - if an error occurred.public byte[] gscBsiUtilPassthru(int hCard,
byte[] cardCommand)
throws BSIException
gscBsiUtilPassthru in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().cardCommand: - An array of bytes representing the APDU to be sent to
the card. The parameter must be in ASCII hexadecimal format.BSIException - if an error occurred.public void gscBsiUtilReleaseContext(int hCard,
java.lang.String AID)
throws BSIException
gscBsiUtilReleaseContext in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.BSIException - if an error occurred.public java.lang.String gscXsiUtilGetCardATR(int hCard)
throws BSIException
gscXsiUtilGetCardATR in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public java.lang.String gscXsiUtilGetCuid(int hCard)
throws BSIException
gscXsiUtilGetCuid in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public void gscXsiUtilChangePIN(int hCard,
java.lang.String AID,
byte[] oldPIN,
byte[] newPIN)
throws BSIException
gscXsiUtilChangePIN in interface BSIhCard: - card connection handle from gscBsiUtilConnect().AID: - target container AID value. The AID shall be stored as an ASCII hexadecimal string.oldPIN: - value of the current PINnewPIN: - value of the new PINBSIException - if an error occurred.public boolean utilIsPINVerified(int hCard,
java.lang.String AID)
throws BSIException
utilIsPINVerified in interface BSIhCard: - card connection handle from gscBsiUtilConnect().AID: - target container AID value. The AID shall be stored as an ASCII hexadecimal string.BSIException - if an error occurred.public int utilGetLeftPINTries(int hCard,
java.lang.String AID)
throws BSIException
utilGetLeftPINTries in interface BSIhCard: - card connection handle from gscBsiUtilConnect().AID: - target container AID value. The AID shall be stored as an ASCII hexadecimal string.BSIException - if an error occurred.public void gscBsiGcDataCreate(int hCard,
java.lang.String AID,
short tag,
byte[] value)
throws BSIException
gscBsiGcDataCreate in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.tag: - Tag of data item to store.value: - Data value to store.BSIException - if an error occurred.public void gscBsiGcDataDelete(int hCard,
java.lang.String AID,
short tag)
throws BSIException
gscBsiGcDataDelete in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.tag: - Tag of data item to delete.BSIException - if an error occurred.public ContainerProperties gscBsiGcGetContainerProperties(int hCard, java.lang.String AID) throws BSIException
gscBsiGcGetContainerProperties in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.BSIException - if an error occurred.ContainerPropertiespublic short[] gscBsiGcReadTagList(int hCard,
java.lang.String AID)
throws BSIException
gscBsiGcReadTagList in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.BSIException - if an error occurred.public byte[] gscBsiGcReadValue(int hCard,
java.lang.String AID,
short tag)
throws BSIException
gscBsiGcReadValue in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.tag: - Tag value of data item to read.BSIException - if an error occurred.public void gscBsiGcUpdateValue(int hCard,
java.lang.String AID,
short tag,
byte[] value)
throws BSIException
gscBsiGcUpdateValue in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.tag: - Tag value of data item to update.value: - New Value of the data item.BSIException - if an error occurred.public byte[] gscBsiGetChallenge(int hCard,
java.lang.String AID)
throws BSIException
gscBsiGetChallenge in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.BSIException - if an error occurred.public byte[] gscBsiSkiInternalAuthenticate(int hCard,
java.lang.String AID,
short algoID,
byte[] challenge)
throws BSIException
gscBsiSkiInternalAuthenticate in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.algoID: - Identifies the cryptographic algorithm that the card must use to
encrypt the challenge. All conformant implementations shall, at
a minimum, support the following algorithms: DES3-ECB (Algorithm Identifier 0x81) and DES3-CBC (Algorithm Identifier0x82).
Implementations may optionally support other cryptographic algorithms.challenge: - Challenge generated by the client application and submitted to the card.BSIException - if an error occurred.public byte[] gscBsiPkiCompute(int hCard,
java.lang.String AID,
short algoID,
byte[] message)
throws BSIException
gscBsiPkiCompute in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.algoID: - Identifies the cryptographic algorithm that will be used to
generate the signature. All conformant implementations shall, at
a minimum, support RSA_NO_PAD (Algorithm Identifier 0xA3). Implementations may optionally support other algorithms.message: - The message digest to be signed.BSIException - if an error occurred.public byte[] gscBsiPkiGetCertificate(int hCard,
java.lang.String AID)
throws BSIException
gscBsiPkiGetCertificate in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.BSIException - if an error occurred.public CryptoProperties gscBsiGetCryptoProperties(int hCard, java.lang.String AID) throws BSIException
gscBsiGetCryptoProperties in interface BSIhCard: - Card connection handle from gscBsiUtilConnect().AID: - Target container AID value. The AID shall be stored as an
ASCII hexadecimal string.BSIException - if an error occurred.CryptoPropertiespublic int gscXsiUtilGetCardManagerState(int hCard)
throws BSIException
gscXsiUtilGetCardManagerState in interface BSIhCard: - card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public int gscXsiNotifySynchronizationStart(int hCard)
throws BSIException
gscXsiNotifySynchronizationStart in interface BSIhCard: - card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.public int gscXsiNotifySynchronizationEnd(int hCard)
throws BSIException
gscXsiNotifySynchronizationEnd in interface BSIhCard: - card connection handle from gscBsiUtilConnect().BSIException - if an error occurred.Copyright © 1998-2010 ActivIdentity (All rights reserved)