Code example for X509TrustManager

Methods: checkClientTrusted

0
                trustManager = new SecureX509TrustManager(host);
                mTrustManager.put(host, trustManager);
            } 
 
            return trustManager;
        } 
 
        public void checkClientTrusted(X509Certificate[] chain, String authType)
                throws CertificateException { 
            defaultTrustManager.checkClientTrusted(chain, authType);
        } 
 
        public void checkServerTrusted(X509Certificate[] chain, String authType)
                throws CertificateException { 
            // FIXME: Using a static field to store the certificate chain is a 
            // bad idea. Instead 
            // create a CertificateException subclass and store the chain there. 
            TrustManagerFactory.setLastCertChain(chain);
            try { 
                defaultTrustManager.checkServerTrusted(chain, authType);
            } catch (CertificateException e) {