Search in sources :

Example 16 with Disconnect

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

the class UnblockPINAction method execute.

@Override
public void execute() {
    // check if a german identity card is inserted, if not wait for it
    ConnectionHandleType cHandle = waitForCardType(GERMAN_IDENTITY_CARD);
    if (cHandle == null) {
        logger.debug("User cancelled card insertion.");
        return;
    }
    cHandle = connectToRootApplication(cHandle);
    RecognizedState pinState = recognizeState(cHandle);
    boolean nativePace;
    try {
        nativePace = genericPACESupport(cHandle);
    } catch (WSException e) {
        logger.error("Could not get capabilities from reader.");
        return;
    }
    UnblockPINDialog uc = new UnblockPINDialog(gui, dispatcher, cHandle, pinState, !nativePace);
    uc.show();
    Disconnect d = new Disconnect();
    d.setSlotHandle(cHandle.getSlotHandle());
    dispatcher.safeDeliver(d);
}
Also used : ConnectionHandleType(iso.std.iso_iec._24727.tech.schema.ConnectionHandleType) UnblockPINDialog(org.openecard.plugins.pinplugin.gui.UnblockPINDialog) Disconnect(iso.std.iso_iec._24727.tech.schema.Disconnect) WSException(org.openecard.common.WSHelper.WSException)

Example 17 with Disconnect

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

the class TCTokenHandler method disconnectHandle.

public static void disconnectHandle(Dispatcher dispatcher, ConnectionHandleType connectionHandle) {
    // disconnect card after authentication
    CardApplicationDisconnect appDis = new CardApplicationDisconnect();
    appDis.setConnectionHandle(connectionHandle);
    appDis.setAction(ActionType.RESET);
    dispatcher.safeDeliver(appDis);
}
Also used : CardApplicationDisconnect(iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnect)

Aggregations

CardApplicationDisconnect (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnect)10 Disconnect (iso.std.iso_iec._24727.tech.schema.Disconnect)10 ConnectionHandleType (iso.std.iso_iec._24727.tech.schema.ConnectionHandleType)9 CardApplicationConnect (iso.std.iso_iec._24727.tech.schema.CardApplicationConnect)5 CardApplicationConnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationConnectResponse)5 CardApplicationPath (iso.std.iso_iec._24727.tech.schema.CardApplicationPath)5 CardApplicationPathResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationPathResponse)5 CardApplicationPathType (iso.std.iso_iec._24727.tech.schema.CardApplicationPathType)5 DisconnectResponse (iso.std.iso_iec._24727.tech.schema.DisconnectResponse)5 CardApplicationDisconnectResponse (iso.std.iso_iec._24727.tech.schema.CardApplicationDisconnectResponse)4 DestroyChannel (iso.std.iso_iec._24727.tech.schema.DestroyChannel)4 EstablishChannelResponse (iso.std.iso_iec._24727.tech.schema.EstablishChannelResponse)4 IOException (java.io.IOException)4 EndTransaction (iso.std.iso_iec._24727.tech.schema.EndTransaction)3 EndTransactionResponse (iso.std.iso_iec._24727.tech.schema.EndTransactionResponse)3 ParserConfigurationException (javax.xml.parsers.ParserConfigurationException)3 ThreadTerminateException (org.openecard.common.ThreadTerminateException)3 BeginTransaction (iso.std.iso_iec._24727.tech.schema.BeginTransaction)2 BeginTransactionResponse (iso.std.iso_iec._24727.tech.schema.BeginTransactionResponse)2 ChannelHandleType (iso.std.iso_iec._24727.tech.schema.ChannelHandleType)2