<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<div style="color: #333333; border-bottom-width: 8px; border-bottom-color: #ededed; border-bottom-style: solid; font-weight: bold; line-height: 1.4; padding: 20px 0;">
Merge request <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1936">!1936</a> was reviewed by <a href="https://gitlab.com/valdaarhun">Sahil Siddiq</a>
</div>
<p style="color: #777777;">
<a href="https://gitlab.com/valdaarhun">Sahil Siddiq</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1936#note_2350107420">discussion</a>:
</p>
<div class="md" style="border-bottom-width: 4px; border-bottom-color: #ededed; border-bottom-style: solid; padding-bottom: 1em; position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">From the description above:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">max_early_data_size is initialized as 0 on the client side, and set only after receiving NewSessionTicket. There are, however, no ways to preserve the max_early_data_size value across multiple calls to gnutls_init.</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Based on what I have understood, <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;'>max_early_data_size</code> is set for the first time when the client receives NewSessionTicket during the second session. <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;'>gnutls_record_set_max_early_data_size</code> is then used to persist this value so that the client retains this without having to receive another session ticket in subsequent sessions. Is my understanding correct?</p>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">I tried running the test on my machine. It fails when trying to reconnect to the server. Here's the output:</p>
<div class="gl-relative markdown-code-block js-markdown-code" style="margin-bottom: 0;">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">reserved port 53868</span>
<span id="LC2" class="line" lang="plaintext">Echo Server listening on IPv4 0.0.0.0 port 53868...done</span>
<span id="LC3" class="line" lang="plaintext">Echo Server listening on IPv6 :: port 53868...done</span>
<span id="LC4" class="line" lang="plaintext">error sending early data</span>
<span id="LC5" class="line" lang="plaintext">Error in handshake: The TLS connection was non-properly terminated.</span>
<span id="LC6" class="line" lang="plaintext">Processed 1 CA certificate(s).</span>
<span id="LC7" class="line" lang="plaintext">Resolving 'localhost:53868'...</span>
<span id="LC8" class="line" lang="plaintext">Connecting to '::1:53868'...</span>
<span id="LC9" class="line" lang="plaintext">- Certificate type: X.509</span>
<span id="LC10" class="line" lang="plaintext">- Got a certificate list of 1 certificates.</span>
<span id="LC11" class="line" lang="plaintext">- Certificate[0] info:</span>
<span id="LC12" class="line" lang="plaintext"> - subject `CN=localhost', issuer `CN=GnuTLS Test CA', serial 0x53662b3911be18cb, EC/ECDSA key 256 bits, signed using RSA-SHA256, activated `2014-05-04 11:57:46 UTC', expires `9999-12-31 23:59:59 UTC', pin-sha256="3BRRBzy9UTnQoTsZrEiVZm9GKvX1V946kDNinW6F2L4="</span>
<span id="LC13" class="line" lang="plaintext"> Public Key ID:</span>
<span id="LC14" class="line" lang="plaintext"> sha1:bef600c6246b60eab5f813c9a5d5e0c929d5d733</span>
<span id="LC15" class="line" lang="plaintext"> sha256:dc1451073cbd5139d0a13b19ac4895666f462af5f557de3a9033629d6e85d8be</span>
<span id="LC16" class="line" lang="plaintext"> Public Key PIN:</span>
<span id="LC17" class="line" lang="plaintext"> pin-sha256:3BRRBzy9UTnQoTsZrEiVZm9GKvX1V946kDNinW6F2L4=</span>
<span id="LC18" class="line" lang="plaintext"></span>
<span id="LC19" class="line" lang="plaintext">- Status: The certificate is trusted. </span>
<span id="LC20" class="line" lang="plaintext">- Description: (TLS1.3-X.509)-(ECDHE-SECP256R1)-(ECDSA-SECP256R1-SHA256)-(AES-256-GCM)</span>
<span id="LC21" class="line" lang="plaintext">- Session ID: 93:44:5A:90:69:E2:D3:1E:44:21:4D:47:CE:34:77:65:13:FB:72:81:DC:21:29:E3:51:97:B1:CC:16:5C:F3:52</span>
<span id="LC22" class="line" lang="plaintext">- Options:</span>
<span id="LC23" class="line" lang="plaintext">- Handshake was completed</span>
<span id="LC24" class="line" lang="plaintext">- Disconnecting</span>
<span id="LC25" class="line" lang="plaintext"></span>
<span id="LC26" class="line" lang="plaintext"></span>
<span id="LC27" class="line" lang="plaintext">- Connecting again- trying to resume previous session</span>
<span id="LC28" class="line" lang="plaintext">Resolving 'localhost:53868'...</span>
<span id="LC29" class="line" lang="plaintext">Connecting to '::1:53868'...</span>
<span id="LC30" class="line" lang="plaintext">Failure: failed to communicate with the server</span>
<span id="LC31" class="line" lang="plaintext">Exiting via signal 15</span>
<span id="LC32" class="line" lang="plaintext">unreserved port 53868</span>
<span id="LC33" class="line" lang="plaintext">FAIL gnutls-cli-earlydata.sh (exit status: 1)</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1936">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/c222c075e4e9dadd56e156948f6c7cae/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<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/1936"}}</script>
</p>
</div>
</body>
</html>