Search in sources :

Example 11 with TransmitResponse

use of iso.std.iso_iec._24727.tech.schema.TransmitResponse in project open-ecard by ecsec.

the class TerminalTest method testTransmit.

@Test(enabled = false)
public void testTransmit() {
    init();
    Connect con = new Connect();
    con.setContextHandle(ctxHandle);
    con.setIFDName(ifdName);
    con.setSlot(BigInteger.ZERO);
    con.setExclusive(Boolean.FALSE);
    slotHandle = ifd.connect(con).getSlotHandle();
    Transmit t = new Transmit();
    InputAPDUInfoType apdu = new InputAPDUInfoType();
    apdu.getAcceptableStatusCode().add(new byte[] { (byte) 0x90, (byte) 0x00 });
    apdu.setInputAPDU(new byte[] { (byte) 0x00, (byte) 0xA4, (byte) 0x04, (byte) 0x0C });
    t.getInputAPDUInfo().add(apdu);
    t.setSlotHandle(slotHandle);
    TransmitResponse res = ifd.transmit(t);
    assertEquals(ECardConstants.Major.OK, res.getResult().getResultMajor());
}
Also used : Transmit(iso.std.iso_iec._24727.tech.schema.Transmit) Connect(iso.std.iso_iec._24727.tech.schema.Connect) InputAPDUInfoType(iso.std.iso_iec._24727.tech.schema.InputAPDUInfoType) TransmitResponse(iso.std.iso_iec._24727.tech.schema.TransmitResponse) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest)

Aggregations

TransmitResponse (iso.std.iso_iec._24727.tech.schema.TransmitResponse)11 Transmit (iso.std.iso_iec._24727.tech.schema.Transmit)9 InputAPDUInfoType (iso.std.iso_iec._24727.tech.schema.InputAPDUInfoType)7 Result (oasis.names.tc.dss._1_0.core.schema.Result)5 ConnectionHandleType (iso.std.iso_iec._24727.tech.schema.ConnectionHandleType)4 DIDAuthenticateResponse (iso.std.iso_iec._24727.tech.schema.DIDAuthenticateResponse)4 Connect (iso.std.iso_iec._24727.tech.schema.Connect)3 DIDAuthenticate (iso.std.iso_iec._24727.tech.schema.DIDAuthenticate)3 IOException (java.io.IOException)3 BigInteger (java.math.BigInteger)3 CardResponseAPDU (org.openecard.common.apdu.common.CardResponseAPDU)3 BeginTransaction (iso.std.iso_iec._24727.tech.schema.BeginTransaction)2 BeginTransactionResponse (iso.std.iso_iec._24727.tech.schema.BeginTransactionResponse)2 CardApplicationConnect (iso.std.iso_iec._24727.tech.schema.CardApplicationConnect)2 CardApplicationConnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationConnectResponse)2 CardApplicationDisconnect (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnect)2 CardApplicationDisconnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnectResponse)2 CardApplicationPath (iso.std.iso_iec._24727.tech.schema.CardApplicationPath)2 CardApplicationPathResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationPathResponse)2 CardApplicationPathType (iso.std.iso_iec._24727.tech.schema.CardApplicationPathType)2