Skip to content

Commit

Permalink
Applied updates
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Jul 1, 2023
1 parent 56f99a1 commit 1a1d160
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 33 deletions.
6 changes: 0 additions & 6 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ environment:
BUILD_ENVIRONMENT: python
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
PYTHON: "C:\\Python311-x64\\python.exe"
- TARGET: macos-tox-py37
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
HOMEBREW_NO_INSTALL_CLEANUP: 1
PYTHON_VERSION: 3.7
TOXENV: py37
- TARGET: macos-tox-py38
BUILD_ENVIRONMENT: python-tox
APPVEYOR_BUILD_WORKER_IMAGE: macos-monterey
Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AC_PREREQ([2.71])

AC_INIT(
[libhmac],
[20230418],
[20230630],
[[email protected]])

AC_CONFIG_SRCDIR(
Expand Down
7 changes: 4 additions & 3 deletions m4/libcrypto.m4
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnl Checks for libcrypto required headers and functions
dnl
dnl Version: 20221127
dnl Version: 20230701

dnl Function to detect whether openssl/evp.h can be used in combination with zlib.h
AC_DEFUN([AX_LIBCRYPTO_CHECK_OPENSSL_EVP_ZLIB_COMPATIBILE],
Expand Down Expand Up @@ -684,13 +684,14 @@ AC_DEFUN([AX_LIBCRYPTO_CHECK_LIB],
[1],
[Define to 1 if you have the 'crypto' library (-lcrypto).])
ac_cv_libcrypto_LIBADD="-lcrypto"
ac_cv_libcrypto_CPPFLAGS="$openssl_CFLAGS"
ac_cv_libcrypto_LIBADD="$openssl_LIBS"
dnl On Cygwin also link zlib since libcrypto relies on it
AS_CASE(
[$host],
[*cygwin*],
[ac_cv_libcrypto_LIBADD="-lcrypto -lz"])
[ac_cv_libcrypto_LIBADD="$ac_cv_libcrypto_LIBADD -lz"])
dnl Enforce the dynamic loader library to be included if available
AC_CHECK_LIB(
Expand Down
12 changes: 1 addition & 11 deletions runtests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Script that runs the tests
#
# Version: 20230410
# Version: 20230507

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -358,11 +358,6 @@ then
then
exit ${EXIT_FAILURE};
fi

if test -f "setup.py" && ! run_setup_py_tests ${PYTHON2};
then
exit ${EXIT_FAILURE};
fi
fi

# Test with Python 3.
Expand Down Expand Up @@ -393,11 +388,6 @@ then
then
exit ${EXIT_FAILURE};
fi

if test -f "setup.py" && ! run_setup_py_tests ${PYTHON3};
then
exit ${EXIT_FAILURE};
fi
fi

# Test with the default Python version.
Expand Down
5 changes: 3 additions & 2 deletions synclibs.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh
# Script that synchronizes the local library dependencies
#
# Version: 20210513
# Version: 20230510

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand Down Expand Up @@ -52,7 +52,8 @@ do
fi

LOCAL_LIB_UPPER=`echo "${LOCAL_LIB}" | tr "[a-z]" "[A-Z]"`;
LOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^\s*\[\([0-9]*\)\],\s*$/\1/'`;
# Note that sed on FreeBSD does not support \s hence that we use [[:space:]] instead.
LOCAL_LIB_VERSION=`grep -A 2 AC_INIT ${LOCAL_LIB}-$$/configure.ac | tail -n 1 | sed 's/^[[:space:]]*\[\([0-9]*\)\],[[:space:]]*$/\1/'`;
LOCAL_LIB_MAKEFILE_AM="${LOCAL_LIB}/Makefile.am";

cp ${LOCAL_LIB}-$$/${LOCAL_LIB}/*.[chly] ${LOCAL_LIB};
Expand Down
7 changes: 4 additions & 3 deletions tests/test_sha1sum.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Sum tool testing script
#
# Version: 20230410
# Version: 20230701

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand All @@ -24,15 +24,16 @@ test_callback()
run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" -dsha1 > ${TMPDIR}/hmacsum;
local RESULT=$?;

DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA1" | sed 's/^[^:]*[:][\t][\t]*//'`;
# Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs.
DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA1" | sed $'s/^[^:]*[:][\t][\t]*//'`;

cp ${TMPDIR}/hmacsum /tmp/

if test ${RESULT} -eq ${EXIT_SUCCESS};
then
if test "${PLATFORM}" = "Darwin";
then
VERIFICATION_DIGEST_HASH=`openssl sha1 ${INPUT_FILE} | sed 's/^[^=]*=//'`;
VERIFICATION_DIGEST_HASH=`openssl sha1 ${INPUT_FILE} | sed 's/^[^=]*= //'`;
else
VERIFICATION_DIGEST_HASH=`sha1sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`;
fi
Expand Down
17 changes: 10 additions & 7 deletions tests/test_sha2sum.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Sum tool testing script
#
# Version: 20230410
# Version: 20230701

EXIT_SUCCESS=0;
EXIT_FAILURE=1;
Expand All @@ -24,13 +24,14 @@ test_callback()
run_test_with_input_and_arguments "${TEST_EXECUTABLE}" "${INPUT_FILE}" -dsha224,sha256,sha512 > ${TMPDIR}/hmacsum;
local RESULT=$?;

DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA224" | sed 's/^[^:]*[:][\t][\t]*//'`;
# Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs.
DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA224" | sed $'s/^[^:]*[:][\t][\t]*//'`;

if test ${RESULT} -eq ${EXIT_SUCCESS};
then
if test "${PLATFORM}" = "Darwin";
then
VERIFICATION_DIGEST_HASH=`openssl sha224 ${INPUT_FILE} | sed 's/^[^=]*=//'`;
VERIFICATION_DIGEST_HASH=`openssl sha224 ${INPUT_FILE} | sed 's/^[^=]*= //'`;
else
VERIFICATION_DIGEST_HASH=`sha224sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`;
fi
Expand All @@ -40,13 +41,14 @@ test_callback()
fi
fi

DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA256" | sed 's/^[^:]*[:][\t][\t]*//'`;
# Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs.
DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA256" | sed $'s/^[^:]*[:][\t][\t]*//'`;

if test ${RESULT} -eq ${EXIT_SUCCESS};
then
if test "${PLATFORM}" = "Darwin";
then
VERIFICATION_DIGEST_HASH=`openssl sha256 ${INPUT_FILE} | sed 's/^[^=]*=//'`;
VERIFICATION_DIGEST_HASH=`openssl sha256 ${INPUT_FILE} | sed 's/^[^=]*= //'`;
else
VERIFICATION_DIGEST_HASH=`sha256sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`;
fi
Expand All @@ -56,13 +58,14 @@ test_callback()
fi
fi

DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA512" | sed 's/^[^:]*[:][\t][\t]*//'`;
# Note that the $'' string notation is needed for Mac OS to correctly interpret the tabs.
DIGEST_HASH=`cat ${TMPDIR}/hmacsum | grep "SHA512" | sed $'s/^[^:]*[:][\t][\t]*//'`;

if test ${RESULT} -eq ${EXIT_SUCCESS};
then
if test "${PLATFORM}" = "Darwin";
then
VERIFICATION_DIGEST_HASH=`openssl sha512 ${INPUT_FILE} | sed 's/^[^=]*=//'`;
VERIFICATION_DIGEST_HASH=`openssl sha512 ${INPUT_FILE} | sed 's/^[^=]*= //'`;
else
VERIFICATION_DIGEST_HASH=`sha512sum ${INPUT_FILE} | sed 's/[ ][ ]*[^ ][^ ]*$//'`;
fi
Expand Down

0 comments on commit 1a1d160

Please sign in to comment.