summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-23 12:09:10 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2008-09-23 12:09:10 +0000
commit1c4df47223a6d655b9fb7f46f807171ceda07ba7 (patch)
treea04feff6a231f031fc378fd0945eb0c8afd22259
parent8eb4e196f4c8d920b380e7a9d4b2e6a295f4cbe3 (diff)
downloadmocca-1c4df47223a6d655b9fb7f46f807171ceda07ba7.tar.gz
mocca-1c4df47223a6d655b9fb7f46f807171ceda07ba7.tar.bz2
mocca-1c4df47223a6d655b9fb7f46f807171ceda07ba7.zip
bitte warten...
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@56 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java12
-rw-r--r--BKUOnline/src/main/webapp/expired.html23
-rw-r--r--smccSTAL/pom.xml1
-rw-r--r--smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/InfoBoxReadRequestHandler.java249
-rw-r--r--smccSTAL/src/main/java/at/gv/egiz/bku/smccstal/SignRequestHandler.java1
5 files changed, 146 insertions, 140 deletions
diff --git a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
index b94a58e8..0b68962c 100644
--- a/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
+++ b/BKUCommonGUI/src/main/java/at/gv/egiz/bku/gui/BKUGUI.java
@@ -400,7 +400,8 @@ public class BKUGUI implements BKUGUIFacade {
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createSequentialGroup()
// mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
- .addComponent(errorMsgLabel)); //, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE));
+ .addComponent(errorMsgLabel)
+ .addContainerGap()); //, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE));
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createSequentialGroup()
// mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
@@ -777,10 +778,13 @@ public class BKUGUI implements BKUGUIFacade {
mainPanel.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
- mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
- .addComponent(errorMsgLabel, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE));
+ mainPanelLayout.createSequentialGroup()
+// mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
+ .addComponent(errorMsgLabel) //, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE, Short.MAX_VALUE));
+ .addContainerGap());
mainPanelLayout.setVerticalGroup(
- mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
+ mainPanelLayout.createSequentialGroup()
+// mainPanelLayout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(errorMsgLabel));
JButton okButton = new JButton();
diff --git a/BKUOnline/src/main/webapp/expired.html b/BKUOnline/src/main/webapp/expired.html
index 67ca94bc..2bb961f5 100644
--- a/BKUOnline/src/main/webapp/expired.html
+++ b/BKUOnline/src/main/webapp/expired.html
@@ -14,15 +14,16 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Session Expired</title>
-</head>
-<body>
- <p>
- Ihre Sitzung ist abgelaufen. Ein neuer BKU request kann im <a href="HTTP-ohne.html">Requestformular</a> erstellt werden.
- </p>
-</body>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Session Expired</title>
+</head>
+<body>
+ <p>
+ Ihre Sitzung ist abgelaufen.
+ <!--Ein neuer BKU request kann im <a href="HTTP-ohne.html">Requestformular</a> erstellt werden.-->
+ </p>
+</body>
</html> \ No newline at end of file
diff --git a/smccSTAL/pom.xml b/smccSTAL/pom.xml
index 8b1a24b0..a053b419 100644
--- a/smccSTAL/pom.xml
+++ b/smccSTAL/pom.xml
@@ -11,7 +11,6 @@
<artifactId>smccSTAL</artifactId>
<name>smcc STAL</name>
<version>1.0-SNAPSHOT</version>
- <description />
<dependencies>
<dependency>
<groupId>at.gv.egiz</groupId>
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 7dc2e202..25085b16 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
@@ -14,127 +14,128 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package at.gv.egiz.bku.smccstal;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import at.gv.egiz.smcc.CancelledException;
-import at.gv.egiz.smcc.PINProvider;
-import at.gv.egiz.smcc.PINSpec;
-import at.gv.egiz.smcc.SignatureCard;
-import at.gv.egiz.smcc.SignatureCardException;
-import at.gv.egiz.stal.ErrorResponse;
-import at.gv.egiz.stal.InfoboxReadRequest;
-import at.gv.egiz.stal.InfoboxReadResponse;
-import at.gv.egiz.stal.STALRequest;
-import at.gv.egiz.stal.STALResponse;
-
-public class InfoBoxReadRequestHandler extends AbstractRequestHandler implements
- PINProvider {
-
- private static Log log = LogFactory.getLog(InfoBoxReadRequestHandler.class);
-
- private int retryCounter = 0;
-
- @Override
- public STALResponse handleRequest(STALRequest request) {
- if (request instanceof InfoboxReadRequest) {
- InfoboxReadRequest infoBox = (InfoboxReadRequest) request;
- try {
- if (infoBox.getInfoboxIdentifier().equals("IdentityLink")) {
- newSTALMessage("Message.RequestCaption", "Message.IdentityLink");
- log.debug("Handling identitylink infobox");
- byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), this,
- infoBox.getDomainIdentifier());
- if (resp == null) {
- log.info("Got null as result->user cancelled");
- return new ErrorResponse(6001);
- } else {
- try {
- resp = DomainIdConverter.convertDomainId(resp, infoBox
- .getDomainIdentifier());
- } catch (Exception e) {
- log.error("Cannot convert domain specific id", e);
- return new ErrorResponse(1000);
- }
- }
- InfoboxReadResponse stalResp = new InfoboxReadResponse();
- stalResp.setInfoboxValue(resp);
- return stalResp;
- } else if (SignatureCard.KeyboxName.CERITIFIED_KEYPAIR.equals(infoBox
- .getInfoboxIdentifier())) {
- newSTALMessage("Message.RequestCaption", "Message.CertifiedKeypair");
- log.debug("Handling certified keypair infobox");
- byte[] resp = card
- .getCertificate(SignatureCard.KeyboxName.CERITIFIED_KEYPAIR);
- if (resp == null) {
- return new ErrorResponse(6001);
- }
- InfoboxReadResponse stalResp = new InfoboxReadResponse();
- stalResp.setInfoboxValue(resp);
- return stalResp;
- } else if (SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR
- .equals(infoBox.getInfoboxIdentifier())) {
- newSTALMessage("Message.RequestCaption",
- "Message.SecureSignatureKeypair");
- log.debug("Handling secure signature keypair infobox");
- byte[] resp = card
- .getCertificate(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR);
- if (resp == null) {
- return new ErrorResponse(6001);
- }
- InfoboxReadResponse stalResp = new InfoboxReadResponse();
- stalResp.setInfoboxValue(resp);
- return stalResp;
- } else {
- newSTALMessage("Message.RequestCaption", "Message.InfoboxReadRequest");
- log.warn("Unknown infobox identifier: "
- + infoBox.getInfoboxIdentifier() + " trying generic request");
- byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), this,
- infoBox.getDomainIdentifier());
- if (resp == null) {
- return new ErrorResponse(6001);
- }
- InfoboxReadResponse stalResp = new InfoboxReadResponse();
- stalResp.setInfoboxValue(resp);
- return stalResp;
- }
- } catch (CancelledException cx) {
- log.debug("User cancelled request", cx);
- return new ErrorResponse(6001);
- } catch (SignatureCardException e) {
- log.info("Error while reading infobox: " + e);
- return new ErrorResponse(4000);
- }
- } else {
- log.fatal("Got unexpected STAL request: " + request);
- return new ErrorResponse(1000);
- }
- }
-
- @Override
- public boolean requireCard() {
- return true;
- }
-
- @Override
- public String providePIN(PINSpec spec, int retries) {
- if (retryCounter++ > 0) {
- log.info("PIN wrong retrying ...");
- gui.showCardPINRetryDialog(spec, retries, this, "ok", this, "cancel");
- } else {
- gui.showCardPINDialog(spec, this, "ok", this, "cancel");
- }
- waitForAction();
- if (actionCommand.equals("cancel")) {
- return null;
- }
- return new String(gui.getPin());
- }
-
- @Override
- public SMCCSTALRequestHandler newInstance() {
- return new InfoBoxReadRequestHandler();
- }
-}
+package at.gv.egiz.bku.smccstal;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import at.gv.egiz.smcc.CancelledException;
+import at.gv.egiz.smcc.PINProvider;
+import at.gv.egiz.smcc.PINSpec;
+import at.gv.egiz.smcc.SignatureCard;
+import at.gv.egiz.smcc.SignatureCardException;
+import at.gv.egiz.stal.ErrorResponse;
+import at.gv.egiz.stal.InfoboxReadRequest;
+import at.gv.egiz.stal.InfoboxReadResponse;
+import at.gv.egiz.stal.STALRequest;
+import at.gv.egiz.stal.STALResponse;
+
+public class InfoBoxReadRequestHandler extends AbstractRequestHandler implements
+ PINProvider {
+
+ private static Log log = LogFactory.getLog(InfoBoxReadRequestHandler.class);
+
+ private int retryCounter = 0;
+
+ @Override
+ public STALResponse handleRequest(STALRequest request) {
+ if (request instanceof InfoboxReadRequest) {
+ InfoboxReadRequest infoBox = (InfoboxReadRequest) request;
+ try {
+ if (infoBox.getInfoboxIdentifier().equals("IdentityLink")) {
+ newSTALMessage("Message.RequestCaption", "Message.IdentityLink");
+ log.debug("Handling identitylink infobox");
+ byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), this,
+ infoBox.getDomainIdentifier());
+ if (resp == null) {
+ log.info("Got null as result->user cancelled");
+ return new ErrorResponse(6001);
+ } else {
+ try {
+ resp = DomainIdConverter.convertDomainId(resp, infoBox
+ .getDomainIdentifier());
+ } catch (Exception e) {
+ log.error("Cannot convert domain specific id", e);
+ return new ErrorResponse(1000);
+ }
+ }
+ InfoboxReadResponse stalResp = new InfoboxReadResponse();
+ stalResp.setInfoboxValue(resp);
+ return stalResp;
+ } else if (SignatureCard.KeyboxName.CERITIFIED_KEYPAIR.equals(infoBox
+ .getInfoboxIdentifier())) {
+ newSTALMessage("Message.RequestCaption", "Message.CertifiedKeypair");
+ log.debug("Handling certified keypair infobox");
+ byte[] resp = card
+ .getCertificate(SignatureCard.KeyboxName.CERITIFIED_KEYPAIR);
+ if (resp == null) {
+ return new ErrorResponse(6001);
+ }
+ InfoboxReadResponse stalResp = new InfoboxReadResponse();
+ stalResp.setInfoboxValue(resp);
+ return stalResp;
+ } else if (SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR
+ .equals(infoBox.getInfoboxIdentifier())) {
+ newSTALMessage("Message.RequestCaption",
+ "Message.SecureSignatureKeypair");
+ log.debug("Handling secure signature keypair infobox");
+ byte[] resp = card
+ .getCertificate(SignatureCard.KeyboxName.SECURE_SIGNATURE_KEYPAIR);
+ if (resp == null) {
+ return new ErrorResponse(6001);
+ }
+ InfoboxReadResponse stalResp = new InfoboxReadResponse();
+ stalResp.setInfoboxValue(resp);
+ return stalResp;
+ } else {
+ newSTALMessage("Message.RequestCaption", "Message.InfoboxReadRequest");
+ log.warn("Unknown infobox identifier: "
+ + infoBox.getInfoboxIdentifier() + " trying generic request");
+ byte[] resp = card.getInfobox(infoBox.getInfoboxIdentifier(), this,
+ infoBox.getDomainIdentifier());
+ if (resp == null) {
+ return new ErrorResponse(6001);
+ }
+ InfoboxReadResponse stalResp = new InfoboxReadResponse();
+ stalResp.setInfoboxValue(resp);
+ return stalResp;
+ }
+ } catch (CancelledException cx) {
+ log.debug("User cancelled request", cx);
+ return new ErrorResponse(6001);
+ } catch (SignatureCardException e) {
+ log.info("Error while reading infobox: " + e);
+ return new ErrorResponse(4000);
+ }
+ } else {
+ log.fatal("Got unexpected STAL request: " + request);
+ return new ErrorResponse(1000);
+ }
+ }
+
+ @Override
+ public boolean requireCard() {
+ return true;
+ }
+
+ @Override
+ public String providePIN(PINSpec spec, int retries) {
+ if (retryCounter++ > 0) {
+ log.info("PIN wrong retrying ...");
+ gui.showCardPINRetryDialog(spec, retries, this, "ok", this, "cancel");
+ } else {
+ gui.showCardPINDialog(spec, this, "ok", this, "cancel");
+ }
+ waitForAction();
+ gui.showWaitDialog(null);
+ if (actionCommand.equals("cancel")) {
+ return null;
+ }
+ return new String(gui.getPin());
+ }
+
+ @Override
+ public SMCCSTALRequestHandler newInstance() {
+ return new InfoBoxReadRequestHandler();
+ }
+}
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 59eed55f..8f380eec 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
@@ -305,6 +305,7 @@ public abstract class SignRequestHandler extends AbstractRequestHandler implemen
}
do {
waitForAction();
+ gui.showWaitDialog(null);
if (actionCommand.equals("cancel")) {
return null;
} else if (actionCommand.equals("hashData")) {