Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2019-01

SSL socket support rework & HTTPS support in FPC HTTP Server.

4 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Michael Van Canneyt

Hello,

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.

Michael.

Reply by email

Sven Barth
to Michael Van Canneyt

Am Sa., 5. Jan. 2019, 13:42 hat Michael Van Canneyt via lazarus <

Show quoted text 8 lines
geschrieben: Hello, 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.

Awesome!

Say, is it possible to switch an existing Socket over to SSL? (I know that it is in principle possible, but I wonder whether we have the API for it) An example would be XMPP which starts unencrypted, but then switches the same socket over to encrypted when both sides agree.

Regards,
Sven

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20190105/f1512190/attachment.html>

Reply by email

Michael Van Canneyt
to Sven Barth
Sven Barth wrote 16 lines
Am Sa., 5. Jan. 2019, 13:42 hat Michael Van Canneyt via lazarus < > geschrieben: > > Hello, > > 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. > Awesome! Say, is it possible to switch an existing Socket over to SSL? (I know that it is in principle possible, but I wonder whether we have the API for it) An example would be XMPP which starts unencrypted, but then switches the same socket over to encrypted when both sides agree.

Yes, this should be possible.
The handshake is a separate call, which can be done at any time.

Michael.

Reply by email

Michael Van Canneyt
Ozz Nixon wrote 7 lines
I am glad to hear this... last night, I actually came across my last release of DXSock Server Development Suite source. Is it possible for me to donate my source to the FPC and Lazarus project with two stipulations? 1. Naming of the Code stays the same (c) and author... and the source cannot be used with the Delphi compiler. 2. Any commercial products built with it requires a license of the source for $99 a year.

Although I personally am of course interested in seeing a powerful sockets suite distributed in FPC, I'm afraid we cannot start distributing things which have 'special' licensing conditions.

However, what you could try to do is add it to the lazarus online package manager system.

(or, when Joost is finished, the fppkg based one.)

Michael.

Reply by email