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 { 
            // FIXME: Using a static field to store the certificate chain is a 
            // bad idea. Instead 
            // create a CertificateException subclass and store the chain there. 
            try { 
                defaultTrustManager.checkServerTrusted(chain, authType); 
            } catch (CertificateException e) { 
                localTrustManager.checkServerTrusted(new X509Certificate[] { 
                }, authType); 
Experience pair programming with AI  Get Codota for Java