Files
wolfssl/wrapper/Ada/examples/examples.gpr
T
Juliusz Sosinowicz 40d3befa61 Extend Ada bindings
Add Ada bindings for SHA-256, RSA sign/verify, and AES-CBC from
wolfCrypt. Use XMALLOC/XFREE for dynamic allocation and add GNATprove
ownership annotations to enable static leak detection.

Refactor the Ada wrapper into a base package (wolfssl.ads) and a child
package (wolfssl-full_runtime) to separate code that depends on
Interfaces.C.Strings and GNAT.Sockets from zero-footprint-compatible
code.

Add standalone examples for SHA-256 hashing, RSA signature verification,
and AES encryption under wrapper/Ada/examples/.

Add AUnit test suites for SHA-256, RSA, and AES bindings under
wrapper/Ada/tests/ with Valgrind suppressions and Alire integration.

Move TLS client/server examples into wrapper/Ada/examples/src/ and
update build files (default.gpr, examples.gpr, include.am) accordingly.

Update CI (ada.yml) to build default.gpr, run AUnit tests, run the
client-server examples, and run GNATprove.

Co-authored-by: Joakim Strandberg <joakim@mequinox.se>
2026-02-09 13:44:35 +01:00

47 lines
1.2 KiB
Plaintext

with "config/examples_config.gpr";
with "../wolfssl.gpr";
project Examples is
type OS_Kind is ("Windows", "Linux_Or_Mac");
OS : OS_Kind := external ("OS", "Linux_Or_Mac");
for Languages use ("Ada");
for Source_Dirs use ("src");
for Object_Dir use "obj";
for Main use ("tls_server_main.adb",
"tls_client_main.adb",
"sha256_main.adb",
"rsa_verify_main.adb",
"aes_verify_main.adb");
package Naming is
for Spec_Suffix ("C") use ".h";
end Naming;
package Compiler is
for Switches ("Ada") use ("-g");
end Compiler;
package Linker is
case OS is
when "Windows" =>
for Switches ("Ada") use
("-lm", -- To include the math library (used by WolfSSL).
"-lcrypt32"); -- Needed on Windows.
when "Linux_Or_Mac" =>
for Switches ("Ada") use
("-lm"); -- To include the math library (used by WolfSSL).
end case;
end Linker;
package Binder is
for Switches ("Ada") use ("-Es"); -- To include stack traces.
end Binder;
end Examples;