Commit Graph

24 Commits

Author SHA1 Message Date
Naveen Albert d715c76fcb configure: Rerun bootstrap on modern platform.
The last time configure was run, it was run on a system that
did not enable -std=gnu11 by default, which meant that the
restrict qualifier would not be recognized on certain platforms.
This regenerates the configure files from running bootstrap.sh,
so that these should be recognized on all supported platforms.

Resolves: #586
2024-02-12 18:42:16 +00:00
George Joseph 15ef050d0a 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
2023-10-05 10:34:46 -06:00
Mike Bradeen 62a64686e2 res_pjsip: Upgraded bundled pjsip to 2.13
Removed multiple patches.

Code chages in res_pjsip_pubsub due to changes in evsub.

Pjsip now calls on_evsub_state() before on_rx_refresh(),
so the sub tree deletion that used to take place in
on_evsub_state() now must take place in on_rx_refresh().

Additionally, pjsip now requires that you send the NOTIFY
from within on_rx_refresh(), otherwise it will assert
when going to send the 200 OK. The idea is that it will
look for this NOTIFY and cache it until after sending the
response in order to deal with the self-imposed message
mis-order. Asterisk previously dealt with this by pushing
the NOTIFY in on_rx_refresh(), but pjsip now forces us
to use it's method.

Changes were required to configure in order to detect
which way pjsip handles this as the two are not
compatible for the reasons mentioned above.

A corresponding change in testsuite is required in order
to deal with the small interal timing changes caused by
moving the NOTIFY send.

ASTERISK-30325

Change-Id: I50b00cac89d950d3511d7b250a1c641965d9fe7f
2023-02-06 18:21:58 -07:00
Joshua C. Colp cffaf12d19 pjsip: Add TLS transport reload support for certificate and key.
This change adds support using the pjsip_tls_transport_restart
function for reloading the TLS certificate and key, if the filenames
remain unchanged. This is useful for Let's Encrypt and other
situations. Note that no restart of the transport will occur if
the certificate and key remain unchanged.

ASTERISK-30186

Change-Id: I9bc95a6bf791830a9491ad9fa43c17d4010028d0
2022-09-09 18:41:05 -05:00
Sean Bright a6c7524e0d ast_pkgconfig.m4: AST_PKG_CONFIG_CHECK() relies on sed.
Make sure that we have a working sed before trying to use it.

ASTERISK-30059 #close

Change-Id: I9abad67a5df11b665d480feec304ab9d6f55cc76
2022-05-22 16:35:46 -05:00
Hugh McMaster 64f11e0d18 configure.ac: Use pkg-config to detect libxml2
Use pkg-config to detect libxml2, falling back to xml2-config if the
former is not available.

This patch ensures Asterisk continues to build on systems without
xml2-config installed.

The patch also updates the associated 'configure' files.

ASTERISK-29970 #close

Change-Id: I3c90dfe0b0590486cbb8e6d426a7c5c4199410c0
2022-03-25 14:25:31 -05:00
Joshua C. Colp 95f3a4a9ad chan_oss: Remove deprecated module.
ASTERISK-29593

Change-Id: Ib53a42ad974c63871344b95078c61c188e43da99
2021-08-17 10:35:43 -03:00
Alexander Traud 966acc6251 pjproject_bundled: Honor --without-pjproject.
ASTERISK-28837

Change-Id: Id057324912a3cfe6f50af372675626bb515907d9
2020-04-17 06:35:06 -05:00
Sebastian Kemper b7fbb9c41f check_expr2: fix cross-compile/hardening issues
When building check_expr2 with ASLR PIE hardening enabled the linker
fails. This is resolved by adding the regular compiler flags when
building the object files from ast_expr2f.c and ast_expr2.c.

Note: The STANDALONE define is removed because it is already defined in
_ASTCFLAGS. YY_NO_INPUT is defined so that the compile survives
'--enable-dev-mode'.

Also, a Makefile variable "CROSS_COMPILING" is added so that the
build system doesn't try to run check_expr2 when cross-compiling,
because that will fail the build as will.

