public class GPSession extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GPSession.APDUMode |
static class |
GPSession.GPSpec |
| Modifier and Type | Field and Description |
|---|---|
static byte |
CLA_GP |
static byte |
CLA_MAC |
static EnumSet<GPSession.APDUMode> |
defaultMode |
static byte |
INS_DELETE |
static byte |
INS_GET_DATA |
static byte |
INS_GET_STATUS |
static byte |
INS_INITIALIZE_UPDATE |
static byte |
INS_INSTALL |
static byte |
INS_LOAD |
static byte |
INS_PUT_KEY |
static byte |
INS_SET_STATUS |
static byte |
INS_STORE_DATA |
static byte |
P1_INSTALL_AND_MAKE_SELECTABLE |
static byte |
P1_INSTALL_FOR_INSTALL |
static byte |
P1_INSTALL_FOR_LOAD |
static byte |
P1_LAST_BLOCK |
static byte |
P1_MORE_BLOCKS |
static int |
SCP_01_05 |
static int |
SCP_01_15 |
static int |
SCP_02_04 |
static int |
SCP_02_05 |
static int |
SCP_02_0A |
static int |
SCP_02_0B |
static int |
SCP_02_14 |
static int |
SCP_02_15 |
static int |
SCP_02_1A |
static int |
SCP_02_1B |
static int |
SCP_ANY |
protected boolean |
strict |
| Constructor and Description |
|---|
GPSession(apdu4j.APDUBIBO channel,
pro.javacard.AID sdAID) |
| Modifier and Type | Method and Description |
|---|---|
static GPSession |
connect(apdu4j.APDUBIBO channel,
pro.javacard.AID sdAID) |
void |
deleteAID(pro.javacard.AID aid,
boolean deleteDeps) |
void |
deleteKey(int keyver) |
static GPSession |
discover(apdu4j.APDUBIBO channel) |
void |
extradite(pro.javacard.AID what,
pro.javacard.AID to) |
pro.javacard.AID |
getAID() |
apdu4j.APDUBIBO |
getCardChannel() |
static byte[] |
getLoadParams(boolean loadParam,
byte[] code) |
GPRegistry |
getRegistry() |
int |
getScpKeyVersion() |
static String |
getVersion() |
protected void |
giveStrictWarning(String message) |
void |
installAndMakeSelectable(pro.javacard.AID packageAID,
pro.javacard.AID appletAID,
pro.javacard.AID instanceAID,
GPRegistryEntry.Privileges privileges,
byte[] installParams) |
void |
installForInstall(pro.javacard.AID packageAID,
pro.javacard.AID appletAID,
pro.javacard.AID instanceAID,
GPRegistryEntry.Privileges privileges,
byte[] installParams,
PrivateKey key) |
void |
installForPersonalization(pro.javacard.AID aid) |
void |
loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain) |
void |
loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain,
pro.javacard.AID dapdomain,
byte[] dap,
String hashFunction) |
void |
loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain,
byte[] dap,
String hash) |
void |
loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain,
String hashFunction) |
void |
lockUnlockApplet(pro.javacard.AID app,
boolean lock) |
void |
makeDefaultSelected(pro.javacard.AID aid) |
void |
openSecureChannel(GPCardKeys keys,
GPSecureChannel scp,
byte[] host_challenge,
EnumSet<GPSession.APDUMode> securityLevel) |
void |
personalize(pro.javacard.AID aid,
byte[] data,
int P1) |
List<byte[]> |
personalize(pro.javacard.AID aid,
List<byte[]> data,
int P1) |
byte[] |
personalizeSingle(pro.javacard.AID aid,
byte[] data,
int P1) |
void |
putKey(RSAPublicKey pubkey,
int version) |
void |
putKeys(GPCardKeys keys,
boolean replace) |
void |
renameISD(pro.javacard.AID newaid) |
void |
setBlockSize(int size) |
void |
setCardStatus(byte status) |
void |
setDMTokenGenerator(DMTokenGenerator tokenGenerator) |
void |
setSpec(GPSession.GPSpec spec) |
void |
setStrict(boolean strict) |
void |
storeData(byte[] data,
int P1) |
List<byte[]> |
storeData(List<byte[]> blocks,
int P1) |
byte[] |
storeDataSingle(byte[] data,
int P1) |
apdu4j.ResponseAPDU |
transmit(apdu4j.CommandAPDU command) |
public static final int SCP_ANY
public static final int SCP_01_05
public static final int SCP_01_15
public static final int SCP_02_04
public static final int SCP_02_05
public static final int SCP_02_0A
public static final int SCP_02_0B
public static final int SCP_02_14
public static final int SCP_02_15
public static final int SCP_02_1A
public static final int SCP_02_1B
public static final EnumSet<GPSession.APDUMode> defaultMode
public static final byte CLA_GP
public static final byte CLA_MAC
public static final byte INS_INITIALIZE_UPDATE
public static final byte INS_INSTALL
public static final byte INS_LOAD
public static final byte INS_DELETE
public static final byte INS_GET_STATUS
public static final byte INS_SET_STATUS
public static final byte INS_PUT_KEY
public static final byte INS_STORE_DATA
public static final byte INS_GET_DATA
public static final byte P1_INSTALL_AND_MAKE_SELECTABLE
public static final byte P1_INSTALL_FOR_INSTALL
public static final byte P1_INSTALL_FOR_LOAD
public static final byte P1_MORE_BLOCKS
public static final byte P1_LAST_BLOCK
protected boolean strict
public static GPSession discover(apdu4j.APDUBIBO channel) throws GPException, IOException
GPExceptionIOExceptionpublic static GPSession connect(apdu4j.APDUBIBO channel, pro.javacard.AID sdAID) throws IOException, GPException
IOExceptionGPExceptionpublic static String getVersion()
public static byte[] getLoadParams(boolean loadParam,
byte[] code)
public void setStrict(boolean strict)
public void setBlockSize(int size)
public void setSpec(GPSession.GPSpec spec)
public void setDMTokenGenerator(DMTokenGenerator tokenGenerator)
public pro.javacard.AID getAID()
public apdu4j.APDUBIBO getCardChannel()
protected void giveStrictWarning(String message) throws GPException
GPExceptionpublic int getScpKeyVersion()
public void openSecureChannel(GPCardKeys keys, GPSecureChannel scp, byte[] host_challenge, EnumSet<GPSession.APDUMode> securityLevel) throws IOException, GPException
IOExceptionGPExceptionpublic apdu4j.ResponseAPDU transmit(apdu4j.CommandAPDU command)
throws IOException
IOExceptionpublic void loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain)
throws IOException,
GPException
IOExceptionGPExceptionpublic void loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain,
String hashFunction)
throws IOException,
GPException
IOExceptionGPExceptionpublic void loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain,
byte[] dap,
String hash)
throws IOException,
GPException
IOExceptionGPExceptionpublic void loadCapFile(pro.javacard.CAPFile cap,
pro.javacard.AID targetDomain,
pro.javacard.AID dapdomain,
byte[] dap,
String hashFunction)
throws IOException,
GPException
IOExceptionGPExceptionpublic void installAndMakeSelectable(pro.javacard.AID packageAID,
pro.javacard.AID appletAID,
pro.javacard.AID instanceAID,
GPRegistryEntry.Privileges privileges,
byte[] installParams)
throws GPException,
IOException
GPExceptionIOExceptionpublic void installForInstall(pro.javacard.AID packageAID,
pro.javacard.AID appletAID,
pro.javacard.AID instanceAID,
GPRegistryEntry.Privileges privileges,
byte[] installParams,
PrivateKey key)
throws GPException,
IOException
GPExceptionIOExceptionpublic void extradite(pro.javacard.AID what,
pro.javacard.AID to)
throws GPException,
IOException
GPExceptionIOExceptionpublic void installForPersonalization(pro.javacard.AID aid)
throws IOException,
GPException
IOExceptionGPExceptionpublic byte[] personalizeSingle(pro.javacard.AID aid,
byte[] data,
int P1)
throws IOException,
GPException
IOExceptionGPExceptionpublic void personalize(pro.javacard.AID aid,
byte[] data,
int P1)
throws IOException,
GPException
IOExceptionGPExceptionpublic List<byte[]> personalize(pro.javacard.AID aid, List<byte[]> data, int P1) throws IOException, GPException
IOExceptionGPExceptionpublic byte[] storeDataSingle(byte[] data,
int P1)
throws IOException,
GPException
IOExceptionGPExceptionpublic void storeData(byte[] data,
int P1)
throws IOException,
GPException
IOExceptionGPExceptionpublic List<byte[]> storeData(List<byte[]> blocks, int P1) throws IOException, GPException
IOExceptionGPExceptionpublic void makeDefaultSelected(pro.javacard.AID aid)
throws IOException,
GPException
IOExceptionGPExceptionpublic void lockUnlockApplet(pro.javacard.AID app,
boolean lock)
throws IOException,
GPException
IOExceptionGPExceptionpublic void setCardStatus(byte status)
throws IOException,
GPException
IOExceptionGPExceptionpublic void deleteAID(pro.javacard.AID aid,
boolean deleteDeps)
throws GPException,
IOException
GPExceptionIOExceptionpublic void deleteKey(int keyver)
throws GPException,
IOException
GPExceptionIOExceptionpublic void renameISD(pro.javacard.AID newaid)
throws GPException,
IOException
GPExceptionIOExceptionpublic void putKeys(GPCardKeys keys, boolean replace) throws GPException, IOException
GPExceptionIOExceptionpublic void putKey(RSAPublicKey pubkey, int version) throws IOException, GPException
IOExceptionGPExceptionpublic GPRegistry getRegistry() throws GPException, IOException
GPExceptionIOExceptionCopyright © 2019. All rights reserved.