]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_stir_shaken: Allow sending Identity headers for unknown TNs
authorGeorge Joseph <gjoseph@sangoma.com>
Fri, 8 Nov 2024 18:22:12 +0000 (11:22 -0700)
committerasterisk-org-access-app[bot] <120671045+asterisk-org-access-app[bot]@users.noreply.github.com>
Wed, 20 Nov 2024 21:38:42 +0000 (21:38 +0000)
commit1646b789862a9f282936398effc9cf8c8267bf29
tree9d6928a711abf7267171e1886d4776f00cec2da9
parent2694f78d03b91abfd82c3818af7d1d1d0bd5e0ca
res_stir_shaken: Allow sending Identity headers for unknown TNs

Added a new option "unknown_tn_attest_level" to allow Identity
headers to be sent when a callerid TN isn't explicitly configured
in stir_shaken.conf.  Since there's no TN object, a private_key_file
and public_cert_url must be configured in the attestation or profile
objects.

Since "unknown_tn_attest_level" uses the same enum as attest_level,
some of the sorcery macros had to be refactored to allow sharing
the enum and to/from string conversion functions.

Also fixed a memory leak in crypto_utils:pem_file_cb().

Resolves: #921

UserNote: You can now set the "unknown_tn_attest_level" option
in the attestation and/or profile objects in stir_shaken.conf to
enable sending Identity headers for callerid TNs not explicitly
configured.
configs/samples/stir_shaken.conf.sample
res/res_stir_shaken/attestation_config.c
res/res_stir_shaken/common_config.h
res/res_stir_shaken/crypto_utils.c
res/res_stir_shaken/profile_config.c
res/res_stir_shaken/stir_shaken_doc.xml
res/res_stir_shaken/tn_config.c
res/res_stir_shaken/verification_config.c