Examples of TrustManagerFactory


Examples of javax.net.ssl.TrustManagerFactory

                    trustStore.load(trustStoreFileInputStream, password.toCharArray());
                } finally {
                    IOHelper.close(trustStoreFileInputStream, "trustStore", log);
                }
   
                TrustManagerFactory trustMgrFactory = TrustManagerFactory.getInstance(algorithm);
                trustMgrFactory.init(trustStore);
               
                client.setTrustManager(trustMgrFactory.getTrustManagers()[0]);
            }
        }
       
        return client;
    }
View Full Code Here

Examples of javax.net.ssl.TrustManagerFactory

    }

    public TrustManager[] getTrustManager(String algorithm, char[] storePassword) throws KeystoreException {
        ensureLoaded(storePassword);
        try {
            TrustManagerFactory trustFactory = TrustManagerFactory.getInstance(algorithm);
            trustFactory.init(keystore);
            return trustFactory.getTrustManagers();
        } catch (KeyStoreException e) {
            throw new KeystoreException("Unable to retrieve trust manager in keystore '" + keystoreName + "'", e);
        } catch (NoSuchAlgorithmException e) {
            throw new KeystoreException("Unable to retrieve trust manager in keystore '" + keystoreName + "'", e);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.