Skip to content

Commit

Permalink
Merge branch 'update-dependencies'
Browse files Browse the repository at this point in the history
Signed-off-by: Richard T Bonhomme <[email protected]>
  • Loading branch information
TinCanTech committed Aug 29, 2023
2 parents cbfc6f1 + 9fe1c6e commit c006515
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 26 deletions.
10 changes: 5 additions & 5 deletions dev/easytls-op-test.bat
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,20 @@ dir
cd ..

if %PROCESSOR_ARCHITECTURE% == x86 (
curl -LO https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.8/EasyRSA-3.0.8-win32.zip
7z e -aoa EasyRSA-3.0.8-win32.zip
curl -LO https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.6/EasyRSA-3.1.6-win32.zip
7z e -aoa EasyRSA-3.1.6-win32.zip
REM ping -n 10 127.0.0.1
curl -LO https://github.com/TinCanTech/Prebuilt-Openvpn/raw/master/wovpn/wovpn32b.zip
7z e -aoa wovpn32b.zip
) ELSE (
curl -LO https://github.com/OpenVPN/easy-rsa/releases/download/v3.0.8/EasyRSA-3.0.8-win64.zip
7z e -aoa EasyRSA-3.0.8-win64.zip
curl -LO https://github.com/OpenVPN/easy-rsa/releases/download/v3.1.6/EasyRSA-3.1.6-win64.zip
7z e -aoa EasyRSA-3.1.6-win64.zip
REM ping -n 10 127.0.0.1
curl -LO https://github.com/TinCanTech/Prebuilt-Openvpn/raw/master/wovpn/wovpn64b.zip
7z e -aoa wovpn64b.zip
)

curl -LO https://raw.githubusercontent.com/TinCanTech/easyrsa-plus/master/easyrsa3/easyrsa
REM curl -LO https://raw.githubusercontent.com/TinCanTech/easyrsa-plus/master/easyrsa3/easyrsa

SET PATH=%PATH%;.\
SET HOME=%PATH%
Expand Down
8 changes: 6 additions & 2 deletions dev/easytls-op-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,17 @@ done

cd "${etls_ut_dir_name}"

dl_ossl3
#dl_ossl3

CURL_TARGET="https://raw.githubusercontent.com/TinCanTech/easy-rsa/master/easyrsa3/easyrsa"
curl -O "$CURL_TARGET" || exit 77

CURL_TARGET="https://raw.githubusercontent.com/TinCanTech/easy-rsa/master/easyrsa3/openssl-easyrsa.cnf"
curl -O "$CURL_TARGET" || exit 77

CURL_TARGET="https://raw.githubusercontent.com/TinCanTech/Prebuilt-OpenVPN/master/src/openvpn/openvpn"
curl -O "$CURL_TARGET" || exit 77

echo

for f in ./easyrsa ./openssl-easyrsa.cnf ./openvpn
Expand All @@ -93,7 +96,8 @@ ls -l
export EASYTLS_OPENVPN="./openvpn"
printf "%s\n" "EASYTLS_OPENVPN=$EASYTLS_OPENVPN"

export EASYRSA_OPENSSL="./openssl"
#export EASYRSA_OPENSSL="./openssl"
export EASYRSA_OPENSSL="openssl"
printf "%s\n" "EASYRSA_OPENSSL=$EASYRSA_OPENSSL"

$EASYTLS_OPENVPN --version
Expand Down
73 changes: 54 additions & 19 deletions dev/easytls-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,43 @@ usage ()
"
}


# Tools Version
tools_version() {
print "
OpenSSL command: ${OPENSSL_CMD}"
${INVOKE_OPTS} "${OPENSSL_CMD}" version || \
fail "${INVOKE_OPTS} ${OPENSSL_CMD} version ($exit_code)"

print "
EasyRSA command: ${EASYRSA_CMD}"
${INVOKE_OPTS} "${EASYRSA_CMD}" version || \
fail "${INVOKE_OPTS} ${EASYRSA_CMD} version ($exit_code)"

print "
EasyTLS command: ${EASYTLS_CMD}"
${INVOKE_OPTS} "${EASYTLS_CMD}" -V || \
fail "${INVOKE_OPTS} ${EASYTLS_CMD} -V ($exit_code)"

print "
EasyTLS-cryptv2-verify command: ${TLSCV2V_CMD}"
${INVOKE_OPTS} "${TLSCV2V_CMD}" -V || exit_code=$?
[ $exit_code -eq 9 ] || \
fail "${INVOKE_OPTS} ${TLSCV2V_CMD} -V ($exit_code)"

print "
EasyTLS-client-connect command: ${CLICON_CMD}"
${INVOKE_OPTS} "${CLICON_CMD}" -V || exit_code=$?
[ $exit_code -eq 9 ] || \
fail "${INVOKE_OPTS} ${CLICON_CMD} -V ($exit_code)"

print "
EasyTLS-client-disconnect command: ${CLIDIS_CMD}"
${INVOKE_OPTS} "${CLIDIS_CMD}" -V || exit_code=$?
[ $exit_code -eq 9 ] || \
fail "${INVOKE_OPTS} ${CLIDIS_CMD} -V ($exit_code)"
}

