From aebb5cd04d43b25b8d65237ba49fddf5f5dd1a8c Mon Sep 17 00:00:00 2001 From: kstranacher Date: Tue, 7 Jul 2009 14:27:40 +0000 Subject: git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1114 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../iaik/config/RevocationConfigurationImpl.java | 4 +++ .../moa/id/proxy/DefaultConnectionBuilder.java | 23 ++++++++++------- .../moa/id/proxy/ElakConnectionBuilder.java | 29 ++++++++++++---------- .../moa/id/proxy/EnhancedConnectionBuilder.java | 16 ++++++------ .../at/gv/egovernment/moa/id/util/SSLUtils.java | 5 ++-- 5 files changed, 46 insertions(+), 31 deletions(-) (limited to 'id/server/idserverlib/src/main') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java index 6f4de4ce1..cedaf2ccc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/iaik/config/RevocationConfigurationImpl.java @@ -48,4 +48,8 @@ public class RevocationConfigurationImpl extends ObservableImpl implements Revoc return false; } + public Integer getCrlRetentionInterval(String arg0) { + return null; + } + } 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 34a1f389b..a742a0aae 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 @@ -32,8 +32,8 @@ 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 com.sun.net.ssl.HttpsURLConnection; +//import com.sun.net.ssl.HostnameVerifier; +//import com.sun.net.ssl.HttpsURLConnection; /** * Defaultimplementierung von ConnectionBuilder. @@ -96,12 +96,14 @@ public class DefaultConnectionBuilder implements ConnectionBuilder { //conn.setUseCaches(false); //conn.setAllowUserInteraction(true); conn.setInstanceFollowRedirects(false); - 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; } @@ -151,14 +153,17 @@ public class DefaultConnectionBuilder implements ConnectionBuilder { * A private class to change the standard HostName verifier to disable the * Hostname Verification Check */ - private class HostnameNonVerifier implements HostnameVerifier { + + // JSSE Abhängigkeit + //private class HostnameNonVerifier implements HostnameVerifier { /** * @see com.sun.net.ssl.HostnameVerifier#verify(String, String) */ - public boolean verify(String arg0, String arg1) { - return true; - } - } +//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/ElakConnectionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/proxy/ElakConnectionBuilder.java index bc39044ac..c8c1e85d9 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 @@ -38,8 +38,8 @@ 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 com.sun.net.ssl.HttpsURLConnection; +//import com.sun.net.ssl.HostnameVerifier; +//import com.sun.net.ssl.HttpsURLConnection; /** * Defaultimplementierung von ConnectionBuilder. @@ -198,12 +198,13 @@ public class ElakConnectionBuilder implements ConnectionBuilder { //conn.setUseCaches(false); webDavConn.setAllowUserInteraction(true); webDavConn.setInstanceFollowRedirects(false); - if (conn instanceof HttpsURLConnection && sslSocketFactory != null) { - HttpsURLConnection httpsConn = (HttpsURLConnection) conn; - httpsConn.setSSLSocketFactory(sslSocketFactory); - if (cbDisableHostnameVerification) - httpsConn.setHostnameVerifier(new HostnameNonVerifier()); - } + // JSSE Abhängigkeit +// if (conn instanceof HttpsURLConnection && sslSocketFactory != null) { +// HttpsURLConnection httpsConn = (HttpsURLConnection) conn; +// httpsConn.setSSLSocketFactory(sslSocketFactory); +// if (cbDisableHostnameVerification) +// httpsConn.setHostnameVerifier(new HostnameNonVerifier()); +// } return conn; } @@ -251,14 +252,16 @@ public class ElakConnectionBuilder implements ConnectionBuilder { * A private class to change the standard HostName verifier to disable the * Hostname Verification Check */ - private class HostnameNonVerifier implements HostnameVerifier { +//JSSE Abhängigkeit +// private class HostnameNonVerifier implements HostnameVerifier { /** * @see com.sun.net.ssl.HostnameVerifier#verify(String, String) */ - public boolean verify(String arg0, String arg1) { - return true; - } - } +//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 49affe745..9ce1e3c8e 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 @@ -31,7 +31,7 @@ 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 com.sun.net.ssl.HostnameVerifier; import HTTPClient.HttpURLConnection; import HTTPClient.HTTPConnection; @@ -160,16 +160,18 @@ public class EnhancedConnectionBuilder implements ConnectionBuilder { * A private class to change the standard HostName verifier to disable the * Hostname Verification Check */ - private class HostnameNonVerifier implements HostnameVerifier { + // JSSE Abhängigkeit + //private class HostnameNonVerifier implements HostnameVerifier { /** * @see com.sun.net.ssl.HostnameVerifier#verify(String, String) */ - public boolean verify(String arg0, String arg1) { - return true; - } - } - + // JSSE Abhängigkeit +// 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 5f8e95925..bf38c40d9 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 @@ -68,8 +68,9 @@ public class SSLUtils { */ public static void initialize() { sslSocketFactories = new HashMap(); - Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider()); - System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol"); + // 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"); } /** -- cgit v1.2.3