<!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/boekhold">Maarten Boekhold</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/-/issues/990#note_349129974">discussion</a>:
</p>
<div style="">
<p dir="auto"><a href="https://gitlab.com/rockdaboot" data-user="267665" data-reference-type="user" data-container="body" data-placement="top" data-html="true" class="gfm gfm-project_member js-user-link" title="Tim Rühsen">@rockdaboot</a> Can I ask one question? How is <code>gnutls-cli-debug</code> able to complete successfully, while <code>gnutls-cli</code> is not?</p>
<p dir="auto">If I run <code>gnutls-cli-debug -d 4 github.com</code>, I can see:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">|<4>| HSK[0x558b10fd4620]: CLIENT HELLO was queued [254 bytes]</span>
<span id="LC2" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[get_last_packet]:1168</span>
<span id="LC3" class="line" lang="plaintext">|<4>| HSK[0x558b10fd4620]: SERVER HELLO (2) was received. Length 93[93], frag offset 0, frag length: 93, sequence: 0</span>
<span id="LC4" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[get_last_packet]:1159</span>
<span id="LC5" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[_gnutls_handshake_io_recv_int]:1411</span></code></pre>
<p dir="auto">If on the other hand I run <code>gnutls-cli -d 4 github.com</code>, I never get passed the <code>CLIENT HELLO was queued</code>:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext"><4>| HSK[0x55da6730e920]: CLIENT HELLO was queued [351 bytes]</span>
<span id="LC2" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[get_last_packet]:1168</span>
<span id="LC3" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[_gnutls_stream_read]:337</span>
<span id="LC4" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[_gnutls_io_read_buffered]:589</span>
<span id="LC5" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/record.c[recv_headers]:1183</span>
<span id="LC6" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/record.c[_gnutls_recv_in_buffers]:1309</span>
<span id="LC7" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/buffers.c[_gnutls_handshake_io_recv_int]:1446</span>
<span id="LC8" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/handshake.c[_gnutls_recv_handshake]:1531</span>
<span id="LC9" class="line" lang="plaintext">|<3>| ASSERT: ../../lib/handshake.c[handshake_client]:2918</span>
<span id="LC10" class="line" lang="plaintext">*** Fatal error: The operation timed out</span></code></pre>
<p dir="auto">Note however that the CLIENT HELLO packets are clearly different. With <code>gnutls-cli-debug -d 4 github.com 2>&1 | grep 'CLIENT HELLO'</code>, I can see that it's never using the same CLIENT HELLO packet as <code>gnutls-cli github.com</code>.</p>
<p dir="auto">I've discovered as well that the following 2 invocations work!</p>
<ul dir="auto">
<li><code>gnutls-cli --priority=PERFORMANCE github.com</code></li>
<li><code>gnutls-cli --priority=SECURE128 github.com</code></li>
</ul>
<p dir="auto">Using <code>SECURE256</code> results in:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">$ gnutls-cli --priority=SECURE256 github.com</span>
<span id="LC2" class="line" lang="plaintext">Processed 128 CA certificate(s).</span>
<span id="LC3" class="line" lang="plaintext">Resolving 'github.com:443'...</span>
<span id="LC4" class="line" lang="plaintext">Connecting to '140.82.118.3:443'...</span>
<span id="LC5" class="line" lang="plaintext">*** Fatal error: A TLS fatal alert has been received.</span>
<span id="LC6" class="line" lang="plaintext">*** Received alert [40]: Handshake failed</span></code></pre>
<p dir="auto">Also discovered is that <code>gnutls-cli --priority=NORMAL:-VERS-TLS1.3 github.com</code> is working. So this looks to be something related to TLSv1.3...</p>
<p dir="auto">I'll continue digging, suggestions to narrow down the priorities to exclude would be much appreciated however.</p>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/990#note_349129974">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/43524ecb15f4c02d2eb1c06cfb9bbdda/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 Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/990#note_349129974"}}</script>


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