Search in sources :

Example 1 with MSESetATTA

use of org.openecard.sal.protocol.eac.apdu.MSESetATTA in project open-ecard by ecsec.

the class TerminalAuthentication method mseSetAT.

/**
 * Initializes the Terminal Authentication protocol.
 * Sends an MSE:Set AT APDU. (Protocol step 2)
 * See BSI-TR-03110, version 2.10, part 3, B.11.1.
 *
 * @param oID Terminal Authentication object identifier
 * @param chr Certificate Holder Reference (CHR)
 * @param key Ephemeral public key
 * @param aad Authenticated Auxiliary Data (AAD)
 * @throws ProtocolException
 */
public void mseSetAT(byte[] oID, byte[] chr, byte[] key, byte[] aad) throws ProtocolException {
    try {
        CardCommandAPDU mseSetAT = new MSESetATTA(oID, chr, key, aad);
        mseSetAT.transmit(dispatcher, slotHandle);
    } catch (APDUException e) {
        throw new ProtocolException(e.getResult());
    }
}
Also used : CardCommandAPDU(org.openecard.common.apdu.common.CardCommandAPDU) ProtocolException(org.openecard.common.sal.protocol.exception.ProtocolException) APDUException(org.openecard.common.apdu.exception.APDUException) MSESetATTA(org.openecard.sal.protocol.eac.apdu.MSESetATTA)

Aggregations

CardCommandAPDU (org.openecard.common.apdu.common.CardCommandAPDU)1 APDUException (org.openecard.common.apdu.exception.APDUException)1 ProtocolException (org.openecard.common.sal.protocol.exception.ProtocolException)1 MSESetATTA (org.openecard.sal.protocol.eac.apdu.MSESetATTA)1