Add libjwt to third-party

The current STIR/SHAKEN implementation is not currently usable due
to encryption issues. Rather than trying to futz with OpenSSL and
the the current code, we can take advantage of the existing
capabilities of libjwt but we first need to add it to the
third-party infrastructure already in place for jansson and
pjproject.

A few tweaks were also made to the third-party infrastructure as
a whole.  The jansson "dest" install directory was renamed "dist"
to better match convention, and the third-party Makefile was updated
to clean all product directories not just the ones currently in
use.

Resolves: #349
(cherry picked from commit d7a6116681)
This commit is contained in:
George Joseph
2023-09-21 11:12:31 -06:00
committed by Asterisk Development Team
parent 893483f915
commit cfc6832062
19 changed files with 10083 additions and 11751 deletions

View File

@@ -463,6 +463,15 @@ if test "${with_pjproject}" = "no" || test "${with_pjproject}" = "n" ; then
PJPROJECT_BUNDLED=no
fi
LIBJWT_BUNDLED=no
AC_ARG_WITH([libjwt-bundled],
[AS_HELP_STRING([--with-libjwt-bundled],
[Use bundled libjwt library])],
[case "${withval}" in
y|ye|yes) LIBJWT_BUNDLED=yes ;;
*) LIBJWT_BUNDLED=no ;;
esac])
#
# OpenSSL stuff has to be done here because we want to pass
# any resulting CFLAGS and LDFLAGS to the bundled pjproject
@@ -553,6 +562,7 @@ AST_EXT_LIB_SETUP([LDAP], [OpenLDAP], [ldap])
AST_LIBCURL_CHECK_CONFIG([], [7.10.1])
AST_EXT_LIB_SETUP([LIBEDIT], [NetBSD Editline library], [libedit])
AST_EXT_LIB_SETUP_OPTIONAL([LIBEDIT_IS_UNICODE], [Libedit compiled for unicode], [LIBEDIT], [libedit])
AST_EXT_LIB_SETUP([LIBJWT], [LIBJWT], [libjwt])
AST_EXT_LIB_SETUP([LIBXML2], [LibXML2], [libxml2])
AST_EXT_LIB_SETUP([LIBXSLT], [LibXSLT], [libxslt])
AST_EXT_LIB_SETUP_OPTIONAL([LIBXSLT_CLEANUP], [LibXSLT Library Cleanup Function], [LIBXSLT], [libxslt])
@@ -736,6 +746,14 @@ else
PBX_JANSSON=1
fi
source ./third-party/versions.mak
# Find required JWT support if bundled is not enabled.
if test "$LIBJWT_BUNDLED" = "no" ; then
AST_PKG_CONFIG_CHECK([LIBJWT], [libjwt >= $LIBJWT_VERSION])
else
PBX_LIBJWT=1
fi
# See if clock_gettime is in librt
AST_EXT_LIB_CHECK([RT], [rt], [clock_gettime], [])