Solution: I found that the DateTime handling in the DLL was mixed up and had to be rewritten to form the dynamic URL
Hi,
I am going NUTS... over Indy and their OpenSSL....
I am trying to create a DLL which collects some JSON data from a website, I have got to work perfectly on numerous of other sites, however, this sites really got got my brains out...
If I create this app an run it directly as an EXE with only this changed in the
SSLOptions.Method := sslvTLSv1_2 and
SSLOptions.Versions := [sslvTLSv1_2] to the IdSSLIOHandlerSocketOpenSSL it works perfectly
but as DLL
NOT:
function CreateSSLHandler: TIdSSLIOHandlerSocketOpenSSL;
var
SSL_org: TIdSSLIOHandlerSocketOpenSSL;
begin
SSL_org := TIdSSLIOHandlerSocketOpenSSL.Create(nil);
SSL_org.IPVersion := Id_IPv4;
SSL_org.MaxLineAction := maException;
SSL_org.MaxLineLength := 16384;
SSL_org.Port := 0;
SSL_org.ReadTimeout := -1;
SSL_org.ReuseSocket := rsOSDependent;
SSL_org.SendBufferSize := 32768;
SSL_org.SSLOptions.Method := sslvTLSv1_2;
SSL_org.SSLOptions.Mode := sslmUnassigned;
SSL_org.SSLOPtions.SSLVersions := [sslvTLSv1_2];
SSL_org.SSLOptions.VerifyDepth := 0;
SSL_org.UseNagle := True;
CreateSSLHandler := SSL_org;
end;
function CreateHTTP: TIdHTTP;
var
HTTP_org: TIdHTTP;
begin
HTTP_org := TIdHTTP.Create(nil);
HTTP_org.IOHandler := CreateSSLHandler;
HTTP_org.Request.ContentType := 'text/html';
HTTP_org.AllowCookies := True;
HTTP_org.ProxyParams.BasicAuthentication := False;
HTTP_org.ProxyParams.ProxyPort := 0;
HTTP_org.Request.ContentLength := -1;
HTTP_org.Request.ContentRangeEnd := -1;
HTTP_org.Request.ContentRangeStart := -1;
HTTP_org.Request.ContentRangeInstanceLength := -1;
HTTP_org.Request.Date := 0;
HTTP_org.Request.Expires := 0;
HTTP_org.Request.LastModified := 0;
HTTP_org.Request.Accept := 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
HTTP_org.Request.BasicAuthentication := False;
HTTP_org.Request.UserAgent := 'My Custom UserAgent';
HTTP_org.Request.Ranges.Units := 'bytes';
HTTP_org.HTTPOptions := [hoForceEncodeParams];
HTTP_org.ProtocolVersion := pv1_1;
CreateHTTP := HTTP_org;
end;
It's exactly the same settings as in the EXE file .. which works
I am getting desperate ....