Forum > Packages and Libraries

How to do SNI when using TFPHTTPClient and opensslsockets


Without SSL, it is enough to supply the wanted domain via the Host parameter in the header, and I gather for SSL one includes the same request via the ":authority" header. Whichever way I try, I get a 400 HTTP response from my server. I suspect this is not the correct way to do it in FreePascal.

How should I do Server Name Identification with TFPHTTPClient?

Search for "SendHostAsSNI" in the FPC sources to see how this is done.

It seems as though TOpenSSLSocketHandler supports using SNI, but that TFPHTTPClient does not expose the ability to have a host name different from the address.


[0] Message Index

Go to full version