|
Barracuda Application Server C/C++ Reference
Native APIs, integration guides, and platform interfaces
|
Build Xedge with the supplied software PSA Crypto provider, sign a message with the ba.tpm Lua API, and confirm that keys and encrypted settings survive a restart. The development key store is created automatically. Hardware protection requires a target provider.
Use the Windows BAS SDK and Visual Studio with the C++ desktop tools installed. The SDK includes the provider and matching Lua resources. Open a Visual Studio Developer Command Prompt (CMD) and start in the BAS root.
Open examples/xedge/VcMake/xedge-psa.vcxproj in Visual Studio and build Debug x64, or run:
The project builds its provider automatically. Keep PsaTestSimulator=true; no Makefile, provider properties, or manual root provisioning is needed. It also supports Release and Win32.
Using an SVN development checkout? First follow the development resource and version steps. Released SDK headers already contain the build revision.
The result is examples/xedge/obj/VcMake/psa/x64/Debug/xedge-psa.exe, with its Lua resources embedded. Rebuild with the same command when needed. The supplied src/PsaSimInit.c implements xedgeInitPsa(); Xedge initializes the provider before cryptographic use and keeps it open across Lua debugger restarts.
Continue in the same command prompt:
http://127.0.0.1/rtl/. If port 80 is busy, use the HTTP port printed in the console, for example http://127.0.0.1:9357/rtl/.PSA restart check. Then uncheck Enable to save the log settings. If already unchecked, check it and uncheck it again. Leave the SMTP server fields empty; this test sends no email.xedge-psa.exe again from this directory with the same HOME setting. Refresh the browser.PSA restart check and Enable is unchecked.If the demonstration key already exists, both runs report that it is reused. The configuration is saved as encrypted home/xedge-psa/xcfg.bin.
All paths below are relative to examples/xedge/obj/VcMake/psa/x64/Debug:
| Path | Purpose |
|---|---|
psa-simulator/ | Persistent roots and signing keys |
psa-simulator.key | Wrapping secret that protects the key records |
home/xedge-psa/ | Encrypted configuration and application files |
Xedge-configuration-file | Second encrypted configuration copy, written by the supplied led.c example |
Retain these across restarts and rebuilds. Keep the same HOME when starting from a new command prompt. If storage is locked, stop the other process using this executable's store. Do not erase keys to fix a startup error.
For your target provider, follow the standalone build steps. Read How It Works for storage, root settings, and recovery details.