Skip to content

Commit 69b6fd9

Browse files
committed
Merge branch 'develop'
2 parents 85660b2 + d1f7cad commit 69b6fd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+6493
-976
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ src/openliprovisioner
2525
compile
2626
src/openlicollector
2727
src/openlimediator
28+
/*.yaml
29+
/*.pcap
30+
/*.pcap.gz
31+
/*.sh

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
OpenLI -- open source ETSI-compliant Lawful Intercept software
22

3-
Version: 1.1.14
3+
Version: 1.1.15
44

55
---------------------------------------------------------------------------
66

configure.ac

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Super primitive configure script
22

3-
AC_INIT([openli],[1.1.14],[[email protected]])
3+
AC_INIT([openli],[1.1.15],[[email protected]])
44

55
AM_INIT_AUTOMAKE([subdir-objects])
66
AC_CONFIG_SRCDIR(src/collector/collector.c)
@@ -52,6 +52,7 @@ AC_CHECK_LIB([uuid], [uuid_parse],,libuuid_found=0)
5252

5353
if test "x$libzmq_found" = "x1"; then
5454
COLLECTOR_LIBS="$COLLECTOR_LIBS -lzmq"
55+
MEDIATOR_LIBS="$MEDIATOR_LIBS -lzmq"
5556
fi
5657

5758
if test "x$libssl11_found" = "x1"; then
@@ -121,10 +122,10 @@ if test "x$enable_provisioner" != "xno"; then
121122
fi
122123

123124
if test "x$enable_collector" != "xno" -o "x$enable_mediator" != "xno"; then
124-
AC_CHECK_LIB([wandder], [wandder_decode_integer_value],libwandder_found=1,libwandder_found=0)
125+
AC_CHECK_LIB([wandder], [wandder_timeval_to_generalizedts],libwandder_found=1,libwandder_found=0)
125126

126127
if test "$libwandder_found" = 0; then
127-
AC_MSG_ERROR(Required library libwandder 2.0.6 or later not found; use LDFLAGS to specify library location)
128+
AC_MSG_ERROR(Required library libwandder 2.0.16 or later not found; use LDFLAGS to specify library location)
128129
fi
129130

130131

debian/changelog

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,51 @@
1+
openli (1.1.15-1) unstable; urgency=medium
2+
3+
* Collector: fix buffer overflow bug in GTP parsing code.
4+
* Collector: fix crash if the RabbitMQ server is restarted while the
5+
collector is running.
6+
* Mediator: enable RabbitMQ publisher confirms and some local buffering
7+
to reduce the possibility of ETSI records being lost if RabbitMQ
8+
is restarted during an active intercept.
9+
* Collector: enable RabbitMQ publisher confirms when using RMQ to send
10+
ETSI records to the mediator(s).
11+
* Mediator: fix crashes that can occur if the country code for an
12+
agency is not configured.
13+
* Add option to choose the timestamp format to be used in encoded ETSI
14+
PSHeaders (either microsecondTimestamp or generalizedTime).
15+
* Collector: fix bug where long running SIP calls would be incorrectly
16+
expired due to "inactivity".
17+
* Collector: fix crash if the collector is configured to operate with
18+
zero SIP worker threads.
19+
* REST API: fix bug where the 'lastseen' property for a mediator was
20+
being updated even when the mediator had disconnected.
21+
* REST API: fix bug where it was not possible to change the destination
22+
mediator for an intercept via the REST API.
23+
* Add ability to configure a retransmit window for agency
24+
handovers (i.e. the amount of handover data that should be retransmitted
25+
if the TCP session for that handover fails). Defaults to zero kilobytes.
26+
* Add configuration option to specify how many seconds to
27+
wait between connection attempts for handovers. Defaults to 10 seconds.
28+
* Add experimental support for including Integrity Check PDUs in the
29+
handover stream, as per Annex J of ETSI TS 102 232-1. By default,
30+
integrity checks are disabled but may be enabled on a per-agency basis.
31+
* Provisioner: fix crash that occurred if using the REST API when the running
32+
intercept configuration file was not writable.
33+
* REST API: add information about the listening X2/X3 endpoints to the
34+
response to a 'collectors/' request.
35+
* REST API: collector identifiers now include the operator ID,
36+
network element ID and intercept point ID -- this replaces the previous
37+
identifier which simply used the collector's IP address.
38+
* Provisioner: fix crash when a collector reconnects to the provisioner,
39+
due to an idle timer for the previous collector instance remaining active
40+
upon reconnection.
41+
* Collector: fix 100% CPU loop when a forwarding thread failed to connect
42+
to a RabbitMQ broker.
43+
* Payload encryption is now performed by the mediator(s) rather than by
44+
the collectors -- this change was required to support the integrity
45+
check feature.
46+
47+
-- Shane Alcock <[email protected]> Sun, 12 Oct 2025 18:31:41 +1300
48+
149
openli (1.1.14-1) unstable; urgency=medium
250

351
* Add support for new RabbitMQ header file structure added in

debian/control

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Section: net
33
Priority: optional
44
Maintainer: Shane Alcock <[email protected]>
55
Build-Depends: debhelper-compat (= 12), dh-autoreconf,
6-
libtrace4-dev (>= 4.0.28), libyaml-dev, uthash-dev, libwandder2-dev (>=2.0.14),
6+
libtrace4-dev (>= 4.0.28), libyaml-dev, uthash-dev, libwandder2-dev (>=2.0.16),
77
libjudy-dev, libzmq3-dev, libgoogle-perftools-dev, libosip2-dev (>=5.0.0),
88
libssl-dev, librabbitmq-dev, libb64-dev, uuid-dev,
99
libmicrohttpd-dev, libjson-c-dev, libsqlcipher-dev, zlib1g-dev
@@ -30,7 +30,7 @@ Package: openli-mediator
3030
Section: net
3131
Architecture: any
3232
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, adduser,
33-
rabbitmq-server, procps
33+
rabbitmq-server, procps, libwandder2 (>=2.0.16)
3434
Recommends: strongswan
3535
Description: Mediation daemon for an OpenLI system
3636
OpenLI is a software suite that allows network operators to conduct
@@ -47,7 +47,7 @@ Package: openli-collector
4747
Section: net
4848
Architecture: any
4949
Depends: ${shlibs:Depends}, ${misc:Depends}, lsb-base, procps,
50-
rabbitmq-server, adduser, libwandder2 (>=2.0.13)
50+
rabbitmq-server, adduser, libwandder2 (>=2.0.16)
5151
Description: Collector daemon for an OpenLI system
5252
OpenLI is a software suite that allows network operators to conduct
5353
lawful interception of Internet traffic that is compliant with the

debian/openli-provisioner.postinst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ case "$1" in
3636
chmod 0640 /etc/openli/.intercept-encrypt
3737
fi
3838

39+
if [ ! -f /etc/openli/integrity-key.pem ]; then
40+
openssl ecparam -name prime256v1 -genkey -noout -out /etc/openli/integrity-key.pem
41+
openssl ec -in /etc/openli/integrity-key.pem -pubout -out /etc/openli/integrity-public.pem
42+
43+
chmod 0600 /etc/openli/integrity-key.pem /etc/openli/integrity-public.pem
44+
fi
45+
3946
chown -R ${USER}: /etc/openli
4047
chown -R ${USER}: /var/lib/openli
4148
chown -R ${USER}: /var/run/openli

debian/openli-provisioner.postrm

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ case "$1" in
77
rm -f /etc/openli/provauthdb.phrase
88
rm -f /etc/openli/.intercept-encrypt
99
rm -f /etc/openli/*.yaml
10+
rm -f /etc/openli/integrity-key.pem
11+
rm -f /etc/openli/integrity-public.pem
1012

1113
;;
1214
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)

doc/ProvisionerDoc.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,20 @@ following options:
469469
* `restauthkey` -- the passphrase needed to decrypt the SQLite3 database
470470

471471

472+
If you are enabling the sending of Integrity Check PDUs to any of the
473+
law enforcement agencies that will be managed by this provisioner, you
474+
will need to supply a TLS private key for signing some of the hash digests
475+
included in those PDUs. To do this, you will need to provide the following
476+
option:
477+
478+
* `integrity-signing-private-key` -- the path to the file containing the
479+
private key that is to be used to
480+
sign integrity checks.
481+
482+
See https://github.com/OpenLI-NZ/openli/wiki/Integrity-Checks for more
483+
information on how to create a key and enable Integrity Checks for a
484+
particular agency.
485+
472486
### Intercept Configuration Syntax
473487
Intercept configuration, i.e. current intercepts, recipient agencies and
474488
special servers, is stored in a separate YAML file. Ideally, a user would
@@ -507,6 +521,68 @@ key-value elements:
507521
connection. Defaults to 30. If set to zero, the mediator
508522
will not require a response to keep alives to maintain the
509523
handover connections.
524+
* `connectretrywait` -- the amount of time (in seconds) to wait between attempts
525+
to connect to an agency handover. Defaults to 10
526+
seconds.
527+
* `resendwindow` -- the amount of buffered data to retransmit when a handover
528+
reconnects after a disconnection event (in KBs). Defaults
529+
to zero (i.e. don't retransmit anything that was sent
530+
prior to the disconnection).
531+
* `timestampformat` -- the timestamp field to include in the ETSI PS Header
532+
when encoding records to send to this agency. Allowed
533+
options are "microseconds" to use the
534+
"MicroSecondTimeStamp" field, and "generalized" to use
535+
the "GeneralizedTime" field. The default is
536+
"microseconds".
537+
* `payloadencryption` -- Specifies if the CC and IRI contents sent to this
538+
agency should be encrypted and, if so, which
539+
encryption method to use. If set to "none", no
540+
encryption is performed.
541+
The only encryption method supported right now is
542+
"aes-192-cbc".
543+
The default setting is "none".
544+
* `encryptionkey` -- The encryption key to use when encrypting CC and
545+
IRI contents. This option is mandatory if
546+
`payloadencryption` is NOT set to "none". The
547+
ideal key length is 24 characters. Shorter keys
548+
will be padded with null bytes, longer keys will be
549+
truncated to 24 characters.
550+
* `integrity` -- a YAML mapping object that defines whether integrity check
551+
messages should be sent to this agency, and how these messages
552+
should be generated.
553+
554+
If Integrity Check records are required, the configuration parameters for
555+
these records can be set by specifying fields inside the `integrity` object
556+
mentioned above. Note that the agency will most likely tell you what values
557+
it wants configured for these options, so do not worry too much about having
558+
to decide what to choose for each option.
559+
560+
The available fields are:
561+
* `enabled` -- if true, integrity check records will be sent to this agency.
562+
Defaults to false (i.e. no integrity checks).
563+
* `hashmethod` -- the algorithm to use when generating message digests from
564+
the intercepted data PDUs. Defaults to `sha-256`, but
565+
`sha-1`, `sha-384` and `sha-512` are also supported.
566+
* `signedhashmethod` -- the algorithm to use when generated a digest from
567+
previous message digests that is going to be signed
568+
using a private key. Defaults to `sha-256` but
569+
`sha-1`, `sha-384` and `sha-512` are also supported.
570+
* `hashtimeout` -- produce an integrity check containing a message digest hash
571+
within this number of seconds after seeing the oldest
572+
unhashed data PDU. Defaults to 1 second.
573+
* `datapducount` -- produce an integrity check containing a message digest hash
574+
as soon as this number of unhashed data PDUs have been seen.
575+
Defaults to 1000 PDUs.
576+
* `signtimeout` -- produce an integrity check containing a signed digest hash
577+
of the preceding message digests within this number of
578+
seconds after sending the oldest unsigned digest hash.
579+
Defaults to 30 seconds.
580+
* `hashpducount` -- produce an integrity check containing a signed digest hash
581+
of the preceding message digests as soon as the number of
582+
unsigned digest hashes exceeds this value. Defaults to 15
583+
digest hashes.
584+
585+
---
510586

511587
VOIP, Email and IPintercepts are also expressed as a YAML sequence, with a key
512588
of `voipintercepts:`, `emailintercepts:`, and `ipintercepts:` respectively.
@@ -670,6 +746,11 @@ All intercept types also support the following optional key-value elements:
670746
ideal key length is 24 characters. Shorter keys
671747
will be padded with null bytes, longer keys will be
672748
truncated to 24 characters.
749+
750+
Note that encryption configuration provided at the intercept level will
751+
override any encryption configuration that has been set at the agency level
752+
for the agency that the intercept is destined for.
753+
673754
---
674755

675756
The default approach for delivering compressed email content to the agencies

doc/exampleconfigs/provisioner-example.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ encrypt-intercept-config-file: no
3838
# if an LEA reports difficulty with decoding your intercepted RTP streams.
3939
voip-ignorecomfort: no
4040

41+
# You may be required to send integrity check messages to at least one of
42+
# the agencies for which you are providing intercepts. If so, some of these
43+
# messages will need to be signed, and this configuration option allows you
44+
# to specify where to find the DSA private key that should be used for
45+
# generating those signatures.
46+
integrity-signing-private-key: /etc/openli/integrity-key.pem
47+
4148
# Location of the SQLite3 database where credentials and API keys are stored
4249
# for authorised access to the REST API. If this option is not present,
4350
# then the REST API can be used without authentication.

doc/exampleconfigs/running-intercept-example.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ agencies:
7171
# (5 minutes), if handover is idle
7272
keepalivewait: 30 # agency must respond to a keep alive within
7373
# 30 seconds to avoid being disconnected
74+
connectretrywait: 30 # wait 30 seconds between attempts to connect
75+
# to either handover
76+
resendwindow: 256 # retransmit the last 256KB of data when a
77+
# handover recovers from a disconnection
78+
timestampformat: "generalized" # include the GeneralizedTime timeStamp
79+
# field in the PS header of all records
80+
# sent to this agency
7481

7582
- agencyid: "Spooks" # id must be unique per agency
7683
agencycountrycode: "NZ" # 2 letter country code (ISO 3166) matching the
@@ -83,6 +90,11 @@ agencies:
8390
# (2 minutes), if handover is idle
8491
keepalivewait: 0 # agency does not respond to keep alives, so
8592
# don't disconnect if no response is received
93+
connectretrywait: 5 # wait 5 seconds between attempts to connect
94+
# to either handover
95+
timestampformat: "microseconds" # include the microSecondTimeStamp
96+
# field in the PS header of all records
97+
# sent to this agency
8698

8799
# List of active IP intercepts.
88100
# To change intercepts for a running OpenLI process, modify the intercept list

0 commit comments

Comments
 (0)