Code example for SSLEngine

Methods: setUseClientMode

0
 
        try{ 
            sslc = SSLContext.getInstance("TLS");
            sslc.init(null,null,null);
            ssle = sslc.createSSLEngine();
            ssle.setUseClientMode(true);
        } 
        catch(Exception exception){
            throw new RuntimeException("SSL engine initialization failed");
        } 
    } 
 
 
    public abstract LogentriesConnectionSocketFactory getConnectionSocketFactory(); 
 
    protected abstract LogentriesChannelInitializer connectionModeChannelInitializer(); 
 
 
    protected LogentriesConnectionMode(boolean ssl, boolean debug) {
        this.ssl = ssl;
        this.debug = debug;