Delphi 10.4

I compiled my complete project using SParkle and Indy with Delphi 10.4 and get an error 


SSL Error EOF encountered violating the protocol

iI can break it down to the server side. Servers compiled with 10.3 run perfectly. I used the TMS source that I used in 10.3 without modification. This is how I initialize SSL: 

    SecureServer := TIndySparkleHTTPServer.create(nil);
    SecureServer.DefaultPort := SecurePort;
    // Initialize SSL with self signed certificate
    SSLHandler := TIdServerIOHandlerSSLOpenSSL.create(SecureServer);
    SSLHandler.SSLOptions.CertFile := SharedVals.ServerPath + 'appcert.pem';
    SSLHandler.SSLOptions.RootCertFile := SharedVals.ServerPath + 'approot.pem';
    SSLHandler.SSLOptions.KeyFile := SharedVals.ServerPath + 'appkey.pem';
    SSLHandler.SSLOptions.Method := sslvSSLv23;
    SecureServer.IOHandler := SSLHandler;

ANy help is very appreciated!

Hello Michael,

It looks like an Indy issue. When using Indy, Sparkle/XDAta doesn't handle any low-level HTTP requests or SSL, all is delegated to Indy. Have you tried to install the Patch 1 available for Delphi 10.4?

I could solve it, it still is strange as it goes back to a change Indy introduced 2018 and It worked perfectly with 10.3 until I upgraded to 10.4.


Here is the link to the SO question and answer. 

https://stackoverflow.com/questions/62068537/delphi-indy-ssl-error-after-migrating-to-10-4-sydney/62235425#62235425
1 Like

Thank you for letting us know.