<p><a href="https://gerrit.asterisk.org/c/asterisk/+/14031">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14031/1/res/res_stir_shaken.c">File res/res_stir_shaken.c:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14031/1/res/res_stir_shaken.c@236">Patch Set #1, Line 236:</a> <code style="font-family:monospace,monospace"> encoded_signature = ast_calloc(1, sizeof(unsigned char) * (signature_length + 1));</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Does this actually provide enough space?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I'm looking into this. From what I can tell, there doesn't appear to be any kind of calculation to determine what the length would be. Should we just allocate a "reasonable" amount of space?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14031/1/res/res_stir_shaken.c@324">Patch Set #1, Line 324:</a> <code style="font-family:monospace,monospace"> payload = stir_shaken_verify_json(json);</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">If you are signing some parts won't be present which is critical, because they will be added by us. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Which parts should it not be checking for? Currently it's checking 'ppt', 'typ', 'alg', 'orign->tn', 'x5u' (public key URL), and of course for the two different sections ('header' and 'payload') in the JWT. I thought the only values added by us included 'attest', 'iat', and 'origid'. I can add or drop any checks that are / aren't necessary</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14031/1/res/res_stir_shaken.c@329">Patch Set #1, Line 329:</a> <code style="font-family:monospace,monospace">      /* From the payload section of the HSON, get the orig section, and then get</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">JSON</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I knew I would miss one...</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.asterisk.org/c/asterisk/+/14031/1/res/res_stir_shaken.c@370">Patch Set #1, Line 370:</a> <code style="font-family:monospace,monospace"></code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">The public key URL also needs to be added</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The public key URL should already be there as 'x5u' unless I'm misunderstanding</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14031">change 14031</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/+/14031"/><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: I74fa41c0640ab2a64a1a80110155bd7062f13393 </div>
<div style="display:none"> Gerrit-Change-Number: 14031 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 30 Mar 2020 15:38:47 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>