annotate gwt-client/src/main/java/org/dive4elements/river/client/server/GGInATrustStrategy.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 809c91beee54
children
rev   line source
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
1 /* Copyright (C) 2011, 2012, 2013 by Bundesanstalt für Gewässerkunde
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
2 * Software engineering by Intevation GmbH
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
3 *
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
4 * This file is Free Software under the GNU AGPL (>=v3)
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY! Check out the
5993
ea9eef426962 Removed trailing whitespace.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5861
diff changeset
6 * documentation coming with Dive4Elements River for details.
5861
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
7 */
172338b1407f GWT client: Added copyright header.
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5838
diff changeset
8
5835
821a02bbfb4e Fixed internal java dependencies
Sascha L. Teichmann <teichmann@intevation.de>
parents: 5834
diff changeset
9 package org.dive4elements.river.client.server;
2949
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
10
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
11 import java.security.cert.CertificateException;
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
12 import java.security.cert.X509Certificate;
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
13
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
14 import org.apache.http.conn.ssl.TrustStrategy;
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
15
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
16 public class GGInATrustStrategy implements TrustStrategy {
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
17
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
18 /**
6198
809c91beee54 CapabilitesParser can parse map format types now (#554).
Christian Lins <christian.lins@intevation.de>
parents: 5993
diff changeset
19 * Temporary class to accept all certificates for GGinA Authentication.
2949
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
20 */
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
21
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
22 @Override
8856
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6198
diff changeset
23 public boolean isTrusted(
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6198
diff changeset
24 X509Certificate[] chain,
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6198
diff changeset
25 String authType
5e38e2924c07 Fix code style.
Tom Gottfried <tom@intevation.de>
parents: 6198
diff changeset
26 ) throws CertificateException {
2949
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
27 // FIXME validate Certificate
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
28 return true;
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
29 }
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
30 }
abf267708672 Add a TrustStategy to be able to ignore SSL Certificate issues with GGinA
Bjoern Ricks <bjoern.ricks@intevation.de>
parents:
diff changeset
31

http://dive4elements.wald.intevation.org