• Post Reply Bookmark Topic Watch Topic
  • New Topic

javax.net.ssl.SSLException: Received fatal alert: protocol_version  RSS feed

 
A Kao
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JDK is 1.7.0.
Setting "https.protocols" to "TLSv1" still got "javax.net.ssl.SSLException: Received fatal alert: protocol_version".



The Windows 7 DOS console output was as follow:
...
[write] MD5 and SHA1 hashes:  len = 182
...                                
main, WRITE: TLSv1 Handshake, length = 182
[Raw write]: length = 187
...
[Raw read]: length = 5
0000: 15 03 01 00 02                                     .....
[Raw read]: length = 2
0000: 02 46                                              .F
main, READ: TLSv1 Alert, length = 2
main, RECV TLSv1 ALERT:  fatal, protocol_version
main, called closeSocket()
main, handling exception: javax.net.ssl.SSLException: Received fatal alert: protocol_version
javax.net.ssl.SSLException: Received fatal alert: protocol_version
****** Content of the URL ********
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at HttpsClient.print_https_cert(HttpsClient.java:50)
at HttpsClient.testIt(HttpsClient.java:31)
at HttpsClient.main(HttpsClient.java:13)
javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at HttpsClient.print_content(HttpsClient.java:83)
at HttpsClient.testIt(HttpsClient.java:34)
at HttpsClient.main(HttpsClient.java:13)
Caused by: javax.net.ssl.SSLException: Received fatal alert: protocol_version
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at HttpsClient.print_https_cert(HttpsClient.java:50)
at HttpsClient.testIt(HttpsClient.java:31)
... 1 more
 
Tim Moores
Saloon Keeper
Posts: 3893
91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are you trying to achieve by setting that property?
 
A Kao
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:What are you trying to achieve by setting that property?

I got "javax.net.ssl.SSLException: Received fatal alert: protocol_version" without setting the property "https.protocols".
Therefore I set the property "https.protocols" but still got the same error.
 
Tim Moores
Saloon Keeper
Posts: 3893
91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which SSL/TLS protocols does the server support?
 
A Kao
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tim Moores wrote:Which SSL/TLS protocols does the server support?

TLSv1
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!