From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 26 Sep 2022 16:42:13 +0000 (+0100) Subject: Remove the need for the gcrypt library; use openssl instead, as it's mandatory elsewh... X-Git-Tag: 4.1-rc1~20^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=30aaabc47ec1ba30aec1865dae28be0e23901d12;p=thirdparty%2Fshairport-sync.git Remove the need for the gcrypt library; use openssl instead, as it's mandatory elsewhere in Shairport Sync. --- diff --git a/Makefile.am b/Makefile.am index 666047ea..b681ed3e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ SUBDIRS = man ARFLAGS = cr -lib_pair_ap_a_CFLAGS = -Wall -g -DCONFIG_GCRYPT -pthread +lib_pair_ap_a_CFLAGS = -Wall -g -DCONFIG_OPENSSL -pthread lib_tinyhttp_a_CFLAGS = -pthread lib_dbus_interface_a_CFLAGS = -pthread lib_mpris_interface_a_CFLAGS = -pthread diff --git a/configure.ac b/configure.ac index b0f53cd9..fd233952 100644 --- a/configure.ac +++ b/configure.ac @@ -412,11 +412,6 @@ if test "x$with_airplay_2" = "xyes" ; then ]) ]) PKG_CHECK_MODULES([libsodium], [libsodium],[CFLAGS="${libsodium_CFLAGS} ${CFLAGS}" LIBS="${libsodium_LIBS} ${LIBS}"],[AC_MSG_ERROR(AirPlay 2 support requires libsodium -- libsodium-dev suggested)]) - PKG_CHECK_MODULES([libgcrypt], [libgcrypt],[CFLAGS="${libgcrypt_CFLAGS} ${CFLAGS}" LIBS="${libgcrypt_LIBS} ${LIBS}"],[ - AC_CHECK_LIB([gcrypt], [gcry_control], [], [ - AC_MSG_ERROR([Airplay 2 support requires libgcrypt -- libgcrypt-dev suggested]) - ]) - ]) PKG_CHECK_MODULES([libavutil], [libavutil],[CFLAGS="${libavutil_CFLAGS} ${CFLAGS}" LIBS="${libavutil_LIBS} ${LIBS}"],[ AC_MSG_ERROR(AirPlay 2 support requires libavutil -- libavutil-dev suggested)]) PKG_CHECK_MODULES([libavcodec], [libavcodec],[CFLAGS="${libavcodec_CFLAGS} ${CFLAGS}" LIBS="${libavcodec_LIBS} ${LIBS}"],[ diff --git a/shairport.c b/shairport.c index 9d1657f0..aec61bc7 100644 --- a/shairport.c +++ b/shairport.c @@ -45,7 +45,6 @@ #ifdef CONFIG_AIRPLAY_2 #include "ptp-utilities.h" -#include #include #include #include @@ -2104,28 +2103,6 @@ int main(int argc, char **argv) { debug(1, "libsodium initialised."); } - // this code is based on - // https://www.gnupg.org/documentation/manuals/gcrypt/Initializing-the-library.html - - /* Version check should be the very first call because it - makes sure that important subsystems are initialized. - #define NEED_LIBGCRYPT_VERSION to the minimum required version. */ - -#define NEED_LIBGCRYPT_VERSION "1.5.4" - - if (!gcry_check_version(NEED_LIBGCRYPT_VERSION)) { - die("libgcrypt is too old (need %s, have %s).", NEED_LIBGCRYPT_VERSION, - gcry_check_version(NULL)); - } - - /* Disable secure memory. */ - gcry_control(GCRYCTL_DISABLE_SECMEM, 0); - - /* ... If required, other initialization goes here. */ - - /* Tell Libgcrypt that initialization has completed. */ - gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); - #endif /* Mess around with the latency options */