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
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddump()bytegetCLA()getData()Retrieves APDU's encoding.bytegetINS()getMAC()bytegetP1()bytegetP2()getType()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) voidvoidsetTrailer(TPSBuffer theTrailer)
-
Field Details
-
DEFAULT_APDU_SIZE
public static int DEFAULT_APDU_SIZE -
cla
protected byte cla -
ins
protected byte ins -
p1
protected byte p1 -
p2
protected byte p2 -
data
-
plainText
-
mac
-
trailer
-
-
Constructor Details
-
APDU
public APDU() -
APDU
-
-
Method Details
-
setMAC
-
setTrailer
-
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
-
secureMessage
public void secureMessage(org.mozilla.jss.pkcs11.PK11SymKey encKey, byte protocol) throws EBaseException - Throws:
EBaseException
-
padBuffer80
-
incrementBuffer
-
secureMessageSCP03
public void secureMessageSCP03(org.mozilla.jss.pkcs11.PK11SymKey encKey, TPSBuffer encryptionCounter) throws EBaseException - Throws:
EBaseException
-
secureMessageSCP02
- Throws:
EBaseException
-
getType
-
getData
-
getMAC
-
getCLA
public byte getCLA() -
getINS
public byte getINS() -
getP1
public byte getP1() -
getP2
public byte getP2() -
dump
public void dump()
-