Code example for SSLContext

Methods: init

0
        trustManagerFactory.init(trustStore);
        trustManagers=trustManagerFactory.getTrustManagers();
 
        SecureRandom secureRandom=_secureRandomAlgorithm==null?null:SecureRandom.getInstance(_secureRandomAlgorithm);
        SSLContext context=_provider==null?SSLContext.getInstance(_protocol):SSLContext.getInstance(_protocol,_provider);
        context.init(keyManagers,trustManagers,secureRandom);
        return context;
    } 
 
    /** 
     * Simple bundle of information that is cached in the SSLSession. Stores the 
     * effective keySize and the client certificate chain. 
     */ 
    private class CachedInfo 
    { 
        private X509Certificate[] _certs;
        private Integer _keySize;
 
        CachedInfo(Integer keySize, X509Certificate[] certs)
        { 
Experience pair programming with AI  Get Codota for Java