Java tutorial
/******************************************************************************* * Copyright (c) 2014 Matthieu Helleboid. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * Matthieu Helleboid - initial API and implementation ******************************************************************************/ package org.piwigo.remotesync.api.client; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import org.apache.http.conn.ssl.TrustStrategy; public class TrustSSLCertificatesStrategy implements TrustStrategy { @Override public boolean isTrusted(X509Certificate[] chain, String authType) throws CertificateException { return true; } }