<p>Alexander Traud has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/14415">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_srtp: Set all possible flags while selecting the Crypto Suite.<br><br>The flags of a previous selection could have been set within the<br>object 'srtp', for example, when the previous selection returned<br>failure after setting just 'some' flags. Now, not to clutter the<br>code, all possible flags are cleared first, and then the selected<br>flags are set as before.<br><br>ASTERISK-28903<br><br>Change-Id: I1b9d7aade7d5120244ce7e3a8865518cbd6e0eee<br>---<br>M res/res_srtp.c<br>1 file changed, 8 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/15/14415/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/res/res_srtp.c b/res/res_srtp.c</span><br><span>index 3e4b51f..7874216 100644</span><br><span>--- a/res/res_srtp.c</span><br><span>+++ b/res/res_srtp.c</span><br><span>@@ -863,6 +863,14 @@</span><br><span> crypto->tag = tag_from_sdp;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_TAG_8);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_TAG_16);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_TAG_32);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_TAG_80);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_AES_192);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_AES_256);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_clear_flag(srtp, AST_SRTP_CRYPTO_OLD_NAME);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> if (!strcmp(suite, "AES_CM_128_HMAC_SHA1_80")) {</span><br><span> suite_val = AST_AES_CM_128_HMAC_SHA1_80;</span><br><span> ast_set_flag(srtp, AST_SRTP_CRYPTO_TAG_80);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/14415">change 14415</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/+/14415"/><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: I1b9d7aade7d5120244ce7e3a8865518cbd6e0eee </div>
<div style="display:none"> Gerrit-Change-Number: 14415 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Alexander Traud <pabstraud@compuserve.com> </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>