<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en">
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>



<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">

<p style="color: #777777;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a>
commented on a
discussion on <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1457#note_641959875">tests/tls13/key_share.c</a>:
</p>
<table>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="236" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
236
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC236" class="line" lang="c">    <span class="k" style="font-weight: 600;">do</span> <span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="237" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
237
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC237" class="line" lang="c">            <span class="n" style="color: #333;">ret</span> <span class="o" style="font-weight: 600;">=</span> <span class="n" style="color: #333;">gnutls_handshake</span><span class="p">(</span><span class="n" style="color: #333;">session</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="238" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
238
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC238" class="line" lang="c">            <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">ret</span> <span class="o" style="font-weight: 600;">==</span> <span class="n" style="color: #333;">GNUTLS_E_INTERRUPTED</span><span class="p">)</span> <span class="p">{</span> <span class="cm" style="color: #998; font-style: italic;">/* expected */</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="239" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
239
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC239" class="line" lang="c">                    <span class="k" style="font-weight: 600;">break</span><span class="p">;</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="240" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
240
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC240" class="line" lang="c">            <span class="p">}</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="241" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
241
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC241" class="line" lang="c">    <span class="p">}</span> <span class="k" style="font-weight: 600;">while</span> <span class="p">(</span><span class="n" style="color: #333;">ret</span> <span class="o" style="font-weight: 600;"><</span> <span class="mi" style="color: #099;">0</span> <span class="o" style="font-weight: 600;">&&</span> <span class="n" style="color: #333;">gnutls_error_is_fatal</span><span class="p">(</span><span class="n" style="color: #333;">ret</span><span class="p">)</span> <span class="o" style="font-weight: 600;">==</span> <span class="mi" style="color: #099;">0</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="242" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
242
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC242" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="243" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
243
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC243" class="line" lang="c">    <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">ret</span> <span class="o" style="font-weight: 600;"><</span> <span class="mi" style="color: #099;">0</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="244" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
244
</td>
<td class="new_line diff-line-num old" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC244" class="line" lang="c">            <span class="n" style="color: #333;">myfail</span><span class="p">(</span><span class="s" style="color: #d14;">"handshake error: %s</span><span class="se" style="color: #d14;">\n</span><span class="s" style="color: #d14;">"</span><span class="p">,</span> <span class="n" style="color: #333;">gnutls_strerror</span><span class="p">(</span><span class="n" style="color: #333;">ret</span><span class="p">));</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="245" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="165" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
165
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC165" class="line" lang="c">    <span class="cm" style="color: #998; font-style: italic;">/* Init client */</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="245" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="166" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
166
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC166" class="line" lang="c">    <span class="n" style="color: #333;">gnutls_certificate_allocate_credentials</span><span class="p">(</span><span class="o" style="font-weight: 600;">&</span><span class="n" style="color: #333;">ccred</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="245" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="167" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
167
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC167" class="line" lang="c">    <span class="n" style="color: #333;">assert</span><span class="p">(</span><span class="n" style="color: #333;">gnutls_certificate_set_x509_trust_mem</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="old_line diff-line-num new" data-linenumber="245" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
 
</td>
<td class="new_line diff-line-num new" data-linenumber="168" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #c7f0d2; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#ddfbe6">
168
</td>
<td class="line_content new" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC168" class="line" lang="c">           <span class="p">(</span><span class="n" style="color: #333;">ccred</span><span class="p">,</span> <span class="o" style="font-weight: 600;">&</span><span class="n" style="color: #333;">ca3_cert</span><span class="p">,</span> <span class="n" style="color: #333;">GNUTLS_X509_FMT_PEM</span><span class="p">)</span> <span class="o" style="font-weight: 600;">>=</span> <span class="mi" style="color: #099;">0</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="old_line diff-line-num" data-linenumber="245" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
245
</td>
<td class="new_line diff-line-num" data-linenumber="169" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #f0f0f0; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#fafafa">
169
</td>
<td class="line_content" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC169" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="246" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
246
</td>
<td class="new_line diff-line-num old" data-linenumber="170" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC246" class="line" lang="c">    <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">gnutls_group_get</span><span class="p">(</span><span class="n" style="color: #333;">session</span><span class="p">)</span> <span class="o" style="font-weight: 600;">!=</span> <span class="n" style="color: #333;">exp_group</span><span class="p">)</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="old_line diff-line-num old" data-linenumber="247" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
247
</td>
<td class="new_line diff-line-num old" data-linenumber="170" style="width: 35px; color: rgba(0,0,0,0.3); border-right-width: 1px; border-right-color: #fac5cd; border-right-style: solid; padding: 0 5px;" align="right" bgcolor="#f9d7dc">
 
</td>
<td class="line_content old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC247" class="line" lang="c">            <span class="n" style="color: #333;">myfail</span><span class="p">(</span><span class="s" style="color: #d14;">"group doesn't match the expected: %s</span><span class="se" style="color: #d14;">\n</span><span class="s" style="color: #d14;">"</span><span class="p">,</span> <span class="n" style="color: #333;">gnutls_group_get_name</span><span class="p">(</span><span class="n" style="color: #333;">gnutls_group_get</span><span class="p">(</span><span class="n" style="color: #333;">session</span><span class="p">)));</span></span>
</pre>
</td>
</tr>

</table>
<div style="">
<p dir="auto">Good catch, added it back.</p>
</div>


</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1457#note_641959875">view it on GitLab</a>.
<br>
You're receiving this email because of your account on gitlab.com.
If you'd like to receive fewer emails, you can
<a href="https://gitlab.com/-/sent_notifications/eb927d49d75f90d1ff532900fe81ef03/unsubscribe">unsubscribe</a>
from this thread or
adjust your notification settings.
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.com/gnutls/gnutls/-/merge_requests/1457#note_641959875"}}</script>


</p>
</div>
</body>
</html>