title: Disabling SSL checking for Spring web-client
body: <p>The following code is what I am using to try and build a web client instance that can talk to a https server with an invalid certificate.</p>
  <pre><code>SslContext sslContext = SslContextBuilder
          .forClient()
          .trustManager(InsecureTrustManagerFactory.INSTANCE)
          .build();
      HttpClient httpClient = HttpClient
          .create()
          .secure(sslContextSpec -&gt; sslContextSpec.sslContext(sslContext));
      ClientHttpConnector connector = new ReactorClientHttpConnector(httpClient);
      WebClient client = WebClient
          .builder()
          .clientConnector(connector)
          // ... 
          .build();
  </code></pre>
  <p>The purpose of this is to make the web client not check the ssl however when ran the JVM crashes with an error &quot;javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure&quot;. Could someone please point me into the right direction as previous SO posts dont seem to fix the problem and lead to the same handshake error.</p>