]> 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)
committerGeorge Joseph <gjoseph@sangoma.com>
Wed, 20 Nov 2024 21:38:37 +0000 (21:38 +0000)
commite9f336b47bc034561cab18b52af7fd73abe1778e
tree1d5b60a8cb15707438d80cbeb6e442b55b117ef5
parent1f67825a910bf137e6e3d3ee8155aff7be81dd96
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