]> 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)
committerGeorge Joseph <gjoseph@sangoma.com>
Mon, 8 Jul 2024 13:55:28 +0000 (13:55 +0000)
commita45e5ebf8d994056e9ea56a2e2fcc4156677cf4d
treed0a691444850ef01aa0b0b36e16666bfa97fef0e
parentf3404d83774949d4ff2b43143f619a33ef014cd7
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
res/res_pjsip/security_agreements.c
res/res_pjsip_outbound_registration.c