fail ()
{
print "$@"
Expand Down Expand Up @@ -118,7 +155,9 @@ warn() { printf "%s\n" "$*"; }

build_test_pki ()
{
for i in "--req-cn='easytls-unit-test' build-ca nopass" \
for i in \
"make-safe-ssl" \
"--req-cn='easytls-unit-test' build-ca nopass" \
"build-server-full s01 nopass" \
"build-server-full s02 nopass" \
"build-server-full s-auth nopass" \
Expand Down Expand Up @@ -308,7 +347,7 @@ WORK_DIR="$(pwd)"
UTMP_DIR="${WORK_DIR}/unit-test-tmp"
rm -rf "${UTMP_DIR}"

EASYRSA_CMD="./easyrsa"
EASYRSA_CMD="${EASYRSA_CMD:-./easyrsa}"
EASYRSA_OPTS="--batch"

EASYTLS_CMD="./easytls"
Expand Down Expand Up @@ -384,11 +423,18 @@ else
export EASYTLS_OPENVPN=openvpn
export OPENVPN_CMD=openvpn
fi

export EASYRSA_OPENSSL="openssl"
export OPENSSL_CMD="openssl"

fi

# Invoke with user opts: eg. EASYTLS_SILENT=1
INVOKE_OPTS=""

# Version info
tools_version

# Test help
print "TEST: All --help"

Expand Down Expand Up @@ -476,7 +522,7 @@ print "Zero errors"

export EASYRSA_CERT_RENEW=1000

build_easyrsa
#build_easyrsa

total_expected_errors=0
subtot_1=0
Expand Down Expand Up @@ -614,11 +660,13 @@ elif [ -n "${EASYTLS_REMOTE_CI}" ]; then

# Update safessl-easyrsa.cnf
print "*** Update safessl-easyrsa.cnf - easyrsa init-pki"
"${EASYRSA_CMD}" --pki-dir="${WORK_DIR}/et-tdir${loops}" --batch init-pki
"${EASYRSA_CMD}" --pki-dir="${WORK_DIR}/et-tdir${loops}" --batch init-pki || fail "init-pki"

"${EASYRSA_CMD}" --pki-dir="${WORK_DIR}/et-tdir${loops}" --batch make-safe-ssl

cp -vf "${WORK_DIR}/et-tdir${loops}/safessl-easyrsa.cnf" ./safessl-easyrsa.cnf || \
fail "(1) cp ${WORK_DIR}/et-tdir${loops}/safessl-easyrsa.cnf ./safessl-easyrsa.cnf"

# Remove the temp PKI - Only require safessl-easyrsa.cnf
rm -rf "${WORK_DIR}/et-tdir${loops}"

Expand Down Expand Up @@ -1213,21 +1261,8 @@ DBUG_DIR="$WORK_DIR/et-tdir1/easytls/metadata"
#"$EASYTLS_CMD" $EASYTLS_OPTS version || \
# fail "Unit test error 71: version"

# Version
${INVOKE_OPTS} "${EASYTLS_CMD}" -V || \
fail "${INVOKE_OPTS} ${EASYTLS_CMD} -V ($exit_code)"

${INVOKE_OPTS} "${TLSCV2V_CMD}" -V || exit_code=$?
[ $exit_code -eq 9 ] || \
fail "${INVOKE_OPTS} ${TLSCV2V_CMD} -V ($exit_code)"

${INVOKE_OPTS} "${CLICON_CMD}" -V || exit_code=$?
[ $exit_code -eq 9 ] || \
fail "${INVOKE_OPTS} ${CLICON_CMD} -V ($exit_code)"

${INVOKE_OPTS} "${CLIDIS_CMD}" -V || exit_code=$?
[ $exit_code -eq 9 ] || \
fail "${INVOKE_OPTS} ${CLIDIS_CMD} -V ($exit_code)"
# Version info
tools_version

# Stats
unset EASYTLS_QUIET
Expand Down

0 comments on commit c006515

Please sign in to comment.