Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #39941

Re: I disable SSL/TLS verification but I get "Fatal (HANDSHAKE_FAILURE): no cipher suites in common"

From Arne Vajhøj <arne@vajhoej.dk>
Newsgroups comp.lang.java.programmer
Subject Re: I disable SSL/TLS verification but I get "Fatal (HANDSHAKE_FAILURE): no cipher suites in common"
Date 2023-03-31 15:55 -0400
Organization A noiseless patient Spider
Message-ID <u07ds9$1i0bo$1@dont-email.me> (permalink)
References <9539c949-f193-4d36-8f14-88f9babdcc43n@googlegroups.com>

Show all headers | View raw


On 3/31/2023 3:51 PM, mike wrote:
> I have add the following to disable SSL verification when I download files ( since it is in a testenv).
> 
> This is the code:

> 			TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {
> 
> 				@Override
> 				public java.security.cert.X509Certificate[] getAcceptedIssuers() {
> 					return new X509Certificate[0];
> 				}
> 
> 				@Override
> 				public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) {// NOSONAR
> 					// Do nothing
> 				}
> 
> 				@Override
> 				public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) {// NOSONAR
> 					// Do nothing
> 				}
> 			} };
> 
> 			// Install the all-trusting trust manager
> 			SSLContext sc = SSLContext.getInstance("SSL");// NOSONAR
> 			sc.init(null, trustAllCerts, new java.security.SecureRandom());
> 			HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());

> javax.net.ssl|ERROR|1B|qtp1311315651-27|2023-03-31 17:17:00.703 CEST|TransportContext.java:345|Fatal (HANDSHAKE_FAILURE): no cipher suites in common (
> "throwable" : {
>    javax.net.ssl.SSLHandshakeException: no cipher suites in common
> 
> Why do I get this when I trust all certificates?

This error does not mean that the certificate was not accepted - it
means that client and server could not agree on algorithms.

Probably the server and client are very far apart age wise.

Crazy guess try:

SSLContext.getInstance("TLSv1.2")

Arne

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

I disable SSL/TLS verification but I get "Fatal (HANDSHAKE_FAILURE): no cipher suites in common" mike <mikaelpetterson@hotmail.com> - 2023-03-31 12:51 -0700
  Re: I disable SSL/TLS verification but I get "Fatal (HANDSHAKE_FAILURE): no cipher suites in common" Arne Vajhøj <arne@vajhoej.dk> - 2023-03-31 15:55 -0400
    Re: I disable SSL/TLS verification but I get "Fatal (HANDSHAKE_FAILURE): no cipher suites in common" Stas Markov <stasmarkov88@gmail.com> - 2023-11-14 04:20 -0800

csiph-web