Skip to content

Conversation

@aidangarske
Copy link
Contributor

Fix wolfProvider Command-Line Tests for Provider Switching

This PR fixes issues with provider switching in command-line tests and adds support for system/Debian package installations. Changes where supposed to be fixed in #324 still running into yocto issues and issues in nightly debian pacakge creation here

Changes:

  • Fixed provider switching logic (cmd-test-common.sh):

    • Removed early return 0 statements that disabled provider switching functions
    • Properly handle replace-default mode (no switching needed, just verify wolfProvider is default)
    • Fixed normal mode switching to correctly set OPENSSL_CONF and OPENSSL_MODULES
    • Added system/Debian package installation detection for finding provider library paths (/usr/lib/*/ossl-modules/)
    • Improved error messages and path detection logic
  • Enhanced replace-default mode detection (env-setup, utils-general.sh):

    • Auto-detect replace-default mode from OpenSSL version string (checks for "replace-default")
    • In replace-default mode, unset OPENSSL_CONF and OPENSSL_MODULES to use native default provider behavior
    • Updated is_wp_default detection to correctly identify wolfProvider as default in replace-default mode
  • Improved system installation support:

    • Detect Debian package installations when OPENSSL_BIN is /usr/bin/openssl
    • Use system paths (/usr/lib/*/ossl-modules/ and /etc/ssl/openssl.cnf.d/wolfprovider.conf)
    • Fallback to local build paths if system paths are not found
  • Updated documentation (do-cmd-tests.sh):

    • Clarified environment variable usage in help text
    • Noted that modes are auto-detected (no flags needed)

Testing:

@ColtonWilley ColtonWilley merged commit 5140cc3 into wolfSSL:master Dec 31, 2025
370 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants