<!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">
<div></div>
<h2 dir="auto">
<a id="user-content-description-of-problem" class="anchor" href="#description-of-problem" aria-hidden="true"></a>Description of problem:</h2>
<p dir="auto">When using <code>gnutls-cli</code>, the client will always send as much data as it was in the biggest line sent thus far (i.e. Enter does not insert a 0x00 character in the buffer). That means the server sees garbage (data from previous lines) when receiving the shorter lines from client.</p>
<h2 dir="auto">
<a id="user-content-version-of-gnutls-used" class="anchor" href="#version-of-gnutls-used" aria-hidden="true"></a>Version of gnutls used:</h2>
<p dir="auto"><a href="https://gitlab.com/gnutls/gnutls/commit/4e87865c0152a98b899272dbe7cf3a459e04b351" data-original="4e87865c0152a98b899272dbe7cf3a459e04b351" data-link="false" data-link-reference="false" data-project="179611" data-commit="4e87865c0152a98b899272dbe7cf3a459e04b351" data-reference-type="commit" data-container="body" data-placement="bottom" title="certtool: added example of converting to DER in manpage" class="gfm gfm-commit has-tooltip">4e87865c</a></p>
<h2 dir="auto">
<a id="user-content-distributor-of-gnutls-eg-ubuntu-fedora-rhel" class="anchor" href="#distributor-of-gnutls-eg-ubuntu-fedora-rhel" aria-hidden="true"></a>Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)</h2>
<p dir="auto">local compile, Fedora 27</p>
<h2 dir="auto">
<a id="user-content-how-reproducible" class="anchor" href="#how-reproducible" aria-hidden="true"></a>How reproducible:</h2>
<p dir="auto">Steps to Reproduce:</p>
<ul dir="auto">
<li><code>openssl req -x509 -newkey rsa -keyout /tmp/localhost.key -out /tmp/localhost.crt -subj /CN=localhost -nodes -batch</code></li>
<li><code>openssl s_server -key /tmp/localhost.key -cert /tmp/localhost.crt</code></li>
<li><code>gnutls-cli --insecure --port 4433 --inline-commands --priority NORMAL:+VERS-TLS1.3 localhost</code></li>
<li>on the gnutls-cli command line enter:
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">some very long line to send</span>
<span id="LC2" class="line" lang="plaintext">Hello!</span></code></pre>
</li>
</ul>
<h2 dir="auto">
<a id="user-content-actual-results" class="anchor" href="#actual-results" aria-hidden="true"></a>Actual results:</h2>
<p dir="auto">On the server side:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">No server certificate CA names sent</span>
<span id="LC2" class="line" lang="plaintext">CIPHER is TLS_AES_256_GCM_SHA384</span>
<span id="LC3" class="line" lang="plaintext">Secure Renegotiation IS NOT supported</span>
<span id="LC4" class="line" lang="plaintext">some very long line to send</span>
<span id="LC5" class="line" lang="plaintext">Hello!</span>
<span id="LC6" class="line" lang="plaintext">ry long line to send</span>
<span id="LC7" class="line" lang="plaintext">DONE</span>
<span id="LC8" class="line" lang="plaintext">shutting down SSL</span>
<span id="LC9" class="line" lang="plaintext">CONNECTION CLOSED</span></code></pre>
<h2 dir="auto">
<a id="user-content-expected-results" class="anchor" href="#expected-results" aria-hidden="true"></a>Expected results:</h2>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">No server certificate CA names sent</span>
<span id="LC2" class="line" lang="plaintext">CIPHER is TLS_AES_256_GCM_SHA384</span>
<span id="LC3" class="line" lang="plaintext">Secure Renegotiation IS NOT supported</span>
<span id="LC4" class="line" lang="plaintext">some very long line to send</span>
<span id="LC5" class="line" lang="plaintext">Hello!</span>
<span id="LC6" class="line" lang="plaintext">DONE</span>
<span id="LC7" class="line" lang="plaintext">shutting down SSL</span>
<span id="LC8" class="line" lang="plaintext">CONNECTION CLOSED</span></code></pre>

</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/534">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/5c2ba515264b99b03272783bd410d332/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/534"}}</script>
</p>
</div>
</body>
</html>