diff options
Diffstat (limited to 'smccSTAL/src/main/java/at/gv/egiz')
-rw-r--r-- | smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java | 8 | ||||
-rw-r--r-- | smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java | 10 |
2 files changed, 17 insertions, 1 deletions
diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java index b48d6d50..cfac8cf5 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java @@ -20,6 +20,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import at.gv.egiz.smcc.CancelledException; +import at.gv.egiz.smcc.LockedException; +import at.gv.egiz.smcc.NotActivatedException; import at.gv.egiz.smcc.PINProvider; import at.gv.egiz.smcc.PINSpec; import at.gv.egiz.smcc.SignatureCard; @@ -100,6 +102,12 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler implements stalResp.setInfoboxValue(resp); return stalResp; } + } catch (NotActivatedException e) { + log.info("Citizen card not activated.", e); + return new ErrorResponse(6001); + } catch (LockedException e) { + log.info("Citizen card locked.", e); + return new ErrorResponse(6001); } catch (CancelledException cx) { log.debug("User cancelled request", cx); return new ErrorResponse(6001); diff --git a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java index dcd12b02..466ec2a9 100644 --- a/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java +++ b/smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java @@ -32,6 +32,8 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import at.gv.egiz.smcc.CancelledException; +import at.gv.egiz.smcc.LockedException; +import at.gv.egiz.smcc.NotActivatedException; import at.gv.egiz.smcc.PINProvider; import at.gv.egiz.smcc.PINSpec; import at.gv.egiz.smcc.SignatureCard; @@ -78,7 +80,7 @@ public abstract class SignRequestHandler extends AbstractRequestHandler implemen String jceName = JCEAlgorithmNames.getJCEHashName(signatureMethod); if (jceName == null) { log.error("Hash algorithm not supported:"); - return new ErrorResponse(1000); + return new ErrorResponse(4006); } MessageDigest md = MessageDigest.getInstance(jceName); md.update(signReq.getSignedInfo()); @@ -90,6 +92,12 @@ public abstract class SignRequestHandler extends AbstractRequestHandler implemen SignResponse stalResp = new SignResponse(); stalResp.setSignatureValue(resp); return stalResp; + } catch (NotActivatedException e) { + log.info("Citizen card not activated.", e); + return new ErrorResponse(6001); + } catch (LockedException e) { + log.info("Citizen card locked.", e); + return new ErrorResponse(6001); } catch (CancelledException cx) { log.debug("User cancelled request"); return new ErrorResponse(6001); |