<!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=utf-8" 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/rockdaboot">Tim Rühsen</a>
commented on a discussion
on <a href="https://gitlab.com/gnutls/gnutls/merge_requests/891#note_134834402">lib/ext/server_name.c</a>:
</p>
<table>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="105" 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">
105
</td>
<td class="diff-line-num new_line" data-linenumber="105" 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">
105
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC105" class="line" lang="c">                    <span class="n" style="color: #333;">DECR_LEN</span><span class="p">(</span><span class="n" style="color: #333;">data_size</span><span class="p">,</span> <span class="n" style="color: #333;">len</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="106" 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">
106
</td>
<td class="diff-line-num new_line" data-linenumber="106" 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">
106
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC106" class="line" lang="c"></span>
</pre>
</td>
</tr>
<tr class="line_holder" id="">
<td class="diff-line-num old_line" data-linenumber="107" 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">
107
</td>
<td class="diff-line-num new_line" data-linenumber="107" 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">
107
</td>
<td class="line_content noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;">
<pre style="margin: 0;"> <span id="LC107" class="line" lang="c">                    <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="n" style="color: #333;">type</span> <span class="o" style="font-weight: 600;">==</span> <span class="mi" style="color: #099;">0</span><span class="p">)</span> <span class="p">{</span> <span class="cm" style="color: #998; font-style: italic;">/* NAME_DNS */</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="diff-line-num old old_line" data-linenumber="108" 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">
108
</td>
<td class="diff-line-num new_line old" data-linenumber="108" 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 noteable_line old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC108" class="line" lang="c">                            <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="o" style="font-weight: 600;">!</span><span class="n" style="color: #333;">_gnutls_dnsname_is_valid</span><span class="p">((</span><span class="kt" style="color: #458; font-weight: 600;">char</span><span class="o" style="font-weight: 600;">*</span><span class="p">)</span><span class="n" style="color: #333;">p</span><span class="p">,</span> <span class="n" style="color: #333;">len</span><span class="p">))</span></span>
</pre>
</td>
</tr>
<tr class="line_holder old" id="">
<td class="diff-line-num old old_line" data-linenumber="109" 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">
109
</td>
<td class="diff-line-num new_line old" data-linenumber="108" 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 noteable_line old" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#fbe9eb">
<pre style="margin: 0;">-<span id="LC109" class="line" lang="c">                                    <span class="k" style="font-weight: 600;">return</span> <span class="n" style="color: #333;">gnutls_assert_val</span><span class="p">(</span><span class="n" style="color: #333;">GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="110" 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="diff-line-num new new_line" data-linenumber="108" 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">
108
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC108" class="line" lang="c">                            <span class="k" style="font-weight: 600;">if</span> <span class="p">(</span><span class="o" style="font-weight: 600;">!</span><span class="n" style="color: #333;">_gnutls_dnsname_is_valid</span><span class="p">((</span><span class="kt" style="color: #458; font-weight: 600;">char</span><span class="o" style="font-weight: 600;">*</span><span class="p">)</span><span class="n" style="color: #333;">p</span><span class="p">,</span> <span class="n" style="color: #333;">len</span><span class="p">))</span> <span class="p">{</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="110" 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="diff-line-num new new_line" data-linenumber="109" 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">
109
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC109" class="line" lang="c">                                    <span class="n" style="color: #333;">_gnutls_handshake_log</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="110" 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="diff-line-num new new_line" data-linenumber="110" 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">
110
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC110" class="line" lang="c">                                        <span class="p">(</span><span class="s" style="color: #d14;">"HSK[%p]: Server name is not acceptable: '%.*s'</span><span class="se" style="color: #d14;">\n</span><span class="s" style="color: #d14;">"</span><span class="p">,</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="110" 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="diff-line-num new new_line" data-linenumber="111" 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">
111
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC111" class="line" lang="c">                                         <span class="n" style="color: #333;">session</span><span class="p">,</span> <span class="p">(</span><span class="kt" style="color: #458; font-weight: 600;">int</span><span class="p">)</span> <span class="n" style="color: #333;">len</span><span class="p">,</span> <span class="n" style="color: #333;">p</span><span class="p">);</span></span>
</pre>
</td>
</tr>
<tr class="line_holder new" id="">
<td class="diff-line-num new old_line" data-linenumber="110" 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="diff-line-num new new_line" data-linenumber="112" 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">
112
</td>
<td class="line_content new noteable_line" style="padding-left: 0.5em; padding-right: 0.5em;" bgcolor="#ecfdf0">
<pre style="margin: 0;">+<span id="LC112" class="line" lang="c">                                    <span class="k" style="font-weight: 600;">return</span> <span class="n" style="color: #333;">gnutls_assert_val</span><span class="p">(</span><span class="n" style="color: #333;">GNUTLS_E_UNRECOGNIZED_NAME</span><span class="p">);</span></span>
</pre>
</td>
</tr>

</table>
<div style="">
<p dir="auto">As <a href="https://gitlab.com/dueno" data-user="470892" data-reference-type="user" data-container="body" data-placement="bottom" class="gfm gfm-project_member" title="Daiki Ueno">@dueno</a> pointed out in <a href="https://gitlab.com/gnutls/gnutls/issues/683#note_134637845" data-original="https://gitlab.com/gnutls/gnutls/issues/683#note_134637845" data-link="false" data-link-reference="true" data-project="179611" data-issue="17616804" data-reference-type="issue" data-container="body" data-placement="bottom" title="OpenSSL IPv6 PSK Incompatibility" class="gfm gfm-issue has-tooltip">#683 (comment 134637845)</a>, the standards demand <code>ILLEGAL_PARAMETER</code>. So I changed the return value back to <code>GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER</code> and just left the logging message in. It gives us an explanation what happened with <code>gnutls-serv -d 4</code>.</p>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/merge_requests/891#note_134834402">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/5315b005c84a2b7145b45117815e4f44/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/891#note_134834402"}}</script>
</p>
</div>
</body>
</html>