Exists in FPC some example that demonstrates the use of TFPHTTPServer with HTTPS? The unique example that I have found is about TCustomHTTPApplication.
Mailing lists / fpc-pascal / 2022-08
TFPHTTPServer and HTTPS
7 messages · 4 people · –
- FFabio Luis Girardi 3
- MMichael Van Canneyt 2
- AAlexey Torgashin 1
- OOndrej Pokorny 1
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
Fabio Luis Girardi wroteExists in FPC some example that demonstrates the use of TFPHTTPServer with HTTPS? The unique example that I have found is about TCustomHTTPApplication.
There is no separate example.
Using https is just setting a property UseSSL := True, and include one of the
units that registers an SSL handler (opensslsockets or gnutlssockets)What more do you need ?
Michael.
Hi Michael!
Thanks for replying so fast.
You're telling me that is possible, so the remaining possibility is that I have a problem in my environment. Last question: FPC 3.2.2 can do that or I have to use trunk version?
Sorry for taking your time.
Em ter., 23 de ago. de 2022 às 17:05, Michael Van Canneyt via fpc-pascal <
Show quoted text 24 lines
You need to set your certificate details as well:
fServer.UseSSL := fUseSSL;
if fUseSSL then
begin
fServer.CertificateData.KeyPassword := fCertificatePassword;
fServer.CertificateData.HostName := fCertificateHostName;
fServer.CertificateData.Certificate.FileName := fCertificateFileName;
fServer.CertificateData.PrivateKey.FileName := fCertificatePrivateKey;
end;That should be sufficient. FPC 3.2.2 should do it.
Ondrej
Fabio Luis Girardi wrote 49 lines
You need to set your certificate details as well: fServer.UseSSL := fUseSSL;
I just saved this info to wiki:
https://wiki.freepascal.org/fphttpserver#Support_for_HTTPS
Hi!
Thanks Ondrej! With your orientation I was able to make a TFPHTTPServer working with HTTPS with FPC 3.2.2
Em ter., 23 de ago. de 2022 às 18:34, Alexey Torgashin via fpc-pascal <
Show quoted text 11 lines
I just saved this info to wiki: https://wiki.freepascal.org/fphttpserver#Support_for_HTTPS
Alexey Torgashin wrote 5 lines
Thank you. I added some more detail.
Michael.
