diff options
author | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-07-13 14:42:42 +0000 |
---|---|---|
committer | tkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4> | 2012-07-13 14:42:42 +0000 |
commit | 72addfe0c8a69c4a341e19d76393091a4aeacc52 (patch) | |
tree | 25742b17253d82b61dfde285488eaaf61ee7ce5e /smccSTAL/src | |
parent | e6e4bdc24bbb6f59e80d1ad0765cf8111695e3d3 (diff) | |
download | mocca-72addfe0c8a69c4a341e19d76393091a4aeacc52.tar.gz mocca-72addfe0c8a69c4a341e19d76393091a4aeacc52.tar.bz2 mocca-72addfe0c8a69c4a341e19d76393091a4aeacc52.zip |
refactoring
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1104 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'smccSTAL/src')
-rw-r--r-- | smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java | 26 |
1 files changed, 11 insertions, 15 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 7e1b42fe..83e3694d 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 @@ -72,22 +72,18 @@ public class InfoBoxReadRequestHandler extends AbstractRequestHandler { InfoboxReadResponse stalResp = new InfoboxReadResponse(); stalResp.setInfoboxValue(resp); return stalResp; - } else if (SignatureCard.KeyboxName.CERTIFIED_KEYPAIR.equals(infoBox - .getInfoboxIdentifier())) { - log.debug("Handling certified keypair infobox."); - byte[] resp = card - .getCertificate(SignatureCard.KeyboxName.CERTIFIED_KEYPAIR, new VerifyPINGUI(gui)); - if (resp == null) { - return new ErrorResponse(6001); + } else if (SignatureCard.KeyboxName.CERTIFIED_KEYPAIR.equals(infoBox.getInfoboxIdentifier()) || + SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR.equals(infoBox.getInfoboxIdentifier())) + { + byte[] resp; + if (SignatureCard.KeyboxName.CERTIFIED_KEYPAIR.equals(infoBox.getInfoboxIdentifier())) + { + log.debug("Handling certified keypair infobox."); + resp = card.getCertificate(SignatureCard.KeyboxName.CERTIFIED_KEYPAIR, new VerifyPINGUI(gui)); + } else { + log.debug("Handling secure signature keypair infobox."); + resp = card.getCertificate(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR, new VerifyPINGUI(gui)); } - InfoboxReadResponse stalResp = new InfoboxReadResponse(); - stalResp.setInfoboxValue(resp); - return stalResp; - } else if (SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR - .equals(infoBox.getInfoboxIdentifier())) { - log.debug("Handling secure signature keypair infobox."); - byte[] resp = card - .getCertificate(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR, new VerifyPINGUI(gui)); if (resp == null) { return new ErrorResponse(6001); } |