• Register
Welcome to Kodlogs, programming questions and answer website.
0 votes
11 views

Problem :

Has anyone faced this error before? I am new to SSL
javax.net.ssl.sslexception: received fatal alert: protocol_version
by (6.9k points)  

1 Answer

0 votes

Solution :

I found bellow solution to your SSL Cert issue

java.lang.System.setProperty("https.protocols", "TLSv1,TLSv1.1,TLSv1.2");

This is necessary with Java 7 and a TLSv1.2 site.

I checked the site with:

openssl s_client -connect www.st.nmfs.noaa.gov:443

using

openssl version
OpenSSL 1.0.2l  25 May 2017

and got the result:

...
SSL-Session:
   Protocol  : TLSv1.2
   Cipher    : ECDHE-RSA-AES256-GCM-SHA384
...

Please note that older openssl version on my mac did not work so I had to use the macports one.

Further Readings:

by (20.3k points)  
...