# HG changeset patch # User Bjoern Ricks # Date 1342002563 0 # Node ID abf267708672eaa65c2e976c42ac810394602be8 # Parent 83c962be0ddebfbd53e6d4b4c2f2ee7993affba3 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA This class should be removed later or its isTrusted method must be implemented. It's a security risc to accept alle ssl certificates for ggina. flys-client/trunk@4926 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 83c962be0dde -r abf267708672 flys-client/ChangeLog --- a/flys-client/ChangeLog Wed Jul 11 10:11:04 2012 +0000 +++ b/flys-client/ChangeLog Wed Jul 11 10:29:23 2012 +0000 @@ -1,3 +1,8 @@ +2012-07-11 Björn Ricks + + * src/main/java/de/intevation/flys/client/server/GGInATrustStrategy.java: + Add a TrustStrategy to be able to accept all SSL certificates. + 2012-07-11 Björn Ricks * src/main/java/de/intevation/flys/client/server/was/User.java: diff -r 83c962be0dde -r abf267708672 flys-client/src/main/java/de/intevation/flys/client/server/GGInATrustStrategy.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/flys-client/src/main/java/de/intevation/flys/client/server/GGInATrustStrategy.java Wed Jul 11 10:29:23 2012 +0000 @@ -0,0 +1,20 @@ +package de.intevation.flys.client.server; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import org.apache.http.conn.ssl.TrustStrategy; + +public class GGInATrustStrategy implements TrustStrategy { + + /** + * Tempoary class to accept all certificates for GGinA Authentication + */ + + @Override + public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { + // FIXME validate Certificate + return true; + } +} +