aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2014-05-13 14:00:17 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2014-05-13 14:00:17 +0200
commit0422c1070bb5d19f9198e90fe225b39d0c877854 (patch)
tree7ec7701048b508f62bbc434b40af498b694fb423 /id/server/idserverlib/src/main/java/at/gv
parentccdffe119df6380878625267810f5e9efe709de9 (diff)
downloadmoa-id-spss-0422c1070bb5d19f9198e90fe225b39d0c877854.tar.gz
moa-id-spss-0422c1070bb5d19f9198e90fe225b39d0c877854.tar.bz2
moa-id-spss-0422c1070bb5d19f9198e90fe225b39d0c877854.zip
add debug messages
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java56
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java9
2 files changed, 45 insertions, 20 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index 010aead55..b05c1494a 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -1167,27 +1167,27 @@ public class AuthenticationServer implements MOAIDAuthConstants {
Element domVsresp = null;
- try {
+// try {
// invokes the call
domVsresp = new SignatureVerificationInvoker()
.verifyXMLSignature(domVsreq);
// debug output
- } catch ( ServiceException e) {
- Logger.error("Signature verification error. ", e);
- Logger.error("Signed Data: " + session.getAuthBlock());
- try {
- Logger.error("VerifyRequest: " + DOMUtils.serializeNode(domVsreq));
- } catch (TransformerException e1) {
- e1.printStackTrace();
-
- } catch (IOException e1) {
- e1.printStackTrace();
-
- }
-
- throw e;
- }
+// } catch ( ServiceException e) {
+// Logger.error("Signature verification error. ", e);
+// Logger.error("Signed Data: " + session.getAuthBlock());
+// try {
+// Logger.error("VerifyRequest: " + DOMUtils.serializeNode(domVsreq));
+// } catch (TransformerException e1) {
+// e1.printStackTrace();
+//
+// } catch (IOException e1) {
+// e1.printStackTrace();
+//
+// }
+//
+// throw e;
+// }
// parses the <VerifyXMLSignatureResponse>
@@ -1217,9 +1217,27 @@ public class AuthenticationServer implements MOAIDAuthConstants {
// date and time
CreateXMLSignatureResponseValidator.getInstance().validateSigningDateTime(csresp);
- // compares the public keys from the identityLink with the AuthBlock
- VerifyXMLSignatureResponseValidator.getInstance().validateCertificate(
- vsresp, session.getIdentityLink());
+ try {
+ // compares the public keys from the identityLink with the AuthBlock
+ VerifyXMLSignatureResponseValidator.getInstance().validateCertificate(
+ vsresp, session.getIdentityLink());
+
+ } catch ( ValidateException e) {
+ Logger.error("Signature verification error. ", e);
+ Logger.error("Signed Data: " + session.getAuthBlock());
+ try {
+ Logger.error("VerifyRequest: " + DOMUtils.serializeNode(domVsreq));
+ Logger.error("VerifyResponse: " + DOMUtils.serializeNode(domVsresp));
+ } catch (TransformerException e1) {
+ e1.printStackTrace();
+
+ } catch (IOException e1) {
+ e1.printStackTrace();
+
+ }
+
+ throw e;
+ }
// post processing of the infoboxes
Iterator iter = session.getInfoboxValidatorIterator();
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java
index b69fdd9ab..4fd7fa965 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java
@@ -229,10 +229,17 @@ public class VerifyXMLSignatureResponseValidator {
if(ecdsakey.equals(ecdsaPubKeySignature))
found = true;
}
+
+// Logger.debug("IDL-Pubkey=" + idl.getPublicKey()[i].getClass().getName()
+// + " Resp-Pubkey=" + pubKeySignature.getClass().getName());
+
}
- if (!found)
+ if (!found) {
+
throw new ValidateException("validator.09", null);
+
+ }
}
}