File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 22# It can be used on the command line, or by workflows.
33# 'source' this file, don't run it directly
44# To disable wolfProvider, run 'unset OPENSSL_CONF'
5+ # To enable FIPS mode, set WOLFSSL_ISFIPS=1 before sourcing this file
56
67if [[ -n "${ZSH_VERSION:-}" ]]; then
78 [[ $ZSH_EVAL_CONTEXT =~ :file$ ]] && is_sourced=1 || is_sourced=0
4243
4344# Set variables with default values if not already set
4445export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:=$REPO_ROOT/wolfssl-install/lib:$OPENSSL_LIB_PATH}"
45- export OPENSSL_CONF="${OPENSSL_CONF:=$REPO_ROOT/provider.conf}"
46+
47+ # Auto-detect FIPS mode and use appropriate config
48+ if [ "${WOLFSSL_ISFIPS:-0}" = "1" ]; then
49+ DEFAULT_PROVIDER_CONF="$REPO_ROOT/provider-fips.conf"
50+ echo "FIPS mode detected, using provider-fips.conf"
51+ else
52+ DEFAULT_PROVIDER_CONF="$REPO_ROOT/provider.conf"
53+ fi
54+ export OPENSSL_CONF="${OPENSSL_CONF:=$DEFAULT_PROVIDER_CONF}"
55+
4656export OPENSSL_MODULES="${OPENSSL_MODULES:=$REPO_ROOT/wolfprov-install/lib}"
4757export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:=$OPENSSL_LIB_PATH/pkgconfig}"
4858
You can’t perform that action at this time.
0 commit comments