I re-installed to a newly named directory. and I get ppu impompatible for Interfacebase.
If you reinstalled to a different directory you should check all the paths. Is your previous installation still in the same place. (Try renaming that old directory to Lazarus.old or something). And last you could try Tools>Rescan FPC directory.
From lazarus EXE all is fine.
I do not have the libeay32 and ssleay32 in the same directory of the laz. EXE, therefore the laz. EXE *must* load it from windows\system32 (where they were since long) and all works.
Laz. EXE...?? Are you talking about a Lazarus executable or a Lazarus dll?
You should put your Lazarus .dll, your Delphi .exe and both libeay32 and ssleay32 all in the same directory and it should work ok.
Now, using my own dll (YOUR code, nothing to do with the ssl dll) in a delphi app, I get the error (SslCtxNew(SslMethodV23) returns Nil, which I assume is because the function is not found in the dll).
I tried the 2 dll you suggested, same result.
I even did an FC on the synapse sources (in Lazarus and in Delphi): there are no differences.
ALL seems to be IDENTICAL except the result (which is the only thing that matters)
I've never tried creating a DLL in Lazarus so I'm not sure why it wouldn't work. Let's get some facts in a row:
Are you running outside of the Lazarus IDE? Then libeay32 and ssleay32 could just be placed in whatever .exe you run. In this case your Delphi .exe but since you call a Lazarus .dll with that they should be in that directory. But as said before, the easiest way is to all have them in the same directory.
Your Lazarus dll with authentication together with a
Lazarus application? Does that work?
If Lazarus application with your Lazarus dll works correctly I'll need to look at the DLL-code and the way it is called.
Now, using my own dll (YOUR code, nothing to do with the ssl dll) in a delphi app, I get the error (SslCtxNew(SslMethodV23) returns Nil, which I assume is because the function is not found in the dll).
This could also be the result of the correct DLL not being loaded. The SslCtxNew function first checks InitSSLInterface to see if SSL-dlls are loaded. You could check yourself after this call with IsSSLloaded is it is loaded. If it is not loaded when calling your DLL from Delphi but it does load when called from a Lazarus .exe which calls your DLL, this would be very strange.
(I was planning to convert this code to Delphi sometime in the future but that doesn't help you now )