<p>Benjamin Keith Ford <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16154">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, but someone else must approve
Benjamin Keith Ford: Looks good to me, approved; Approved for Submit
George Joseph: Looks good to me, but someone else must approve
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_stir_shaken: RFC 8225 compliance and error message cleanup.<br><br>From RFC 8225 Section 5.2.1:<br><br> The "dest" claim is a JSON object with the claim name of "dest"<br> and MUST have at least one identity claim object. The "dest"<br> claim value is an array containing one or more identity claim JSON<br> objects representing the destination identities of any type<br> (currently "tn" or "uri"). If the "dest" claim value array<br> contains both "tn" and "uri" claim names, the JSON object should<br> list the "tn" array first and the "uri" array second. Within the<br> "tn" and "uri" arrays, the identity strings should be put in<br> lexicographical order, including the scheme-specific portion of<br> the URI characters.<br><br>Additionally, make it clear that there was a failure to sign the JWT<br>payload and not necessarily a memory allocation failure.<br><br>Change-Id: Ia8733b861aef6edfaa9c2136e97b447a01578dc9<br>---<br>M res/res_pjsip_stir_shaken.c<br>1 file changed, 2 insertions(+), 2 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_pjsip_stir_shaken.c b/res/res_pjsip_stir_shaken.c</span><br><span>index 42d638f..1519d34 100644</span><br><span>--- a/res/res_pjsip_stir_shaken.c</span><br><span>+++ b/res/res_pjsip_stir_shaken.c</span><br><span>@@ -258,7 +258,7 @@</span><br><span> ast_copy_pj_str(dest_tn, &uri->user, uri->user.slen + 1);</span><br><span> </span><br><span> /* x5u (public key URL), attestation, and origid will be added by ast_stir_shaken_sign */</span><br><span style="color: hsl(0, 100%, 40%);">- json = ast_json_pack("{s: {s: s, s: s, s: s}, s: {s: {s: s}, s: {s: s}}}",</span><br><span style="color: hsl(120, 100%, 40%);">+ json = ast_json_pack("{s: {s: s, s: s, s: s}, s: {s: {s: [s]}, s: {s: s}}}",</span><br><span> "header", "alg", "ES256", "ppt", "shaken", "typ", "passport",</span><br><span> "payload", "dest", "tn", dest_tn, "orig", "tn",</span><br><span> session->id.number.str);</span><br><span>@@ -269,7 +269,7 @@</span><br><span> </span><br><span> ss_payload = ast_stir_shaken_sign(json);</span><br><span> if (!ss_payload) {</span><br><span style="color: hsl(0, 100%, 40%);">- ast_log(LOG_ERROR, "Failed to allocate memory for STIR/SHAKEN payload\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "Failed to sign STIR/SHAKEN payload\n");</span><br><span> return -1;</span><br><span> }</span><br><span> </span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/16154">change 16154</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/+/16154"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 16 </div>
<div style="display:none"> Gerrit-Change-Id: Ia8733b861aef6edfaa9c2136e97b447a01578dc9 </div>
<div style="display:none"> Gerrit-Change-Number: 16154 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Sean Bright <sean@seanbright.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-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>