public static TTransport getSSLSocket(String host, int port, int loginTimeout) throws TTransportException { // The underlying SSLSocket object is bound to host:port with the given SO_TIMEOUT TSocket tSSLSocket = TSSLTransportFactory.getClientSocket(host, port, loginTimeout); return getSSLSocketWithHttps(tSSLSocket); }
public static TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath, String trustStorePassWord) throws TTransportException { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(); params.setTrustStore(trustStorePath, trustStorePassWord); params.requireClientAuth(true); // The underlying SSLSocket object is bound to host:port with the given SO_TIMEOUT and // SSLContext created with the given params TSocket tSSLSocket = TSSLTransportFactory.getClientSocket(host, port, loginTimeout, params); return getSSLSocketWithHttps(tSSLSocket); }
public static TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath, String trustStorePassWord) throws TTransportException { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(); params.setTrustStore(trustStorePath, trustStorePassWord); params.requireClientAuth(true); // The underlying SSLSocket object is bound to host:port with the given SO_TIMEOUT and // SSLContext created with the given params TSocket tSSLSocket = TSSLTransportFactory.getClientSocket(host, port, loginTimeout, params); return getSSLSocketWithHttps(tSSLSocket); }
setTrustStore(cfg.sslTruststoreLocation, cfg.sslTruststorePassword); }}; socket = TSSLTransportFactory.getClientSocket(hostname, cfg.port, cfg.timeoutMS, params); } else { socket = new TSocket(hostname, cfg.port, cfg.timeoutMS);
/** * Get a default SSL wrapped TSocket connected to the specified host and port. * * @param host * @param port * @return A SSL wrapped TSocket * @throws TTransportException */ public static TSocket getClientSocket(String host, int port) throws TTransportException { return getClientSocket(host, port, 0); }
socket = new TSocket(cassandraHost.getHost(), cassandraHost.getPort(), timeout); else socket = TSSLTransportFactory.getClientSocket(cassandraHost.getHost(), cassandraHost.getPort(), timeout, params); } catch (TTransportException e) { throw new HectorTransportException("Could not get client socket: ", e);
socket = params == null ? new TSocket(cassandraHost.getHost(), cassandraHost.getPort(), timeout) : TSSLTransportFactory.getClientSocket(cassandraHost.getHost(), cassandraHost.getPort(), timeout, params); } catch (TTransportException e) { throw new HectorTransportException("Could not get client socket: ", e);
socket = params == null ? new TSocket(cassandraHost.getHost(), cassandraHost.getPort(), timeout) : TSSLTransportFactory.getClientSocket(cassandraHost.getHost(), cassandraHost.getPort(), timeout, params); } catch (TTransportException e) { throw new HectorTransportException("Could not get client socket: ", e);
public static TTransport getSSLSocket(String host, int port, int loginTimeout) throws TTransportException { return TSSLTransportFactory.getClientSocket(host, port, loginTimeout); }
public static TTransport getSSLSocket(String host, int port, int loginTimeout) throws TTransportException { return TSSLTransportFactory.getClientSocket(host, port, loginTimeout); }
transport = TSSLTransportFactory.getClientSocket(address.getHost(), address.getPort(), timeout); } else {
public static TTransport getSSLSocket(String host, int port, int loginTimeout) throws TTransportException { // The underlying SSLSocket object is bound to host:port with the given SO_TIMEOUT TSocket tSSLSocket = TSSLTransportFactory.getClientSocket(host, port, loginTimeout); return getSSLSocketWithHttps(tSSLSocket); }
private EntitlementThriftClient.Client getThriftClient() throws Exception { TSSLTransportFactory.TSSLTransportParameters param = new TSSLTransportFactory.TSSLTransportParameters(); param.setTrustStore(trustStore, trustStorePass); TTransport transport; transport = TSSLTransportFactory.getClientSocket(thriftHost, thriftPort, ProxyConstants.THRIFT_TIME_OUT, param); TProtocol protocol = new TBinaryProtocol(transport); return new EntitlementThriftClient.Client(protocol); } }
private EntitlementThriftClient.Client getThriftClient() throws Exception { TSSLTransportFactory.TSSLTransportParameters param = new TSSLTransportFactory.TSSLTransportParameters(); param.setTrustStore(trustStore, trustStorePass); TTransport transport; transport = TSSLTransportFactory.getClientSocket(thriftHost, thriftPort, ProxyConstants.THRIFT_TIME_OUT, param); TProtocol protocol = new TBinaryProtocol(transport); return new EntitlementThriftClient.Client(protocol); } }
public static TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath, String trustStorePassWord) throws TTransportException { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(); params.setTrustStore(trustStorePath, trustStorePassWord); params.requireClientAuth(true); return TSSLTransportFactory.getClientSocket(host, port, loginTimeout, params); }
public static TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath, String trustStorePassWord) throws TTransportException { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(); params.setTrustStore(trustStorePath, trustStorePassWord); params.requireClientAuth(true); return TSSLTransportFactory.getClientSocket(host, port, loginTimeout, params); }
@Override @SuppressWarnings("resource") public TTransport openTransport(String host, int port) throws Exception { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(protocol, cipherSuites); params.setTrustStore(truststore, truststorePassword); if (null != keystore) params.setKeyStore(keystore, keystorePassword); TTransport trans = TSSLTransportFactory.getClientSocket(host, port, SOCKET_TIMEOUT, params); return new TFramedTransport(trans, DEFAULT_MAX_FRAME_SIZE); }
public static TTransport getSSLSocket(String host, int port, int loginTimeout, String trustStorePath, String trustStorePassWord) throws TTransportException { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(); params.setTrustStore(trustStorePath, trustStorePassWord); params.requireClientAuth(true); // The underlying SSLSocket object is bound to host:port with the given SO_TIMEOUT and // SSLContext created with the given params TSocket tSSLSocket = TSSLTransportFactory.getClientSocket(host, port, loginTimeout, params); return getSSLSocketWithHttps(tSSLSocket); }
@Override public TTransport openTransport(String host, int port) throws Exception { TSSLTransportFactory.TSSLTransportParameters params = new TSSLTransportFactory.TSSLTransportParameters(protocol, cipherSuites); params.setTrustStore(truststore, truststorePassword); if (null != keystore) params.setKeyStore(keystore, keystorePassword); TTransport trans = TSSLTransportFactory.getClientSocket(host, port, SOCKET_TIMEOUT, params); int frameSize = 15 * 1024 * 1024; // 15 MiB return new TFramedTransport(trans, frameSize); }
private TSocket createTLSSocket(String host) throws TTransportException { ServerConfig config = ServerConfig.getInstance(); String[] cipherSuites = config.dbtls_cipher_suites.toArray(new String[]{}); TSSLTransportParameters sslParams = new TSSLTransportParameters("SSL", cipherSuites); if (!Utils.isEmpty(config.keystore)) { sslParams.setKeyStore(config.keystore, config.keystorepassword); } if (!Utils.isEmpty(config.truststore)) { sslParams.setTrustStore(config.truststore, config.truststorepassword); } return TSSLTransportFactory.getClientSocket(host, config.dbport, config.db_timeout_millis, sslParams); } // createTLSSocket