summaryrefslogtreecommitdiff
path: root/smccSTAL/src/main/java/at/gv
diff options
context:
space:
mode:
Diffstat (limited to 'smccSTAL/src/main/java/at/gv')
-rw-r--r--smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java26
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);
}