From 72addfe0c8a69c4a341e19d76393091a4aeacc52 Mon Sep 17 00:00:00 2001 From: tkellner Date: Fri, 13 Jul 2012 14:42:42 +0000 Subject: refactoring git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1104 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../bku/smccstal/InfoBoxReadRequestHandler.java | 26 +++++++++------------- 1 file changed, 11 insertions(+), 15 deletions(-) (limited to 'smccSTAL/src') 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); } -- cgit v1.2.3