Sample projects for StreamSec Tools, built and tested with Delphi 13 (RAD Studio 37.0).
These are the demos only. StreamSec Tools itself — the runtime units, the packages, the design-time components — is licensed separately and is not part of this repository. Nothing here will compile until you have it installed.
- Evaluating? The trial is a DCU-only build for Win32 and Win64, Delphi XE3 through Delphi 13: Download StreamSec Tools 4.x on www.streamsec.com.
- Already a customer? Registered user downloads are on www.streamsec.net, which is also the support forum.
Setup, once:
- Install StreamSec Tools and build/install its packages (
StrSecIV370and the design-timeDStrSecIV370) in the IDE. - Make sure the library's
Sourcedirectory is on the IDE's library path (Tools ▸ Options ▸ Language ▸ Delphi ▸ Library). - Open any
.dprojhere and build.
The demo projects carry no search path of their own into the library and do not list library units as project members, so this repository works wherever you clone it and does not encode where your copy of the library happens to live.
Look at a demo's .dpr and you will find algorithm and format units in the
uses clause that no line of the demo's own code refers to:
uses
Forms,
BaseMain in '..\BaseMain.pas' {frmBaseMain},
stMD2,
stMD5,
stSHA1,
stSHA256,
stSHA512,
stWhirlpool,
stRipeMD160,
HashTestMain in 'HashTestMain.pas' {frmMain};They are not clutter, and removing them breaks the program. Each one
registers itself from its initialization section — RegisterHashClass,
RegisterCipherClass, RegisterRandomGenerator, RegisterDSIArith,
RegisterFormat — and Delphi links a unit, and therefore runs that
initialization, only when something names it in a uses clause. Drop the unit
from the .dpr and the algorithm or format is simply not there at run time.
The build stays green; the failure arrives later, as a hash, cipher, key format
or certificate format the library reports it does not have.
Dropping a component on a form is not enough. To pull in what a component needs, right-click it in the designer and choose "Suggest required units". The component reports the units its configuration requires and the expert adds them to the project. Doing this is a normal, frequently necessary step when you build your own applications with StreamSec Tools — not something peculiar to these demos.
What was removed from the demos here is only the file path the expert wrote
next to each unit. The expert takes that path from
HKCU\Software\StreamSec\StreamSec Tools\SourcePath, so it pointed at the
machine that last ran it. The unit names are untouched, and when you run the
expert in your own project it will fill in paths right for your installation.
Every demo that needs a certificate expects one you generated yourself. The
generators are in Tools\:
| Project | Produces | Used by |
|---|---|---|
Tools\TLSDemoCert |
root.pfx/root.cer, Server.pfx/Server.cer |
the TLS demos (incl. the Indy, Synapse and IntraWeb ones) |
Tools\MailDemoCertGen |
the S/MIME test certificates | Demos\Mail, Demos\MailServer |
Tools\PdfDemoAssetGen |
signer.pfx and the sample documents |
Demos\PDF |
Build and run the relevant tool, then copy its output next to the demo that
reads it. .gitignore refuses key material by extension, so a generated
Server.pfx will not be committed by accident.
The ACME demo (Demos\ACME) obtains its own certificate at run time; point it
at a local Pebble server, or pass a
directory URL, root and domain on the command line.
.res files are not tracked. Delphi recreates a project's own .res when the
project is opened, and the hand-written resource scripts — AppResources.rc
under Demos\StreamSecWebServer and its AdminClient — are compiled by the
build.bat next to them with brcc32. Those two build.bat files expect
STREAMSEC_SOURCE to point at your library Source directory.
Most demos need only the library and the RTL/VCL. These need more:
Demos\Indy10,Demos\TLS\Indy— Indy 10 (ships with RAD Studio).Demos\TLS\Synapse— Ararat Synapse. Two projects:httpdemo(client) andhttpsserv(server).- FMXLinux, for the
Linux64target only — free from GetIt (Tools ▸ GetIt Package Manager, search for FMXLinux). Six demos are FMX GUI applications that listLinux64among their platforms, and FMX does not render on Linux without it:CipherStream,EntropyEstimation(the FMX project),SSH\SFTP Client,SSH\SFTP Server,SSH\Tunnel Client,SSH\Tunnel Server. Their Win32 and Win64 targets need nothing extra.
Demos\TLS\Indy also carries design-time IO-handler packages for older Delphi
versions (…D23 … …D29); on Delphi 13 you want the …D37 pair.
Demos\TLS\DirectTLSLinuxTest— itsTstResourceFilecomponents used to carry an embedded PFX. They are empty here; point them at theServer.pfxandroot.ceryou generate withTools\TLSDemoCert.Demos\TLS\Indy\DSMTLSIndy10D26— the package listssmTLSId10D26IOHandlerReg.pas, which does not exist. Use the…D37pair on Delphi 13.
Demos\ the sample projects, by topic
Tools\ the generators that produce what the demos read
These demos are generated from StreamSec's own source tree, so a change made against this repository cannot be merged here — it has to be applied upstream and the public copy regenerated. Issues and pull requests are therefore not used.
Corrections, questions and bug reports are genuinely welcome at info@streamsec.se, which reaches the people who maintain the code. Please say which demo and which Delphi version; a compiler error message with its unit and line number is usually enough to work from.
The demo code here is under the MIT licence — it is sample code, so copy it into your own projects freely.
That covers this repository only. StreamSec Tools itself is commercial software under its own licence, is not included here, and comes from streamsec.com. The third-party components some demos need — Indy, Ararat Synapse, FMXLinux — are likewise not included and carry their own licences.