mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-12 20:47:06 +00:00
`switch_core_media_add_crypto()` parses the SDP `a=crypto` keysalt and decodes it into a fixed-size key buffer. Enforce the buffer contract at the call site: - Reject a zero-length, negative, or over-long keysalt (the length check now has both a lower bound and an upper bound against the copy buffer). - Copy the keysalt token into a NUL-terminated buffer and decode from that, so `switch_b64_decode` stops at the token instead of reading on into the following key material (it consumes input to the NUL and skips non-base64 bytes). - Pass the destination buffer size as the decode bound rather than the parsed token length. - Require the decoded length to cover the crypto suite's key+salt so the subsequent copy cannot read past the decoded bytes. Add `test_add_crypto_keysalt_bounds`, a table-driven test covering the accepted and rejected keysalt shapes across suites (AES-128/192/256), including RFC 4568 lifetime/MKI and multi-key lines.
31 lines
1.0 KiB
Makefile
31 lines
1.0 KiB
Makefile
include $(top_srcdir)/build/modmake.rulesam
|
|
|
|
noinst_PROGRAMS = switch_event switch_hash switch_ivr_originate switch_utils switch_core switch_console switch_vpx switch_core_file \
|
|
switch_ivr_play_say switch_core_codec switch_rtp switch_xml
|
|
noinst_PROGRAMS += switch_core_video switch_core_db switch_vad switch_packetizer switch_core_session test_sofia switch_ivr_async switch_core_asr switch_log
|
|
noinst_PROGRAMS += switch_stun
|
|
noinst_PROGRAMS += test_tts_format
|
|
noinst_PROGRAMS+= switch_hold switch_sip
|
|
noinst_PROGRAMS += switch_core_media
|
|
noinst_PROGRAMS += test_mod_verto
|
|
noinst_PROGRAMS += test_mod_event_socket
|
|
|
|
if HAVE_PCAP
|
|
noinst_PROGRAMS += switch_rtp_pcap
|
|
AM_LDFLAGS += $(PCAP_LIBS)
|
|
endif
|
|
|
|
AM_LDFLAGS += -avoid-version -no-undefined $(SWITCH_AM_LDFLAGS) $(openssl_LIBS)
|
|
AM_LDFLAGS += $(FREESWITCH_LIBS) $(switch_builddir)/libfreeswitch.la $(CORE_LIBS) $(APR_LIBS)
|
|
|
|
# "make check" will not run these.
|
|
examples = switch_eavesdrop
|
|
|
|
if HAVE_FVAD
|
|
AM_CFLAGS += -DSWITCH_HAVE_FVAD
|
|
endif
|
|
|
|
TESTS = $(noinst_PROGRAMS)
|
|
|
|
bin_PROGRAMS = $(examples)
|