]> 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:22:18 +0000 (13:22 +0000)
commit8fc3df467ee809df3dc73e2395b360f5325a7c2b
tree1a71b73b0d10b2b82b9966265bda22d8302194d2
parent9f9a6cf46e304593c65d4299bb7fdd73417f3b9d
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 1d9f43b5a56fcc0cdaaf0ec8235b7c7f53a97707)
res/res_pjsip/security_agreements.c
res/res_pjsip_outbound_registration.c