de.cardcontact.opencard.security
Class IsoCredentialStore

java.lang.Object
  extended by opencard.opt.security.CredentialStore
      extended by de.cardcontact.opencard.security.IsoCredentialStore

public class IsoCredentialStore
extends CredentialStore

Class implementing a credential store for secure channel credentials Secure channel credentials are stored with the file path and access mode as index

Author:
Andreas Schwier (info@cardcontact.de)

Field Summary
static int ACTIVATE
           
static int APPEND
           
static int CREATE
           
static int DEACTIVATE
           
static int DELETE
           
static int READ
           
static int SELECT
           
static int SIZE_ACCESS_MATRIX
           
static int UPDATE
           
 
Constructor Summary
IsoCredentialStore()
           
 
Method Summary
 SecureChannelCredential getSecureChannelCredential(SecurityDomain sd)
          Return the credentials defined for a specific security domain
 SecureChannelCredential getSecureChannelCredential(SecurityDomain sd, int accessMode)
          Get a secure channel credential for a specified security domain and access mode
 void setSecureChannelCredential(SecurityDomain sd, int accessMode, SecureChannelCredential scc)
          Set a secure channel credential for a specified security domain and access mode
 void setSecureChannelCredential(SecurityDomain sd, SecureChannelCredential scc)
          Set secure channel credential for a security domain
 boolean supports(CardID cardID)
          Generic store that supports any card
 
Methods inherited from class opencard.opt.security.CredentialStore
fetchCredential, getCredentialIDs, getInstance, storeCredential
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SELECT

public static final int SELECT
See Also:
Constant Field Values

READ

public static final int READ
See Also:
Constant Field Values

UPDATE

public static final int UPDATE
See Also:
Constant Field Values

APPEND

public static final int APPEND
See Also:
Constant Field Values

CREATE

public static final int CREATE
See Also:
Constant Field Values

DELETE

public static final int DELETE
See Also:
Constant Field Values

ACTIVATE

public static final int ACTIVATE
See Also:
Constant Field Values

DEACTIVATE

public static final int DEACTIVATE
See Also:
Constant Field Values

SIZE_ACCESS_MATRIX

public static final int SIZE_ACCESS_MATRIX
See Also:
Constant Field Values
Constructor Detail

IsoCredentialStore

public IsoCredentialStore()
Method Detail

supports

public boolean supports(CardID cardID)
Generic store that supports any card

Specified by:
supports in class CredentialStore
Parameters:
cardID - the ATR of the smartcard to test for
Returns:
true if the card is supported, false otherwise

setSecureChannelCredential

public void setSecureChannelCredential(SecurityDomain sd,
                                       SecureChannelCredential scc)
Set secure channel credential for a security domain

Parameters:
sd - Security domain (usually a CardFilePath object)
scc - Secure channel credential for this domain

getSecureChannelCredential

public SecureChannelCredential getSecureChannelCredential(SecurityDomain sd)
Return the credentials defined for a specific security domain

Parameters:
sd - Security domain (usually a CardFilePath object)
Returns:
Secure channel credential for this domain

getSecureChannelCredential

public SecureChannelCredential getSecureChannelCredential(SecurityDomain sd,
                                                          int accessMode)
Get a secure channel credential for a specified security domain and access mode

Parameters:
sd - Security domain (usually a CardFilePath object)
accessMode - Access mode, one of SELECT, READ, UPDATE, APPEND
Returns:
Secure channel credential or null if none defined

setSecureChannelCredential

public void setSecureChannelCredential(SecurityDomain sd,
                                       int accessMode,
                                       SecureChannelCredential scc)
Set a secure channel credential for a specified security domain and access mode

Parameters:
sd - Security domain (usually a CardFilePath object)
accessMode - Access mode, one of SELECT, READ, UPDATE, APPEND
scc - Secure channel credential