Package com.sun.net.ssl

Examples of com.sun.net.ssl.X509TrustManager


    }

    public SunSSLTransportFactory(Properties properties)
    throws GeneralSecurityException
    {
        X509TrustManager trustManager;
        HostnameVerifier hostnameVerifier;
        SSLContext sslContext;

        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
View Full Code Here


            }
            return factorySingleton;
        }

        private static TrustManager[] trustManagers() {
            X509TrustManager tm = new X509TrustManager() {
                public X509Certificate[] getAcceptedIssuers() {
                    return new X509Certificate[0];
                }

                public boolean isClientTrusted(X509Certificate[] chain) {
View Full Code Here

    }

    protected void checkTrusted(Object trustManager, X509Certificate[] chain,
                                String authType)
        throws CertificateException {
        X509TrustManager tm = (X509TrustManager) trustManager;
        boolean result = tm.isServerTrusted(chain);
        if (!result) {
            throw new CertificateException("commons-ssl java13 mode: certificate chain not trusted");
        }
    }
View Full Code Here

            }
        }
        if (trustManagers != null) {
            for (int i = 0; i < trustManagers.length; i++) {
                if (trustManagers[i] instanceof X509TrustManager) {
                    X509TrustManager tm = (X509TrustManager) trustManagers[i];
                    trustManagers[i] = new Java13TrustManagerWrapper(tm, tc, ssl);
                }
            }
        }
        context.init(keyManagers, trustManagers, null);
View Full Code Here

    }

    public SunSSLTransportFactory(Properties properties)
    throws GeneralSecurityException
    {
        X509TrustManager trustManager;
        HostnameVerifier hostnameVerifier;
        SSLContext sslContext;

        Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
View Full Code Here

TOP

Related Classes of com.sun.net.ssl.X509TrustManager

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.