]> git.ipfire.org Git - thirdparty/asterisk.git/commit
security_agreement.c: Always add the Require and Proxy-Require headers
authorGeorge Joseph <gjoseph@sangoma.com>
Wed, 3 Jul 2024 20:50:47 +0000 (14:50 -0600)
committerAsterisk Development Team <asteriskteam@digium.com>
Thu, 11 Jul 2024 13:23:24 +0000 (13:23 +0000)
commit4d5b30ca1ca9df1762d21003b190b7d63abdf722
treea9b5e3322826cafc818ad30e1c5bda38cfbbbfe5
parent21aa3d557fd9f5de16ab40e7ac5301128eb86df4
security_agreement.c: Always add the Require and Proxy-Require headers

The `Require: mediasec` and `Proxy-Require: mediasec` headers need
to be sent whenever we send `Security-Client` or `Security-Verify`
headers but the logic to do that was only in add_security_headers()
in res_pjsip_outbound_register.  So while we were sending them on
REGISTER requests, we weren't sending them on INVITE requests.

This commit moves the logic to send the two headers out of
res_pjsip_outbound_register:add_security_headers() and into
security_agreement:ast_sip_add_security_headers().  This way
they're always sent when we send `Security-Client` or
`Security-Verify`.

Resolves: #789
(cherry picked from commit 210fe614b29eee260cf87b15265da22c64a1e710)
res/res_pjsip/security_agreements.c
res/res_pjsip_outbound_registration.c