Skip to content

Commit

Permalink
Upgrade Linux based unit test to OpenSSL 3.0.2
Browse files Browse the repository at this point in the history
- 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)

Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Apr 9, 2022
1 parent 484bc56 commit 4b75783
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
2 changes: 1 addition & 1 deletion easyrsa3/easyrsa
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ easyrsa_mktemp() {
die "Could not create temporary directory '$EASYRSA_TEMP_DIR_session'. Permission or concurrency problem?"
[ -d "$EASYRSA_TEMP_DIR_session" ] || die "Temporary directory '$EASYRSA_TEMP_DIR_session' does not exist"

tempfile="$EASYRSA_TEMP_DIR_session/tmp.$($EASYRSA_OPENSSL rand -hex 3)" || return
tempfile="$EASYRSA_TEMP_DIR_session/tmp.$("$EASYRSA_OPENSSL" rand -hex 3)" || return
printf "" > "$tempfile" || return

echo "$tempfile"
Expand Down
36 changes: 32 additions & 4 deletions op-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ if [ -e "shellcheck" ] && [ "$EASYRSA_NIX" ]; then
fi
elif [ "$EASYRSA_NIX" ]; then
github_target='OpenVPN/easyrsa-unit-tests/master/shellcheck'
curl -O "${github_url}/${github_target}"
[ -e "shellcheck" ] || { echo "shellcheck download failed."; exit 9; }
curl -f -O "${github_url}/${github_target}" || {
echo "shellcheck download failed."
exit 9
}
chmod +x shellcheck
./shellcheck -V
if [ -e easyrsa3/easyrsa ]; then
Expand All @@ -54,9 +56,35 @@ fi
estat=0

if [ -e "easyrsa-unit-tests.sh" ]; then
if sh easyrsa-unit-tests.sh "$verb"; then


if : ; then



# sh easyrsa-unit-tests.sh "$verb"; then



if [ "$EASYRSA_NIX" ] && [ "$EASYRSA_BY_TINCANTECH" ]; then
sh easyrsa-unit-tests.sh "$verb" -x || estat=2


# two tests in one: x509-alt and ossl-3
# Not without --x509-alt, waiting for merge

# openssl v3
if [ ! -e ./openssl ]; then
github_target='OpenVPN/easyrsa-unit-tests/master/openssl'
curl -f -O "${github_url}/${github_target}" || {
echo "openssl download failed."
exit 9
}
fi
chmod +x openssl
./openssl version
export EASYRSA_OPENSSL="${PWD}/openssl"
sh easyrsa-unit-tests.sh "$verb" || estat=2
#rm ./openssl
fi
else
estat=1
Expand Down

0 comments on commit 4b75783

Please sign in to comment.