Package org.dogtagpki.tps.apdu
Class APDU
- java.lang.Object
-
- org.dogtagpki.tps.apdu.APDU
-
- Direct Known Subclasses:
APDUResponse
,ClearKeySlotsAPDU
,CreateObjectAPDU
,CreatePinAPDU
,DeleteFileAPDU
,DeleteFileGP211APDU
,ExternalAuthenticateAPDU
,ExternalAuthenticateAPDUGP211
,FormatMuscleAppletAPDU
,GenerateKeyAPDU
,GenerateKeyECCAPDU
,GetDataAPDU
,GetIssuerInfoAPDU
,GetLifecycleAPDU
,GetStatusAPDU
,GetVersionAPDU
,ImportKeyAPDU
,ImportKeyEncAPDU
,InitializeUpdateAPDU
,InstallAppletAPDU
,InstallAppletAPDUGP211
,InstallLoadAPDU
,InstallLoadGP211APDU
,LifecycleAPDU
,ListObjectsAPDU
,ListPinsAPDU
,LoadFileAPDU
,LoadFileAPDUGP211
,PutKeyAPDU
,ReadBufferAPDU
,ReadObjectAPDU
,SelectAPDU
,SetIssuerInfoAPDU
,SetPinAPDU
,UnblockPinAPDU
,WriteObjectAPDU
public abstract class APDU extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
APDU.Type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dump()
byte
getCLA()
TPSBuffer
getData()
TPSBuffer
getDataToMAC()
TPSBuffer
getEncoding()
Retrieves APDU's encoding.byte
getINS()
TPSBuffer
getMAC()
byte
getP1()
byte
getP2()
APDU.Type
getType()
void
incrementBuffer(TPSBuffer buffer)
void
padBuffer80(TPSBuffer buffer, int blockSize)
void
secureMessage(org.mozilla.jss.pkcs11.PK11SymKey encKey, byte protocol)
void
secureMessageSCP02(org.mozilla.jss.pkcs11.PK11SymKey encKey)
void
secureMessageSCP03(org.mozilla.jss.pkcs11.PK11SymKey encKey, TPSBuffer encryptionCounter)
void
setMAC(TPSBuffer theMac)
void
setTrailer(TPSBuffer theTrailer)
-
-
-
Constructor Detail
-
APDU
public APDU()
-
APDU
public APDU(APDU otherAPDU)
-
-
Method Detail
-
setMAC
public void setMAC(TPSBuffer theMac)
-
setTrailer
public void setTrailer(TPSBuffer theTrailer)
-
getEncoding
public TPSBuffer getEncoding()
Retrieves APDU's encoding. The encoding of APDU is as follows: CLA 1 byte INS 1 byte P1 1 byte P2 1 byte 1 byte byte(s) 0 1 byte- Returns:
- the result buffer which will contain the actual data including the APDU header, data, and pre-calculated mac.
-
getDataToMAC
public TPSBuffer getDataToMAC()
-
secureMessage
public void secureMessage(org.mozilla.jss.pkcs11.PK11SymKey encKey, byte protocol) throws EBaseException
- Throws:
EBaseException
-
padBuffer80
public void padBuffer80(TPSBuffer buffer, int blockSize)
-
incrementBuffer
public void incrementBuffer(TPSBuffer buffer)
-
secureMessageSCP03
public void secureMessageSCP03(org.mozilla.jss.pkcs11.PK11SymKey encKey, TPSBuffer encryptionCounter) throws EBaseException
- Throws:
EBaseException
-
secureMessageSCP02
public void secureMessageSCP02(org.mozilla.jss.pkcs11.PK11SymKey encKey) throws EBaseException
- Throws:
EBaseException
-
getType
public APDU.Type getType()
-
getData
public TPSBuffer getData()
-
getMAC
public TPSBuffer getMAC()
-
getCLA
public byte getCLA()
-
getINS
public byte getINS()
-
getP1
public byte getP1()
-
getP2
public byte getP2()
-
dump
public void dump()
-
-