/** * Constructor * * @param exchange */ public CampBXBaseService(Exchange exchange) { super(exchange); ClientConfig config = getClientConfig(); // campbx server raises "internal error" if connected via these protocol versions config.setSslSocketFactory(CertHelper.createRestrictedSSLSocketFactory("TLSv1", "TLSv1.1")); this.campBX = RestProxyFactory.createProxy( CampBX.class, exchange.getExchangeSpecification().getSslUri(), config); } }
/** * Constructor * * @param exchange */ public CampBXBaseService(Exchange exchange) { super(exchange); ClientConfig config = getClientConfig(); // campbx server raises "internal error" if connected via these protocol versions config.setSslSocketFactory(CertHelper.createRestrictedSSLSocketFactory("TLSv1", "TLSv1.1")); this.campBX = RestProxyFactory.createProxy( CampBX.class, exchange.getExchangeSpecification().getSslUri(), config); } }
@BeforeClass public static void setup() { setLoggerLevel("batm", "trace"); setLoggerLevel("si.mazi.rescu","trace"); ClientConfig config = new ClientConfig(); config.setHttpReadTimeout(readTimeout); try { SSLContext sslcontext = SSLContext.getInstance("TLS"); sslcontext.init(null, null, null); final CompatSSLSocketFactory socketFactory = new CompatSSLSocketFactory(sslcontext.getSocketFactory()); config.setSslSocketFactory(socketFactory); config.setIgnoreHttpErrorCodes(true); }catch(KeyManagementException kme) { log.error("", kme); } catch (NoSuchAlgorithmException nae) { log.error("", nae); } api = RestProxyFactory.createProxy(IBitgoAPI.class, "https://test.bitgo.com/api", config); }