mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2026-07-05 21:00:48 +02:00
40d3befa61
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>
37 lines
1.2 KiB
Plaintext
37 lines
1.2 KiB
Plaintext
with "config/tests_config.gpr";
|
|
with "../wolfssl.gpr";
|
|
|
|
project Tests is
|
|
|
|
for Source_Dirs use ("src/", "src/support", "config/");
|
|
for Object_Dir use "obj/" & Tests_Config.Build_Profile;
|
|
for Create_Missing_Dirs use "True";
|
|
for Exec_Dir use "bin";
|
|
for Main use ("tests.adb");
|
|
|
|
package Compiler is
|
|
-- "-gnatyM0" disables the GNAT style check for maximum line length.
|
|
-- We keep it disabled for this tests project because some embedded
|
|
-- test vectors (e.g., DER keys) are long comma-separated literals that
|
|
-- would otherwise generate many "this line is too long" warnings.
|
|
for Default_Switches ("Ada") use
|
|
Tests_Config.Ada_Compiler_Switches & ("-gnatyM0");
|
|
end Compiler;
|
|
|
|
package Binder is
|
|
for Switches ("Ada") use ("-Es"); -- Symbolic traceback
|
|
end Binder;
|
|
|
|
package Linker is
|
|
-- WolfSSL uses libm on Linux/macOS; wolfssl.gpr already encodes OS-specifics,
|
|
-- but we repeat "-lm" here so the standalone tests executable links when
|
|
-- consumed without a full project tree.
|
|
for Switches ("Ada") use ("-lm");
|
|
end Linker;
|
|
|
|
package Install is
|
|
for Artifacts (".") use ("share");
|
|
end Install;
|
|
|
|
end Tests;
|