Skip to content

Commit

Permalink
Squashed commit of the following:
Browse files Browse the repository at this point in the history
commit 48143e00181a97e1a68ee3da0f84667fc0e1f597
Merge: 5b5c256 fcbd0c1
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Sun Dec 11 22:05:57 2022 +0000

    Merge branch 'master' of ssh://github.com/TinCanTech/easyrsa-unit-tests into TinCanTech-master

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

commit fcbd0c1
Author: Richard T Bonhomme <tincantech@protonmail.com>
Date:   Sun Dec 11 21:59:40 2022 +0000

    Allow unit-test to exercise inter-active build-ca passphrase code

    Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>

Signed-off-by: Richard T Bonhomme <tincantech@protonmail.com>
  • Loading branch information
TinCanTech committed Dec 11, 2022
1 parent 5b5c256 commit bca6372
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions easyrsa-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ init ()
ERSA_OUT="${ERSA_OUT:-0}"
ACT_OUT="$TEMP_DIR/.act.out"
ACT_ERR="$TEMP_DIR/.act.err"
#TEST_BUILD_CA_DEFAULT_METHOD=1

# Setup the 'easyrsa' executable to use
# In PATH
Expand Down Expand Up @@ -606,7 +607,18 @@ action ()
ACT_FILE_NAME="$1"
ACT_OPTS="$2"

if [ "$EASYRSA_USE_PASS" ]; then
if [ "$STEP_NAME" = build-ca ]; then
if [ "$TEST_BUILD_CA_DEFAULT_METHOD" ]; then
unset -v PASSIN_OPT PASSOUT_OPT
else
if [ "$EASYRSA_USE_PASS" ]; then
PASSIN_OPT=--passin=pass:EasyRSA
PASSOUT_OPT=--passout=pass:EasyRSA
else
unset -v PASSIN_OPT PASSOUT_OPT
fi
fi
elif [ "$EASYRSA_USE_PASS" ]; then
PASSIN_OPT=--passin=pass:EasyRSA
PASSOUT_OPT=--passout=pass:EasyRSA
else
Expand Down Expand Up @@ -935,6 +947,8 @@ create_pki ()

export EASYRSA_REQ_CN="penelope"
build_ca
#echo "Test CA passprase: exit 0"; exit 0

show_ca
unset -v EASYRSA_REQ_CN

Expand Down Expand Up @@ -1055,7 +1069,7 @@ create_pki ()
trap "failed 6" 6
trap "failed 15" 15

ERSA_UTEST_VERSION="3.1.2"
export ERSA_UTEST_VERSION="3.1.2"

# Options
while [ "$1" ]
Expand Down

0 comments on commit bca6372

Please sign in to comment.