[fpc-devel] SSL socket support rework & HTTPS support in FPC HTTP Server.
Michael Van Canneyt
michael at freepascal.org
Sat Jan 5 13:42:20 CET 2019
I've reworked the SSL support of the FPC native sockets support.
It is now pluggable, which means you don't need OpenSSL any more.
This also means that from now on you must add "opensslsockets" to the uses clause
of your program if you want to compile in OpenSSL support.
By default, no SSL support is compiled in, and you will get an error whenever you attempt to
use SSL if you did not add this unit to your uses clause.
I intend to commit a Gnu TLS implementation of SSL sockets support later today.
When that is committed, you will have the choice.
You could make it even a run-time choice if you so desire, all libraries
are loaded dynamically.
I have also deprecated the use of AnsiString as memory buffers,
it now uses TBytes everywhere. (To avoid possible encoding conversion problems)
At the same time, I have added support for SSL to the FPC HTTP Server.
So it is now possible to create a FPC HTTP Server that supports SSL.
The simpleserver example has been changed to show how it works.
It can work with certificate files on disk (self-signed or not)
or the http server can generate a self-signed certificate when it starts,
which will then be used throughout the lifetime of the server.
More information about the fpc-devel