Code example for X509TrustManager

Methods: checkClientTrusted

            return trustManager;
        public void checkClientTrusted(X509Certificate[] chain, String authType)
        throws CertificateException { 
            defaultTrustManager.checkClientTrusted(chain, authType);
        public void checkServerTrusted(X509Certificate[] chain, String authType)
        throws CertificateException { 
            try { 
            	/* erst den localTrustManager nehmen, da selbst signierte Zert. der Normalfall 
            	 * sein werden 
                localTrustManager.checkServerTrusted(new X509Certificate[] {chain[0]}, authType);
            } catch (CertificateException e) {
                defaultTrustManager.checkServerTrusted(chain, authType);
            if (!DomainNameChecker.match(chain[0], mHost)) {
Connect your IDE to all the code out there  Get Codota for Java