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 Object
  • 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

      protected TPSBuffer data
    • plainText

      protected TPSBuffer plainText
    • mac

      protected TPSBuffer mac
    • trailer

      protected TPSBuffer trailer
  • Constructor Details

    • APDU

      public APDU()
    • APDU

      public APDU(APDU otherAPDU)
  • Method Details

    • 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()