Esempio n. 1
0
 /** Prepares the connection specs to attempt. */
 private void resetConnectionSpecs() {
   connectionSpecs = new ArrayList<ConnectionSpec>();
   List<ConnectionSpec> specs = address.getConnectionSpecs();
   for (int i = 0, size = specs.size(); i < size; i++) {
     ConnectionSpec spec = specs.get(i);
     if (request.isHttps() == spec.isTls()) {
       connectionSpecs.add(spec);
     }
   }
   nextSpecIndex = 0;
 }
Esempio n. 2
0
 private boolean shouldSendTlsFallbackIndicator(ConnectionSpec connectionSpec) {
   return connectionSpec != connectionSpecs.get(0) && connectionSpec.isTls();
 }
Esempio n. 3
0
 @Test
 public void cleartextBuilder() throws Exception {
   ConnectionSpec cleartextSpec = new ConnectionSpec.Builder(false).build();
   assertFalse(cleartextSpec.isTls());
 }