title: Does SignalR Java client supports TLS 1.2?
body: <p>In an Android project, I'd like to use SignalR, and protect the communication. Right now the test server is set up on Azure (SignalR Service + App Service). Azure doesn't support TLS 1.3 yet, and probably the final server we'll use in production too will have only TLS 1.2.</p>
  
  <p>Is the Java client for SignalR supports TLS 1.2? If so, how can I enable it?</p>
  
  <p>When I change the hub URL to starts with <code>https</code>, I get an error:</p>
  
  <pre><code>Connection failed to start: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7c42a3fac0: Failure in SSL library, usually a protocol error
      error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER (external/boringssl/src/ssl/tls_record.cc:239 0x7c405330ab:0x00000000)
  </code></pre>
  
  <p>I found that the <a href="https://github.com/SignalR/java-client/blob/f226631da562cfaacbe8b16d5a9ecbf8205e7c99/signalr-client-sdk/src/microsoft/aspnet/signalr/client/Connection.java#L31" rel="nofollow noreferrer">old SignalR Java client</a> supported only TLS 1.3, but this repository is archived, and <a href="https://github.com/aspnet/AspNetCore/tree/master/src/SignalR/clients/java/signalr/src/main/java/com/microsoft/signalr" rel="nofollow noreferrer">in the new client</a> I can't find any limitation on the protocol version.</p>
  
  <p>If TLS 1.2 is supported in the newer version, why do I get this error?</p>
  
  <p>The phone I'm testing on has Android API level 25. Relevant parts of the Gradle configuration:</p>
  
  <pre><code>android {
      compileSdkVersion 29
      buildToolsVersion "29.0.2"
      defaultConfig {
          minSdkVersion 16 // Also tried with 20+
          targetSdkVersion 29
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
  }
  dependencies {
      implementation 'com.microsoft.signalr:signalr:3.0.0'
  }
  </code></pre>