ASTERISK-28685 #close

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Change-Id: If435b7db9f9ad8266245bda51c81c220f9658915
2020-02-26 19:52:17 +01:00
Sean Bright e40f248fac menuselect: Fix curses build on Gentoo Linux
Because keypad() is exported by libtinfo, it needs to be explicitly
added to the linker options.

ASTERISK-28487 #close

Change-Id: I6c2ad5b95f422c263d078b5c0e84c111807dffc6
2019-08-09 10:08:50 -05:00
Joshua Colp a8e5cf557d res_rtp_asterisk: Add support for DTLS packet fragmentation.
This change adds support for larger TLS certificates by allowing
OpenSSL to fragment the DTLS packets according to the configured
MTU. By default this is set to 1200.

This is accomplished by implementing our own BIO method that
supports MTU querying. The configured MTU is returned to OpenSSL
which fragments the packet accordingly. When a packet is to be
sent it is done directly out the RTP instance.

ASTERISK-28018

Change-Id: If2d5032019a28ffd48f43e9e93ed71dbdbf39c06
2019-06-13 07:51:57 -06:00
Kevin Harwell 31fba4e869
rtp_engine: rtcp_report_to_json can overflow the ssrc integer value
When writing an RTCP report to json the code attempts to pack the "ssrc" and
"source_ssrc" unsigned integer values as a signed int value type. This of course
means if the ssrc's unsigned value is greater than that which can fit into a
signed integer value it gets converted to a negative number. Subsequently, the
negative value goes out in the json report.

This patch now packs the value as a json_int_t, which is the widest integer type
available on a given system. This should make it so the value no longer
overflows.

Note, this was caught by two failing tests hep/rtcp-receiver/ and
hep/rtcp-sender.

Change-Id: I2af275286ee5e795b79f0c3d450d9e4b28e958b0
2018-09-21 18:06:21 -04:00
Sean Bright 3d9deb35f0 autoconf: Check for srtp_get_version_string() before using it
Change-Id: Id2a916ff9448706090e72ff2c7fb3f5ba24a05df
2018-09-17 10:48:03 -05:00
Alexander Traud 7418dfa2c7 BuildSystem: Enable ncurses for menuselect in Solaris 11.
The check for the library ncurses should use not use the header <curses.h> but
<ncurses.h>, because on some platforms <curses.h> is not a drop-in replacement
for <ncurses.h>: For example in Solaris, the symbol initscr is a typedef in
<curses.h> to a symbol which does not exist in the library ncurses (initscr32).
Simply use <ncurses.h> when you link to ncurses.

Furthermore in Solaris, the header <ncurses.h> is in a subdirectory
/usr/include/ncurses and not available via pkg-config.

ASTERISK-15331
ASTERISK-14935
ASTERISK-12382
ASTERISK-9107

Change-Id: Ife367776b0ccf17d3fefed868245376bfb93745d
2018-07-29 03:17:43 -05:00
Alexander Traud d54637373a menuselect: Add DragonFly BSD.
In DragonFly BSD, added libraries from ports are placed into /usr/local.
Therefore, this directory must be added for the preprocessor, compiler, and
linker.

Beside that, the script ./configure was updated:
* OSARCH list was outdated and not used, removed.
* AC_CANONICAL_BUILD was not used.
* _REENTRANT, this feature test macro is obsolete.

ASTERISK-27820

Change-Id: I186d88d99cfa4de6569888e12ac97bd2f441c422
2018-04-20 12:44:12 +02:00
Corey Farrell e40fd7a232 Build System: Strip '-std=c99' from CFLAGS provided by libraries.
Asterisk requires GNU C extensions.  On some systems certain libraries
may incorrectly push -std=c99 into CFLAGS, thus breaking the build.
This change causes that flag to be stripped so the Asterisk build is not
broken by those libraries.  This change is made for both pkgconfig and
tool based libraries.

ASTERISK-27629 #close

