001package co.codewizards.cloudstore.rest.client.ssl;
002
003import javax.net.ssl.HostnameVerifier;
004import javax.net.ssl.SSLSession;
005
006/**
007 * {@link HostnameVerifier} implementation allowing all host names.
008 * <p>
009 * We use a separate trust-store for every destination host + port. Additionally, we use self-signed certificates
010 * having the same common name for all servers. The user must verify himself and then explicitely accept every
011 * server certificate. Thus we do not to verify any host name and use this class allowing them all without any check.
012 * @author Marco หงุ่ยตระกูล-Schulze - marco at codewizards dot co
013 */
014public class HostnameVerifierAllowingAll implements HostnameVerifier {
015        @Override
016        public boolean verify(String name, SSLSession session) {
017                return true;
018        }
019}