Mercurial > dive4elements > river
comparison flys-client/src/main/java/de/intevation/flys/client/server/GGInATrustStrategy.java @ 2949:abf267708672
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
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Wed, 11 Jul 2012 10:29:23 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
2948:83c962be0dde | 2949:abf267708672 |
---|---|
1 package de.intevation.flys.client.server; | |
2 | |
3 import java.security.cert.CertificateException; | |
4 import java.security.cert.X509Certificate; | |
5 | |
6 import org.apache.http.conn.ssl.TrustStrategy; | |
7 | |
8 public class GGInATrustStrategy implements TrustStrategy { | |
9 | |
10 /** | |
11 * Tempoary class to accept all certificates for GGinA Authentication | |
12 */ | |
13 | |
14 @Override | |
15 public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { | |
16 // FIXME validate Certificate | |
17 return true; | |
18 } | |
19 } | |
20 |