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 classAPDU.Type
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump()bytegetCLA()TPSBuffergetData()TPSBuffergetDataToMAC()TPSBuffergetEncoding()Retrieves APDU's encoding.bytegetINS()TPSBuffergetMAC()bytegetP1()bytegetP2()APDU.TypegetType()voidincrementBuffer(TPSBuffer buffer)voidpadBuffer80(TPSBuffer buffer, int blockSize)voidsecureMessage(org.mozilla.jss.pkcs11.PK11SymKey encKey, byte protocol)voidsecureMessageSCP02(org.mozilla.jss.pkcs11.PK11SymKey encKey)voidsecureMessageSCP03(org.mozilla.jss.pkcs11.PK11SymKey encKey, TPSBuffer encryptionCounter)voidsetMAC(TPSBuffer theMac)voidsetTrailer(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()
-
-