Exemplo 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;
 }
Exemplo n.º 2
0
 private boolean shouldSendTlsFallbackIndicator(ConnectionSpec connectionSpec) {
   return connectionSpec != connectionSpecs.get(0) && connectionSpec.isTls();
 }
Exemplo n.º 3
0
 @Test
 public void cleartextBuilder() throws Exception {
   ConnectionSpec cleartextSpec = new ConnectionSpec.Builder(false).build();
   assertFalse(cleartextSpec.isTls());
 }