public static SSLContext createSslContext(NettyTransportSslOptions options) throws Exception {
  try {
    String contextProtocol=options.getContextProtocol();
    LOG.trace("Getting SSLContext instance using protocol: {}",contextProtocol);
    SSLContext context=SSLContext.getInstance(contextProtocol);
    KeyManager[] keyMgrs=loadKeyManagers(options);
    TrustManager[] trustManagers=loadTrustManagers(options);
    context.init(keyMgrs,trustManagers,new SecureRandom());
    return context;
  }
 catch (  Exception e) {
    LOG.error("Failed to create SSLContext: {}",e,e);
    throw e;
  }
}

public static SSLContext createSslContext ( NettyTransportSslOptions options ) throws Exception { try { String contextProtocol = options . getContextProtocol ( ) ; LOG . trace ( "Getting SSLContext instance using protocol: {}" , contextProtocol ) ; SSLContext context = SSLContext . getInstance ( contextProtocol ) ; KeyManager [ ] keyMgrs = loadKeyManagers ( options ) ; TrustManager [ ] trustManagers = loadTrustManagers ( options ) ; context . init ( keyMgrs , trustManagers , new SecureRandom ( ) ) ; return context ; } catch ( Exception e ) { LOG . error ( "Failed to create SSLContext: {}" , e , e ) ; throw e ; } }
create a new sslcontext using the options specific in the given transportssloptions instance .
