Sign in Join

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

Mailing lists / fpc-devel / 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

Ozz Nixon
to Michael Van Canneyt

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.
DXSock 5.0 SDS consisted of 406 components... includes: 52 Different Server Cores (TCP Protocols implemented as drop-in event-driven listeners)
21 Different Cached Logging Formats
CGI, ISAPI, WinCGI support (I never got into NSAPI or FastCGI) DXDataset* - High speed (complete Memory Dataset, with the ability to use sockets to receive structure and data in the background!) DXJavaScript (complete source) I paid $5,000 to have the original version built.
DXSock Client or Core Server Socket Component - DOES NOT use a thread to push/pull the socket like INDY/Winshoes/etc. so it is *MUCH* faster! A lot of components to Buffer performance of Winshock Web Server (which outperforms Apache and IIS, even after they went KERNEL based!) Supports SSI, SLEAY, OpenSSL, (I think the hooks are still in it for StrSecII), 3 different Threading Models, ISAPI Extension, ISAPI Filter, EMSI, ANSI, CRT, DLL Manager, FAT Caching, etc.

If the FPC team is interested, then I will dedicate all time needed to help you guys support all of the platforms FPC supports. (DXSock6 already does - but DXSock6 is licensed exclusively to my Modern Pascal script engine).

Thoughts???
Ozz

Reply by email

Michael Van Canneyt
to Ozz Nixon
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

Ozz Nixon
to Michael Van Canneyt

Yeah, I can see what you mean. I was just thinking how much better it would be for FPC to start leading the way in the socket world, instead of it has the tools and no one really knows about it, or how to use them.

If you have ideas Michael on how you and I can help on this area, I am interested! Modern Pascal is built 100% using FPC 3.0.4 now (was 2.6.4 forever). The script engine to compete with PHP is a native Apache_Mod (2.2 and 2.4 supported), CodeRunner is my equivalent to node.js (unlimited sockets, running scripts onConnect), grammar wise I implemented CHAIN (from Turbo Pascal 3.0) so a script can be lean and my JIT can process thousands of lines in less than 10ms. Then the standalone (CLI) is what I use to do all development, so I do not have to wait on recompiles - just code,run,fix,run,done. ;-) I am 1 compile bug away from porting Turbo Pascal 7.0.1 to FPC - 4 lines of assembly won't port, then I can compile 16bit DOS apps on my Mac or Linux Laptop (I still do a lot in the old BBS world and hate having to RDP to my Win32 stacks to code).

Let me know...
O.

Reply by email