Change-Id: I13389613b194abbac77becf90cd950dc168704db
2018-04-04 11:04:46 -04:00
Corey Farrell ce5cfc8ffb autoconf: Use m4 conditionals where possible.
Change-Id: I530c0a72f965437acef6a9a4fbfe5c487f078b65
2017-11-28 10:40:54 -05:00
Corey Farrell b9f4bb5988 menuselect: Remove ineffective weak attribute detection.
menuselect detects compiler support for multiple styles of weak
functions.  This is a remnant from 2013 when OPTIONAL_API required weak
functions.  It is no longer correct for menuselect to switch
dependencies from optional to required based on lack of weak function
support.

Note an issue remains - dependencies should switch from optional to
required based on OPTIONAL_API being enabled or disabled.  I don't think
this is possible.  menuselect needs to know at startup if OPTIONAL_API
is enabled or disabled, so the only way to fix this is to remove
OPTIONAL_API from menuselect and create a configure option.  I've left
the code that switches in place but it's preprocessed out.

Additionally removed:
- WEAKREF variable from Asterisk makeopts.in.
- Related disabled code from test_utils.
- Pointless AC_REVISION call from menuselect/configure.ac.

Change-Id: Ifa702e5f98eb45f338b2f131a93354632a8fb389
2017-11-17 10:39:08 -05:00
Tzafrir Cohen 18a6f250e2 menuselect: invalid test for GTK2
configuire.ac was only checking for the existence of pkg-config
and not the gtk2 package itself.  Now it calls AST_PKG_CONFIG_CHECK
for gtk+-2.0.

ASTERISK-26356 #close

Change-Id: I93e9d0166341f0e7f84b52955bb6f81da42f2ef6
2016-10-18 10:24:40 -05:00
ibercom f897f36721 weakref attribute detection broken with gcc 4.6 and higher
GCC 4.7 Manual:
http://gcc.gnu.org/onlinedocs/gcc-4.7.4/gcc/Function-Attributes.html

weakref ("target")

A weak reference is an alias that does not by itself require a definition
to be given for the target symbol.

ASTERISK-22559 #close
Reported by: Ibercom

Change-Id: I36a136cae947b65187a697533416f9ff9a0b8cdf
2015-06-10 11:18:25 +02:00
Sean Bright 84b9f5eff5 Import Asterisk's autoconf magic instead of using our own.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-18 00:07:48 +00:00
Matthew Jordan 3f64ca0c04 configure: Fix libxml2 development library dependency checking
The commit that added libxml2 support didn't fully check for the libxml2
development script in the Asterisk configure file. As a result, Asterisk could
be configured, then fail on menuselect. This patch fixes it so that Asterisk
should detect the libxml2 dependency failure first.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 19:31:05 +00:00
Matthew Jordan 26c7e684ea menuselect: Add libxml2 support (Patch 3)
This is the final patch in adding menuselect to Asterisk.
 - The first patch (r418832) added menuselect along with mxml
 - The second patch (r418833) removed mxml from menuselect

This patch adds support for libxml2 to menuselect, and makes libxml2 a
required library for Asterisk.

Note that the libxml2 portion of this patch was written by Sean Bright,
and was made available on a team branch:
  http://svn.digium.com/svn/menuselect/team/seanbright/libxml2/

Review: https://reviewboard.asterisk.org/r/3773/

ASTERISK-20703 #close
patches:
  some_mysterious_team_branch uploaded by seanbright (License 5060)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 19:02:22 +00:00
Matthew Jordan c7d3570248 menuselect: Add menuselect to Asterisk trunk (Patch 1)
This is the first patch that adds menuselect to Asterisk trunk, and removes
the svn:externals property. This is being done for two reasons:
(1) The removal of external repositories eases a future migration to git
(2) Asterisk is now the only thing that uses menuselect; as a result, there's
    little need to keep it in an external repository

Subsequent patches will remove the mxml dependency from menuselect and tidy
up the build system.

ASTERISK-20703


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-17 18:42:43 +00:00