<p>Benjamin Keith Ford <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14447">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_stir_shaken: Add inbound INVITE support.<br><br>Integrated STIR/SHAKEN support with incoming INVITES. Upon receiving an<br>INVITE, the Identity header is retrieved, parsing the message to verify<br>the signature. If any of the parsing fails,<br>AST_STIR_SHAKEN_VERIFY_NOT_PRESENT will be added to the channel for this<br>caller ID. If verification itself fails,<br>AST_STIR_SHAKEN_VERIFY_SIGNATURE_FAILED will be added. If anything in<br>the payload does not line up with the SIP signaling,<br>AST_STIR_SHAKEN_VERIFY_MISMATCH will be added. If all of the above steps<br>pass, then AST_STIR_SHAKEN_VERIFY_PASSED will be added, completing the<br>verification process.<br><br>A new config option has been added to the general section for<br>stir_shaken.conf. "signature_timeout" is the amount of time a signature<br>will be considered valid. If an INVITE is received and the amount of<br>time between when it was received and when it was signed is greater than<br>signature_timeout, verification will fail.<br><br>Some changes were also made to signing and verification. There was an<br>error where the whole JSON string was being signed rather than the<br>header combined with the payload. This has been changed to sign the<br>correct thing. Verification has been changed to do this as well, and the<br>unit tests have been updated to reflect these changes.<br><br>A couple of utility functions have also been added. One decodes a BASE64<br>string and returns the decoded string, doing all the length calculations<br>for you. The other retrieves a string value from a header in an incoming<br>INVITE.<br><br>Change-Id: I855f857be3d1c63b64812ac35d9ce0534085b913<br>---<br>M include/asterisk/res_pjsip.h<br>M include/asterisk/res_stir_shaken.h<br>M include/asterisk/utils.h<br>M main/utils.c<br>M res/res_pjsip.c<br>M res/res_pjsip_stir_shaken.c<br>M res/res_stir_shaken.c<br>A res/res_stir_shaken.exports.in<br>M res/res_stir_shaken/general.c<br>M res/res_stir_shaken/general.h<br>10 files changed, 342 insertions(+), 34 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/47/14447/3</pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14447">change 14447</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/14447"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I855f857be3d1c63b64812ac35d9ce0534085b913 </div>
<div style="display:none"> Gerrit-Change-Number: 14447 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: newpatchset </div>