Topic: Problem With SSL When Using HTTPGetFile Function
Hi Dmitri and MVD users,
I've run into a problem that I hope someone can help to resolve.
I am using the HTTPGetFile() function to try to download a file from a website.
I have added the latest OpenSSL DLL file to my application folder as required to connect to an HTTPS URL, but I am getting the following error message:
Error conecting with SSL
error:1408F10B:SSL
routines:SSL3_GET_RECORD:wrong version number
From searching on the web, it seems that this is caused by the client not using the correct version of SSL as the server, and the suggested solution is apparently to set the correct version manually by setting the relevant properties of the library to:
SSLOptions.Method := sslvSSLv3;
SSLOptions.SSLVersions := [sslvSSLv3];
However, this assumes that we are directly using the relevant libraries/objects in the DLL files from our code, but in this case I am using the provided function which I assume wraps the protocol version stuff already which doesn't seem to be able to be changed manually.
How can I overcome or work around this problem?
EDIT: I have just double checked the site info and found that apparently the encryption being used is stated as:
(TLS_AES_128_GCM_SHA256, 128 bit keys, TLS 1.3).
So it may be that it is reversed of what I have above in that MVD is using SSLv3, but the site does not support this so I may have to use TLS instead somehow, Not sure if this helps or makes the problem more confusing...
Again, any help would be great. Cheers.