de.cardcontact.opencard.service.globalplatform
Class SecurityDomainCardService

java.lang.Object
  extended by opencard.core.service.CardService
      extended by de.cardcontact.opencard.service.globalplatform.SecurityDomainCardService

public class SecurityDomainCardService
extends CardService

Class implementing a Global Platform Security Domain card service

Author:
Andreas Schwier (info@cardcontact.de)

Constructor Summary
SecurityDomainCardService()
           
 
Method Summary
 ResponseAPDU deleteAID(byte[] aid)
          Issue DELETE command to remove package with given AID from card
protected  void initialize(CardServiceScheduler scheduler, SmartCard smartcard, boolean blocking)
          Create the IsoCardState object in the card channel if it does not yet exist.
 ResponseAPDU installForInstallAndSelectable(byte[] loadFileAID, byte[] execModAID, byte[] appInsAID, byte[] privileges, byte[] installParam, byte[] installToken)
          Issue INSTALL command with INSTALL FOR INSTALL and SELECTABLE option to security domain
 ResponseAPDU installForLoad(byte[] loadFileAID, byte[] secDomAID, byte[] loadDBHash, byte[] loadParam, byte[] loadToken)
          Issue INSTALL command with INSTALL FOR LOAD option to security domain
 ResponseAPDU load(CapFile capFile)
          Load load file into card using a sequence of LOAD apdus
 ResponseAPDU select(AppletID id, boolean next)
          Select applet using SELECT command and application identifier passed in id If the argument id is set to null, then the issuer security domain is selected
 
Methods inherited from class opencard.core.service.CardService
allocateCardChannel, getCard, getCardChannel, getCHVDialog, releaseCardChannel, setCardChannel, setCHVDialog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityDomainCardService

public SecurityDomainCardService()
Method Detail

initialize

protected void initialize(CardServiceScheduler scheduler,
                          SmartCard smartcard,
                          boolean blocking)
                   throws CardServiceException
Create the IsoCardState object in the card channel if it does not yet exist. Overwrites #opencard.core.service.CardService#initialize

Overrides:
initialize in class CardService
Parameters:
scheduler - where this service is going to allocate channels
smartcard - which smartcard has to be supported by this service
blocking - whether channel allocation is going to be blocking
Throws:
CardServiceException - if the service could not be initialized. The object created via the default constructor may not be used if this happens.
See Also:
CardServiceFactory

select

public ResponseAPDU select(AppletID id,
                           boolean next)
                    throws CardTerminalException
Select applet using SELECT command and application identifier passed in id If the argument id is set to null, then the issuer security domain is selected

Parameters:
id - Applet Id (AID) or null
next - True to select next matching AID
Returns:
Response for SELECT APDU
Throws:
CardTerminalException

installForInstallAndSelectable

public ResponseAPDU installForInstallAndSelectable(byte[] loadFileAID,
                                                   byte[] execModAID,
                                                   byte[] appInsAID,
                                                   byte[] privileges,
                                                   byte[] installParam,
                                                   byte[] installToken)
                                            throws CardTerminalException
Issue INSTALL command with INSTALL FOR INSTALL and SELECTABLE option to security domain

Parameters:
loadFileAID - AID for load file in card
execModAID - AID for module contained in load file
appInsAID - AID for application instance
privileges - Privileges for application
installParam - Install parameter for application
installToken - Install tokens
Returns:
ResponseAPDU from card
Throws:
CardTerminalException

installForLoad

public ResponseAPDU installForLoad(byte[] loadFileAID,
                                   byte[] secDomAID,
                                   byte[] loadDBHash,
                                   byte[] loadParam,
                                   byte[] loadToken)
                            throws CardTerminalException
Issue INSTALL command with INSTALL FOR LOAD option to security domain

Parameters:
loadFileAID -
secDomAID -
loadDBHash -
loadParam -
loadToken -
Returns:
ResponseAPDU from card
Throws:
CardTerminalException

load

public ResponseAPDU load(CapFile capFile)
                  throws CardTerminalException
Load load file into card using a sequence of LOAD apdus

Parameters:
capFile - Load file with cap components
Returns:
Response from last LOAD commands
Throws:
CardTerminalException

deleteAID

public ResponseAPDU deleteAID(byte[] aid)
                       throws CardTerminalException
Issue DELETE command to remove package with given AID from card

Parameters:
aid -
Returns:
ResponseAPDU from card
Throws:
CardTerminalException