aboutsummaryrefslogtreecommitdiff
path: root/id/server/moa-id-commons/src/main
diff options
context:
space:
mode:
authorThomas Lenz <tlenz@iaik.tugraz.at>2019-05-24 12:23:41 +0200
committerThomas Lenz <tlenz@iaik.tugraz.at>2019-05-24 12:23:41 +0200
commitac531e30d13d6714e2ac61f7329e6adc130aa288 (patch)
tree2dbaa63a8d5197bd038e8d6b3f72ddc44c6590a4 /id/server/moa-id-commons/src/main
parent996774dbf06b037d9f843e57a2cfac9bcc111a51 (diff)
downloadmoa-id-spss-ac531e30d13d6714e2ac61f7329e6adc130aa288.tar.gz
moa-id-spss-ac531e30d13d6714e2ac61f7329e6adc130aa288.tar.bz2
moa-id-spss-ac531e30d13d6714e2ac61f7329e6adc130aa288.zip
untested switch to EAAF-components 1.0.7
Diffstat (limited to 'id/server/moa-id-commons/src/main')
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/IVerifiyXMLSignatureResponse.java1
-rw-r--r--id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/X509Utils.java62
2 files changed, 0 insertions, 63 deletions
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/IVerifiyXMLSignatureResponse.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/IVerifiyXMLSignatureResponse.java
index 08dfcae71..b08a49895 100644
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/IVerifiyXMLSignatureResponse.java
+++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/IVerifiyXMLSignatureResponse.java
@@ -156,6 +156,5 @@ public interface IVerifiyXMLSignatureResponse {
Date getSigningDateTime();
- void setSigningDateTime(Date signingDateTime);
} \ No newline at end of file
diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/X509Utils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/X509Utils.java
deleted file mode 100644
index 026b1a5fb..000000000
--- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/X509Utils.java
+++ /dev/null
@@ -1,62 +0,0 @@
-package at.gv.egovernment.moa.id.commons.utils;
-
-import java.security.cert.X509Certificate;
-import java.util.List;
-
-import javax.security.auth.x500.X500Principal;
-
-public class X509Utils {
-
- /**
- * Sorts the Certificate Chain by IssuerDN and SubjectDN. The [0]-Element should be the Hostname,
- * the last Element should be the Root Certificate.
- *
- * @param certs
- * The first element must be the correct one.
- * @return sorted Certificate Chain
- */
- public static List<X509Certificate> sortCertificates(
- List<X509Certificate> certs)
- {
- int length = certs.size();
- if (certs.size() <= 1)
- {
- return certs;
- }
-
- for (X509Certificate cert : certs)
- {
- if (cert == null)
- {
- throw new NullPointerException();
- }
- }
-
- for (int i = 0; i < length; i++)
- {
- boolean found = false;
- X500Principal issuer = certs.get(i).getIssuerX500Principal();
- for (int j = i + 1; j < length; j++)
- {
- X500Principal subject = certs.get(j).getSubjectX500Principal();
- if (issuer.equals(subject))
- {
- // sorting necessary?
- if (i + 1 != j)
- {
- X509Certificate tmp = certs.get(i + 1);
- certs.set(i + 1, certs.get(j));
- certs.set(j, tmp);
- }
- found = true;
- }
- }
- if (!found)
- {
- break;
- }
- }
-
- return certs;
- }
-}