use of org.openecard.common.WSHelper.WSException 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);
}
Aggregations