<!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 class="details" style="font-style: italic; color: #777;">
<a href="https://gitlab.com/ansasaki">Anderson Sasaki</a> created a merge request:
</p>
<p>
</p>
<div class="branch">
Project:Branches: ansasaki/gnutls:cli-wait-resumption to gnutls/gnutls:master
</div>
<div class="author">
Author: Anderson Sasaki
</div>
<div class="assignee">
Assignees:
</div>
<div class="approvers">
</div>
<div>
<p dir="auto">This adds the command line option <code>--waitresumption</code> to <code>gnutls-cli</code> to make the client to wait longer for the resumption data under TLS1.3. When the option is provided, the client will use a timeout increased by 5 seconds when waiting for the resumption data. If no ticket is received, then the execution continues as if the ticket was not sent by the server.</p>
<p dir="auto">This is useful to force the client to wait for the resumption data when the server takes long to send the ticket, allowing the session resumption to be tested. This is a common scenario in CI systems where the testing machines have limited resources.</p>
<p dir="auto">The changes were tested locally using <a href="https://github.com/tomato42/tlslite-ng" rel="nofollow noreferrer noopener" target="_blank">https://github.com/tomato42/tlslite-ng</a> server with the following patch applied to make the server to delay sending the resumption data:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">diff --git a/tlslite/tlsconnection.py b/tlslite/tlsconnection.py</span>
<span id="LC2" class="line" lang="plaintext">index 5c8dcc5..30cbd34 100644</span>
<span id="LC3" class="line" lang="plaintext">--- a/tlslite/tlsconnection.py</span>
<span id="LC4" class="line" lang="plaintext">+++ b/tlslite/tlsconnection.py</span>
<span id="LC5" class="line" lang="plaintext">@@ -2452,6 +2452,9 @@ class TLSConnection(TLSRecordLayer):</span>
<span id="LC6" class="line" lang="plaintext"> </span>
<span id="LC7" class="line" lang="plaintext"> encrypted_ticket = cipher.seal(iv, ticket.write(), b'')</span>
<span id="LC8" class="line" lang="plaintext"> </span>
<span id="LC9" class="line" lang="plaintext">+ # delay sending the ticket for a while</span>
<span id="LC10" class="line" lang="plaintext">+ time.sleep(1)</span>
<span id="LC11" class="line" lang="plaintext">+</span>
<span id="LC12" class="line" lang="plaintext"> # encapsulate the ticket and send to client</span>
<span id="LC13" class="line" lang="plaintext"> new_ticket = NewSessionTicket()</span>
<span id="LC14" class="line" lang="plaintext"> new_ticket.create(settings.ticketLifetime,</span></code></pre>
<h2 dir="auto">
<a id="user-content-checklist" class="anchor" href="#checklist" aria-hidden="true"></a>Checklist</h2>
<ul class="task-list" dir="auto">
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" checked disabled> Commits have <code>Signed-off-by:</code> with name/author being identical to the commit author</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" checked disabled> Code modified for feature</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> Test suite updated with functionality tests</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> Test suite updated with negative tests</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> Documentation updated / NEWS entry present (for non-trivial changes)</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> CI timeout is 2h or higher (see Settings/CICD/General pipelines/Timeout)</li>
</ul>
<h2 dir="auto">
<a id="user-content-reviewers-checklist" class="anchor" href="#reviewers-checklist" aria-hidden="true"></a>Reviewer's checklist:</h2>
<ul class="task-list" dir="auto">
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> Any issues marked for closing are addressed</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> There is a test suite reasonably covering new functionality or modifications</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> Function naming, parameters, return values, types, etc., are consistent and according to <code>CONTRIBUTION.md</code>
</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> This feature/change has adequate documentation added</li>
<li class="task-list-item">
<input type="checkbox" class="task-list-item-checkbox" disabled> No obvious mistakes in the code</li>
</ul>
</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/-/merge_requests/1232">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/64aa19dc1ab299fadc8395de6f206bdc/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/1232"}}</script>
</p>
</div>
</body>
</html>