Package opencard.core.service
Class CardHolderVerificationGUI
- java.lang.Object
-
- opencard.core.service.CardHolderVerificationGUI
-
public final class CardHolderVerificationGUI extends java.lang.Object
The system user interaction handler.This class provides a trusted path to the OpenCard Framework.
- Author:
- Peter Trommler (trp@zurich.ibm.com), Thomas Schaeck (schaeck@de.ibm.com)
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CardHolderVerificationGUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
clearDisplay()
Clear the display.protected void
display(int num)
Display a message.protected java.lang.String
keyboardInput(CardTerminalIOControl ioControl, CHVDialog customCHVDialog)
Return keyboard (i.e., keyboard, PIN pad, etc.) input.protected java.lang.String
promptUser(int chvNumber, CardTerminalIOControl ioControl, CHVDialog customCHVDialog)
Prompt the user for a password, etc.ResponseAPDU
sendVerifiedAPDU(SlotChannel slotchan, CommandAPDU command, CHVControl control, CHVDialog dialog)
Queries for a PIN and sends it to the smartcard.ResponseAPDU
sendVerifiedAPDU(SlotChannel slotchan, CommandAPDU command, CHVControl control, CHVDialog dialog, int timeout)
Deprecated.
-
-
-
Method Detail
-
clearDisplay
protected void clearDisplay()
Clear the display.
-
display
protected void display(int num)
Display a message.- Parameters:
message
- The String to display.
-
keyboardInput
protected java.lang.String keyboardInput(CardTerminalIOControl ioControl, CHVDialog customCHVDialog)
Return keyboard (i.e., keyboard, PIN pad, etc.) input.- Parameters:
ioControl
- A CardTerminalIOControl object that specifies how the user input should look like.- Returns:
- A String containing the input.
-
promptUser
protected java.lang.String promptUser(int chvNumber, CardTerminalIOControl ioControl, CHVDialog customCHVDialog)
Prompt the user for a password, etc.- Parameters:
prompt
- The message to be displayed.ioControl
- A CardTerminalIOControl object that specifies how the user input should look like.- Returns:
- A String containing the input.
-
sendVerifiedAPDU
@Deprecated public ResponseAPDU sendVerifiedAPDU(SlotChannel slotchan, CommandAPDU command, CHVControl control, CHVDialog dialog, int timeout) throws CardTerminalException, CardServiceInvalidCredentialException
Deprecated.
-
sendVerifiedAPDU
public ResponseAPDU sendVerifiedAPDU(SlotChannel slotchan, CommandAPDU command, CHVControl control, CHVDialog dialog) throws CardTerminalException, CardServiceInvalidCredentialException
Queries for a PIN and sends it to the smartcard. This method expects a command including a PIN to send to the smartcard. The PIN or password within the command is pre-initialized with padding bytes. This method queries the password from the user, stores it in the command, and sends the resulting command to the smartcard. The smartcard's response is returned.
This method is invoked by CardChannel.sendVerifiedAPDU only if the card terminal does not take responsibility for querying and filling in the password. If the terminal implements the interface VerifiedAPDUInterface, the channel will use the card terminal to do the job.- Parameters:
slotchan
- the physical channel to the smartcardcommand
- the APDU to send, password still missingcontrol
- the parameters needed to query and fill in the password, for example the message for querying, and an offset in the command APDUdialog
- a dialog provided by the application, or null to use a default dialog- Throws:
CardTerminalException
- An error occurred while sending the command.CardServiceInvalidCredentialException
- The user entered an empty password, or cancelled the password input. No command has been sent to the smartcard.- See Also:
CardChannel.sendVerifiedAPDU(opencard.core.terminal.CommandAPDU, opencard.core.terminal.CHVControl, opencard.core.service.CHVDialog, int)
-
-