Forum > Packages and Libraries

How to do SNI when using TFPHTTPClient and opensslsockets

(1/1)

BrassGear:
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?

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

BrassGear:
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.

Navigation

[0] Message Index

Go to full version