aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--id/moa-spss-container/pom.xml6
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java77
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java20
-rw-r--r--repository/MOA/spss/common/3.1.2/common-3.1.2.jarbin0 -> 205464 bytes
-rw-r--r--repository/MOA/spss/server/moa-sig-lib/3.1.2/moa-sig-lib-3.1.2.jarbin0 -> 362340 bytes
-rw-r--r--repository/MOA/spss/tsl_lib/2.0.1/tsl_lib-2.0.1.jarbin0 -> 803996 bytes
6 files changed, 55 insertions, 48 deletions
diff --git a/id/moa-spss-container/pom.xml b/id/moa-spss-container/pom.xml
index d66a09621..84c3b2f29 100644
--- a/id/moa-spss-container/pom.xml
+++ b/id/moa-spss-container/pom.xml
@@ -47,7 +47,7 @@
<dependency>
<groupId>MOA.spss.server</groupId>
<artifactId>moa-sig-lib</artifactId>
- <version>3.1.1</version>
+ <version>3.1.2</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
@@ -65,12 +65,12 @@
<dependency>
<groupId>MOA.spss</groupId>
<artifactId>common</artifactId>
- <version>3.1.1</version>
+ <version>3.1.2</version>
</dependency>
<dependency>
<groupId>MOA.spss</groupId>
<artifactId>tsl_lib</artifactId>
- <version>2.0.0</version>
+ <version>2.0.1</version>
</dependency>
<dependency>
<groupId>iaik.prod</groupId>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
index d5ca89656..d2d39e9e6 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java
@@ -52,10 +52,7 @@ import org.w3c.dom.Document;
import org.w3c.dom.Element;
import at.gv.egovernment.moa.id.auth.exception.ServiceException;
-import at.gv.egovernment.moa.id.commons.api.AuthConfiguration;
import at.gv.egovernment.moa.id.commons.api.ConnectionParameterInterface;
-import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException;
-import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory;
import at.gv.egovernment.moa.spss.MOAException;
import at.gv.egovernment.moa.spss.api.SignatureVerificationService;
import at.gv.egovernment.moa.spss.api.cmsverify.VerifyCMSSignatureRequest;
@@ -64,7 +61,6 @@ import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser;
import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder;
import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureRequest;
import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
-import at.gv.egovernment.moa.util.MiscUtil;
import at.gv.egovernment.moaspss.logging.Logger;
/**
@@ -93,22 +89,22 @@ public class SignatureVerificationInvoker {
}
private SignatureVerificationInvoker() {
- try {
- AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance();
- ConnectionParameterInterface authConnParam = authConfigProvider.getMoaSpConnectionParameter();
+// try {
+// AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance();
+// ConnectionParameterInterface authConnParam = authConfigProvider.getMoaSpConnectionParameter();
- if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) {
-
-
- } else {
+// if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) {
+//
+//
+// } else {
svs = SignatureVerificationService.getInstance();
- }
+// }
- } catch (ConfigurationException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
+// } catch (ConfigurationException e) {
+// // TODO Auto-generated catch block
+// e.printStackTrace();
+// }
}
@@ -144,35 +140,34 @@ public class SignatureVerificationInvoker {
protected Element doCall(QName serviceName, Element request) throws ServiceException {
ConnectionParameterInterface authConnParam = null;
try {
- AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance();
- authConnParam = authConfigProvider.getMoaSpConnectionParameter();
- //If the ConnectionParameter do NOT exist, we try to get the api to work....
- if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) {
-
- throw new ServiceException("service.00", new Object[]{"MOA-SP connection via Web-Service is not allowed any more!!!!!!"});
-// Service service = ServiceFactory.newInstance().createService(serviceName);
-// Call call = service.createCall();
-// SOAPBodyElement body = new SOAPBodyElement(request);
-// SOAPBodyElement[] params = new SOAPBodyElement[] { body };
-// Vector responses;
-// SOAPBodyElement response;
+// AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance();
+// authConnParam = authConfigProvider.getMoaSpConnectionParameter();
+// //If the ConnectionParameter do NOT exist, we try to get the api to work....
+// if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) {
//
-// Logger.debug("Connecting using auth url: " + authConnParam.getUrl() + ", service " + serviceName.getNamespaceURI() + " : " + serviceName.getLocalPart() + " : "+ serviceName.getPrefix());
-// call.setTargetEndpointAddress(authConnParam.getUrl());
-// responses = (Vector) call.invoke(serviceName, params);
-// Logger.debug("Got responses: " + responses.size()); // TODO handle axis 302 response when incorrect service url is used
-// response = (SOAPBodyElement) responses.get(0);
-// return response.getAsDOM();
- }
- else {
- VerifyXMLSignatureRequest vsrequest = new VerifyXMLSignatureRequestParser().parse(request);
-
+// throw new ServiceException("service.00", new Object[]{"MOA-SP connection via Web-Service is not allowed any more!!!!!!"});
+//// Service service = ServiceFactory.newInstance().createService(serviceName);
+//// Call call = service.createCall();
+//// SOAPBodyElement body = new SOAPBodyElement(request);
+//// SOAPBodyElement[] params = new SOAPBodyElement[] { body };
+//// Vector responses;
+//// SOAPBodyElement response;
+////
+//// Logger.debug("Connecting using auth url: " + authConnParam.getUrl() + ", service " + serviceName.getNamespaceURI() + " : " + serviceName.getLocalPart() + " : "+ serviceName.getPrefix());
+//// call.setTargetEndpointAddress(authConnParam.getUrl());
+//// responses = (Vector) call.invoke(serviceName, params);
+//// Logger.debug("Got responses: " + responses.size()); // TODO handle axis 302 response when incorrect service url is used
+//// response = (SOAPBodyElement) responses.get(0);
+//// return response.getAsDOM();
+// }
+// else {
+ VerifyXMLSignatureRequest vsrequest = new VerifyXMLSignatureRequestParser().parse(request);
VerifyXMLSignatureResponse vsresponse = svs.verifyXMLSignature(vsrequest);
- Document result = new VerifyXMLSignatureResponseBuilder().build(vsresponse);
-
+ Document result = new VerifyXMLSignatureResponseBuilder(true).build(vsresponse);
+
//Logger.setHierarchy("moa.id.auth");
return result.getDocumentElement();
- }
+// }
}
catch (Exception ex) {
if (authConnParam != null) {
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java
index b54a43fff..0fba2d3f6 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/VerifyXMLSignatureResponseParser.java
@@ -46,12 +46,11 @@
package at.gv.egovernment.moa.id.auth.parser;
-import iaik.utils.Base64InputStream;
-import iaik.x509.X509Certificate;
-
import java.io.ByteArrayInputStream;
import java.io.InputStream;
+import org.joda.time.DateTime;
+import org.joda.time.format.ISODateTimeFormat;
import org.w3c.dom.Element;
import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse;
@@ -59,7 +58,10 @@ import at.gv.egovernment.moa.id.auth.exception.ParseException;
import at.gv.egovernment.moa.id.commons.api.data.IVerifiyXMLSignatureResponse;
import at.gv.egovernment.moa.util.Constants;
import at.gv.egovernment.moa.util.DOMUtils;
+import at.gv.egovernment.moa.util.MiscUtil;
import at.gv.egovernment.moa.util.XPathUtils;
+import iaik.utils.Base64InputStream;
+import iaik.x509.X509Certificate;
/**
* Parses a <code>&lt;VerifyXMLSignatureResponse&gt;</code> returned by
@@ -115,6 +117,9 @@ public class VerifyXMLSignatureResponseParser {
private static final String CERTIFICATE_CHECK_CODE_XPATH =
ROOT + MOA + "CertificateCheck/" + MOA + "Code";
+ private static final String SIGNING_TIME_XPATH =
+ ROOT + MOA + "SigningTime";
+
/** This is the root element of the XML-Document provided by the Security Layer Card*/
private Element verifyXMLSignatureResponse;
@@ -200,7 +205,14 @@ public class VerifyXMLSignatureResponseParser {
if (signatureManifestCheckCode != null) {
respData.setSignatureManifestCheckCode(new Integer(signatureManifestCheckCode).intValue());
}
- respData.setCertificateCheckCode(new Integer(XPathUtils.getElementValue(verifyXMLSignatureResponse,CERTIFICATE_CHECK_CODE_XPATH,"")).intValue());
+ respData.setCertificateCheckCode(new Integer(XPathUtils.getElementValue(verifyXMLSignatureResponse,CERTIFICATE_CHECK_CODE_XPATH,"")).intValue());
+
+ String signingTimeElement = XPathUtils.getElementValue(verifyXMLSignatureResponse,SIGNING_TIME_XPATH,"");
+ if (MiscUtil.isNotEmpty(signingTimeElement)) {
+ DateTime datetime = ISODateTimeFormat.dateTimeNoMillis().parseDateTime(signingTimeElement);
+ respData.setSigningDateTime(datetime.toDate());
+
+ }
}
catch (Throwable t) {
throw new ParseException("parser.01", null, t);
diff --git a/repository/MOA/spss/common/3.1.2/common-3.1.2.jar b/repository/MOA/spss/common/3.1.2/common-3.1.2.jar
new file mode 100644
index 000000000..332681971
--- /dev/null
+++ b/repository/MOA/spss/common/3.1.2/common-3.1.2.jar
Binary files differ
diff --git a/repository/MOA/spss/server/moa-sig-lib/3.1.2/moa-sig-lib-3.1.2.jar b/repository/MOA/spss/server/moa-sig-lib/3.1.2/moa-sig-lib-3.1.2.jar
new file mode 100644
index 000000000..fe08d2d1a
--- /dev/null
+++ b/repository/MOA/spss/server/moa-sig-lib/3.1.2/moa-sig-lib-3.1.2.jar
Binary files differ
diff --git a/repository/MOA/spss/tsl_lib/2.0.1/tsl_lib-2.0.1.jar b/repository/MOA/spss/tsl_lib/2.0.1/tsl_lib-2.0.1.jar
new file mode 100644
index 000000000..39e52dfee
--- /dev/null
+++ b/repository/MOA/spss/tsl_lib/2.0.1/tsl_lib-2.0.1.jar
Binary files differ