[fpc-pascal] TFPHTTPServer and HTTPS
Ondrej Pokorny
lazarus at kluug.net
Tue Aug 23 22:36:33 CEST 2022
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
Am 23.08.2022 um 22:26 schrieb Fabio Luis Girardi via fpc-pascal:
> 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 <fpc-pascal at lists.freepascal.org> escreveu:
>
>
>
> On Tue, 23 Aug 2022, Fabio Luis Girardi via fpc-pascal wrote:
>
> > Exists 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.
>
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
>
>
>
> --
> The best regards,
>
> Fabio Luis Girardi
> PascalSCADA Project
> http://sourceforge.net/projects/pascalscada
> http://www.pascalscada.com
>
> _______________________________________________
> fpc-pascal maillist -fpc-pascal at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20220823/f286e797/attachment.htm>
More information about the fpc-pascal
mailing list