Search in sources :

Example 1 with PINDialog

use of org.openecard.plugins.pinplugin.gui.PINDialog in project open-ecard by ecsec.

the class GetCardsAndPINStatusAction 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) {
        LOG.debug("User cancelled card insertion.");
        return;
    }
    cHandle = connectToRootApplication(cHandle);
    RecognizedState pinState = recognizeState(cHandle);
    boolean nativePace;
    try {
        nativePace = genericPACESupport(cHandle);
    } catch (WSException e) {
        LOG.error("Could not get capabilities from reader.");
        return;
    }
    PINDialog uc = new PINDialog(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) PINDialog(org.openecard.plugins.pinplugin.gui.PINDialog) 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 PINDialog (org.openecard.plugins.pinplugin.gui.PINDialog)1