aboutsummaryrefslogtreecommitdiff
path: root/id/server
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2009-09-17 09:45:46 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2009-09-17 09:45:46 +0000
commitafa2a5ca9f92e81b594e8f29d9588d5e8690fba8 (patch)
tree62a2e8614da1af13c5947c29f31599cba6097fe8 /id/server
parent3c966e678f54bd31805641fa184bb9d0a6503d59 (diff)
downloadmoa-id-spss-afa2a5ca9f92e81b594e8f29d9588d5e8690fba8.tar.gz
moa-id-spss-afa2a5ca9f92e81b594e8f29d9588d5e8690fba8.tar.bz2
moa-id-spss-afa2a5ca9f92e81b594e8f29d9588d5e8690fba8.zip
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1145 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server')
-rw-r--r--id/server/auth/pom.xml4
-rw-r--r--id/server/idserverlib/pom.xml4
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java34
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java40
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java25
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java8
-rw-r--r--id/server/pom.xml4
-rw-r--r--id/server/proxy/pom.xml4
8 files changed, 70 insertions, 53 deletions
diff --git a/id/server/auth/pom.xml b/id/server/auth/pom.xml
index 6d5a5538e..e24b3273b 100644
--- a/id/server/auth/pom.xml
+++ b/id/server/auth/pom.xml
@@ -2,14 +2,14 @@
<parent>
<groupId>MOA.id</groupId>
<artifactId>moa-id</artifactId>
- <version>1.4.5</version>
+ <version>1.4.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-auth</artifactId>
<packaging>war</packaging>
- <version>1.4.5</version>
+ <version>1.4.6</version>
<name>MOA ID-Auth WebService</name>
<properties>
diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml
index c046b1f19..c0f704522 100644
--- a/id/server/idserverlib/pom.xml
+++ b/id/server/idserverlib/pom.xml
@@ -2,14 +2,14 @@
<parent>
<groupId>MOA.id</groupId>
<artifactId>moa-id</artifactId>
- <version>1.4.5</version>
+ <version>1.4.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-lib</artifactId>
<packaging>jar</packaging>
- <version>1.4.5</version>
+ <version>1.4.6</version>
<name>MOA ID API</name>
<properties>
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
index a742a0aae..7f0dfe509 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/DefaultConnectionBuilder.java
@@ -19,21 +19,22 @@ import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URL;
-import at.gv.egovernment.moa.util.URLEncoder; //java.net.URLEncoder;
import java.util.Iterator;
import java.util.Vector;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import javax.servlet.http.HttpServletRequest;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
-import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
-//import com.sun.net.ssl.HostnameVerifier;
-//import com.sun.net.ssl.HttpsURLConnection;
/**
* Defaultimplementierung von <code>ConnectionBuilder</code>.
@@ -97,13 +98,14 @@ public class DefaultConnectionBuilder implements ConnectionBuilder {
//conn.setAllowUserInteraction(true);
conn.setInstanceFollowRedirects(false);
- // JSSE-Abhängigkeit
- /*if (conn instanceof HttpsURLConnection && sslSocketFactory != null) {
+ // JSSE Abhängigkeit
+ if (conn instanceof HttpsURLConnection && sslSocketFactory != null) {
HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
httpsConn.setSSLSocketFactory(sslSocketFactory);
if (cbDisableHostnameVerification)
httpsConn.setHostnameVerifier(new HostnameNonVerifier());
- }*/
+ }
+
return conn;
}
@@ -155,15 +157,19 @@ public class DefaultConnectionBuilder implements ConnectionBuilder {
*/
// JSSE Abhängigkeit
- //private class HostnameNonVerifier implements HostnameVerifier {
-
+ private class HostnameNonVerifier implements HostnameVerifier {
+
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+
+
/**
* @see com.sun.net.ssl.HostnameVerifier#verify(String, String)
*/
-//JSSE Abhängigkeit
-// public boolean verify(String arg0, String arg1) {
-// return true;
-// }
-// }
+ /*public boolean verify(String arg0, String arg1) {
+ return true;
+ }*/
+ }
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java
index c8c1e85d9..6810c9223 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java
@@ -18,17 +18,15 @@ package at.gv.egovernment.moa.id.proxy;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
-
-import com.ibm.webdav.HTTPHeaders;
-import com.ibm.webdav.protocol.URLStreamHandlerFactory;
-import com.ibm.webdav.protocol.http.WebDAVURLConnection;
-import java.util.StringTokenizer;
import java.net.URL;
-import at.gv.egovernment.moa.util.URLEncoder; //java.net.URLEncoder;
import java.net.URLStreamHandler;
import java.util.Iterator;
+import java.util.StringTokenizer;
import java.util.Vector;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import javax.servlet.http.HttpServletRequest;
@@ -37,9 +35,10 @@ import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.BoolUtils;
+import at.gv.egovernment.moa.util.URLEncoder;
+
+import com.ibm.webdav.protocol.http.WebDAVURLConnection;
-//import com.sun.net.ssl.HostnameVerifier;
-//import com.sun.net.ssl.HttpsURLConnection;
/**
* Defaultimplementierung von <code>ConnectionBuilder</code>.
@@ -199,12 +198,12 @@ public class ElakConnectionBuilder implements ConnectionBuilder {
webDavConn.setAllowUserInteraction(true);
webDavConn.setInstanceFollowRedirects(false);
// JSSE Abhängigkeit
-// if (conn instanceof HttpsURLConnection && sslSocketFactory != null) {
-// HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
-// httpsConn.setSSLSocketFactory(sslSocketFactory);
-// if (cbDisableHostnameVerification)
-// httpsConn.setHostnameVerifier(new HostnameNonVerifier());
-// }
+ if (conn instanceof HttpsURLConnection && sslSocketFactory != null) {
+ HttpsURLConnection httpsConn = (HttpsURLConnection) conn;
+ httpsConn.setSSLSocketFactory(sslSocketFactory);
+ if (cbDisableHostnameVerification)
+ httpsConn.setHostnameVerifier(new HostnameNonVerifier());
+ }
return conn;
}
@@ -253,15 +252,20 @@ public class ElakConnectionBuilder implements ConnectionBuilder {
* Hostname Verification Check
*/
//JSSE Abhängigkeit
-// private class HostnameNonVerifier implements HostnameVerifier {
+ private class HostnameNonVerifier implements HostnameVerifier {
- /**
+ public boolean verify(String hostname, SSLSession session) {
+ // TODO Auto-generated method stub
+ return true;
+ }
+ /**
* @see com.sun.net.ssl.HostnameVerifier#verify(String, String)
*/
-//JSSE Abhängigkeit
// public boolean verify(String arg0, String arg1) {
// return true;
// }
-// }
+
+
+ }
}
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java
index 9ce1e3c8e..4af2561b2 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/EnhancedConnectionBuilder.java
@@ -21,20 +21,19 @@ import java.net.URLStreamHandler;
import java.util.Iterator;
import java.util.Vector;
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocketFactory;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSession;
+import HTTPClient.HTTPConnection;
+import HTTPClient.HttpURLConnection;
import at.gv.egovernment.moa.id.config.ConfigurationException;
import at.gv.egovernment.moa.id.config.proxy.ProxyConfigurationProvider;
import at.gv.egovernment.moa.id.util.MOAIDMessageProvider;
import at.gv.egovernment.moa.logging.Logger;
import at.gv.egovernment.moa.util.BoolUtils;
-//import com.sun.net.ssl.HostnameVerifier;
-import HTTPClient.HttpURLConnection;
-import HTTPClient.HTTPConnection;
-
/**
* Outlook Web Access (OWA) Implementierung von <code>ConnectionBuilder</code>.
@@ -161,17 +160,21 @@ public class EnhancedConnectionBuilder implements ConnectionBuilder {
* Hostname Verification Check
*/
// JSSE Abhängigkeit
- //private class HostnameNonVerifier implements HostnameVerifier {
+ private class HostnameNonVerifier implements HostnameVerifier {
- /**
+ /**
* @see com.sun.net.ssl.HostnameVerifier#verify(String, String)
*/
- // JSSE Abhängigkeit
-// public boolean verify(String arg0, String arg1) {
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+
+// public boolean verify(String arg0, String arg1) {
// return true;
// }
-// }
-//
+
+ }
+
/**
* Removes parameters from the query-URL recursively
*
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java
index bf38c40d9..e287e7118 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/SSLUtils.java
@@ -20,6 +20,7 @@ import iaik.pki.PKIException;
import iaik.pki.PKIFactory;
import iaik.pki.PKIProfile;
import iaik.pki.jsse.IAIKX509TrustManager;
+import iaik.security.provider.IAIK;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
@@ -69,8 +70,11 @@ public class SSLUtils {
public static void initialize() {
sslSocketFactories = new HashMap();
// JSSE Abhängigkeit
-// Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
-// System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+ //Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
+ Security.addProvider(new IAIK());
+ //System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");
+
+
}
/**
diff --git a/id/server/pom.xml b/id/server/pom.xml
index 497243114..32c345d6a 100644
--- a/id/server/pom.xml
+++ b/id/server/pom.xml
@@ -4,14 +4,14 @@
<parent>
<groupId>MOA</groupId>
<artifactId>id</artifactId>
- <version>1.4.5</version>
+ <version>1.4.6</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>MOA.id</groupId>
<artifactId>moa-id</artifactId>
<packaging>pom</packaging>
- <version>1.4.5</version>
+ <version>1.4.6</version>
<name>MOA ID Server</name>
<modules>
diff --git a/id/server/proxy/pom.xml b/id/server/proxy/pom.xml
index da63b2d55..5bc7f77ae 100644
--- a/id/server/proxy/pom.xml
+++ b/id/server/proxy/pom.xml
@@ -2,7 +2,7 @@
<parent>
<groupId>MOA.id</groupId>
<artifactId>moa-id</artifactId>
- <version>1.4.5</version>
+ <version>1.4.6</version>
</parent>
<properties>
@@ -13,7 +13,7 @@
<groupId>MOA.id.server</groupId>
<artifactId>moa-id-proxy</artifactId>
<packaging>war</packaging>
- <version>1.4.5</version>
+ <version>1.4.6</version>
<name>MOA ID-Proxy WebService</name>
<build>