B4J Question HTTPJob - Server chose TLSv1, but that protocol version is not enabled or not supported by the client.

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

I am using jOHttpUtils2 version 3.00.

I am sending an SOAP XML like:

B4X:
Dim j As HttpJob
        j.Initialize("", Me)
        j.PostString("https://website.com", requestSoapXML) 'requestSoapXML is my XML to post
        j.GetRequest.SetContentType("text/xml")
        Wait For (j) JobDone(j As HttpJob)

The above has been working for many years, but today it has failed.

I have no control over the remote side, so I am assuming something on the remote side has changed or the SSL on the remote side has an issue.

The error I get from the code above shows:
ResponseError. Reason: javax.net.ssl.SSLHandshakeException: Server chose TLSv1, but that protocol version is not enabled or not supported by the client.

Is there a way to accept all TLS versions in my code ?

I did see the thread: https://www.b4x.com/android/forum/t...putils2-and-accept-all-option.110673/#content
When I add HU2_ACCEPTALL to the Ctrl + B window it doesn't seem to fix the issue. (hope that is where I need to put it).

1672214572405.png


I can't seem to work out what I need to do to accept all ?
 
Last edited:

drgottjr

Expert
Licensed User
Longtime User
tlsv1 is old and deprecated. if your app is running on windows, i believe microsoft
has already disabled v1 and is planning on disabling 1.1 and 1.2 next year...
you might want to ask your server administrator if there has been a recent (inadvertant)
change and/or if they're really using v1.

my understanding of HU2_ACCEPTALL is that it does not check the validity of an
ssl cert (accepting, therefore, all certificates as valid). my understanding is that
such a check does not look at a particular protocol used in any case. it's handled
at the socket level.
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
tlsv1 is old and deprecated. if your app is running on windows, i believe microsoft
has already disabled v1 and is planning on disabling 1.1 and 1.2 next year...
you might want to ask your server administrator if there has been a recent (inadvertant)
change and/or if they're really using v1.
Yeah I know TLSv1 is old, I don't have access to the remote server but have asked the guy in charge to look into it.

Strange thing is if I use an older version of the B4J IDE (can't remember the version) and compile the app it works fine. Soon as I updated to the new B4J IDE then it doesn't work. So I am not sure if its the computer but maybe the way it complies in the IDE.

I am using B4J on my Mac in a VM (Windows 10 Pro).
Using B4J version 9.80
Running as non-GUI app

My production server is Linux Ubuntu 18.04 LTS and also Linux Ubuntu 22.04 LTS.
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
you could have mentioned something changed on your side instead of suggesting it was on the server side.
chrome (or maybe even safari) will tell you which version tls the server is running (eg, b4x.com = 1.3)
 
Upvote 0

aaronk

Well-Known Member
Licensed User
Longtime User
will tell you which version tls the server is running
TLS 1.0, AES with 256 bit encryption (High); ECDH with 256 bit exchange

you could have mentioned something changed on your side instead of suggesting it was on the server side.
I only assumed the remote server was the issue as I had made no changes to my code to cause the issue.

I can only assume it was the IDE now after testing it in more detail today since that is the only thing I have changed in the past few weeks. From what I can tell the IDE now disables TLS 1.0.

I am now trying to work out how to use TLS 1.0 even knowing its not supported anymore as this server is using TLS 1.0 until they decide to update it.
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
test:
 
Upvote 0
Top