You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Modify the build system to conditionally compile and execute ENGINE-based tests only when the GOST_ENABLE_LEGACY build flag is explicitly set. Ensure that legacy ENGINE tests are opt-in and not built or run by default, aligning with the removal of ENGINE APIs.
Problem Description
The current test suite includes ENGINE-based tests that rely on deprecated and removed ENGINE APIs (§65–79). These tests prevent the project from building or running with OpenSSL configurations that disable deprecated functionality. To maintain compatibility with modern OpenSSL while preserving legacy test coverage, ENGINE-based tests must be made optional and disabled by default.
Current Implementation
Test files (e.g., test_ciphers.c, test_context.c, test_derive.c, test_digest.c, test_ecdhe.c, test_gost2814789.c, test_gost89.c, test_keyexpimp.c, test_mgm.c, test_params.c, test_sign.c, test_tls.c, test_tlstree.c) are compiled unconditionally
Some tests directly or indirectly use ENGINE APIs (e.g., via gost_eng.c or legacy EVP methods)
Tests with legacy engine environment are executed by default in CI and local builds
Required Changes
1. Identify ENGINE-dependent tests
Analyze test files to determine which ones use ENGINE APIs or legacy interfaces
Categorize tests into: provider-only (always built) and ENGINE-legacy (built only with GOST_ENABLE_LEGACY)
2. Update build system for conditional compilation
Modify CMakeLists.txt (or equivalent build files) to add a GOST_ENABLE_LEGACY option (default OFF)
Use conditional compilation (GOST_ENABLE_LEGACY) to include legacy test sources only when the flag is set
Ensure provider tests are always included
3. Isolate legacy test code
Move ENGINE-dependent test logic into separate files or wrap with #ifdef GOST_ENABLE_LEGACY guards
For tests that mix provider and ENGINE code, split into separate test functions or files
4. Update test execution
Modify test runners or scripts to skip legacy tests unless GOST_ENABLE_LEGACY is set
Ensure CI workflows (e.g., .cirrus.yml, workflows) respect the flag and do not run legacy tests by default
5. Document the flag
Update README.md or build documentation to explain the GOST_ENABLE_LEGACY flag and its purpose
Files to Modify
CMakeLists.txt: Add option(GOST_ENABLE_LEGACY "Enable legacy ENGINE support and tests" OFF) and conditional inclusion of legacy test sources
Test files (e.g., test_ciphers.c, test_context.c, etc.): Wrap ENGINE-dependent code with #ifdef GOST_ENABLE_LEGACY or move to separate legacy test files
workflows: Update CI to conditionally run legacy tests based on the flag
Disable ENGINE-based tests unless explicitly enabled
Issue Summary
Modify the build system to conditionally compile and execute ENGINE-based tests only when the
GOST_ENABLE_LEGACYbuild flag is explicitly set. Ensure that legacy ENGINE tests are opt-in and not built or run by default, aligning with the removal of ENGINE APIs.Problem Description
The current test suite includes ENGINE-based tests that rely on deprecated and removed ENGINE APIs (§65–79). These tests prevent the project from building or running with OpenSSL configurations that disable deprecated functionality. To maintain compatibility with modern OpenSSL while preserving legacy test coverage, ENGINE-based tests must be made optional and disabled by default.
Current Implementation
Required Changes
1. Identify ENGINE-dependent tests
GOST_ENABLE_LEGACY)2. Update build system for conditional compilation
GOST_ENABLE_LEGACYoption (default OFF)GOST_ENABLE_LEGACY) to include legacy test sources only when the flag is set3. Isolate legacy test code
#ifdef GOST_ENABLE_LEGACYguards4. Update test execution
GOST_ENABLE_LEGACYis set5. Document the flag
GOST_ENABLE_LEGACYflag and its purposeFiles to Modify
option(GOST_ENABLE_LEGACY "Enable legacy ENGINE support and tests" OFF)and conditional inclusion of legacy test sources#ifdef GOST_ENABLE_LEGACYor move to separate legacy test filesDependencies
This task depends on:
Acceptance Criteria
GOST_ENABLE_LEGACY(no ENGINE tests compiled)GOST_ENABLE_LEGACY=ON, legacy tests are compiled and executableTesting
GOST_ENABLE_LEGACY: Ensure no legacy tests are present, provider tests passGOST_ENABLE_LEGACY=ON: Ensure legacy tests are included and pass