Search in sources :

Example 1 with UnblockPINDialog

use of org.openecard.plugins.pinplugin.gui.UnblockPINDialog 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)

Aggregations

ConnectionHandleType (iso.std.iso_iec._24727.tech.schema.ConnectionHandleType)1 Disconnect (iso.std.iso_iec._24727.tech.schema.Disconnect)1 WSException (org.openecard.common.WSHelper.WSException)1 UnblockPINDialog (org.openecard.plugins.pinplugin.gui.UnblockPINDialog)1