<!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, "Menlo"), DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" 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: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, -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,0.01) 0 0 1px; font-family: var(--default-regular-font, -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">

<p class="details" style="font-style: italic; color: #737278;">
<a href="https://gitlab.com/dueno">Daiki Ueno</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1472">#1472</a>
</p>
<div class="md" style="color: #333238; word-wrap: break-word;">
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">There are a couple of different ways of writing unit tests for TLS handshake/record protocols in GnuTLS:</p>
<ul dir="auto" style="text-align: initial; list-style-type: disc; margin: 0 0 16px; padding: 0;">
<li style="margin-top: 0; line-height: 1.6em; margin-left: 25px; padding-left: 3px;">Run a TLS server and client in separate processes, communicate through FDs created using <code style='font-size: 0.875rem; color: #1f1e24; word-wrap: break-word; background-color: #ececef; border-radius: 4px; margin-top: 0; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>socketpair</code>
</li>
<li style="line-height: 1.6em; margin-left: 25px; padding-left: 3px;">Run both a TLS server and client in a single process, using helper macros such as <code style='font-size: 0.875rem; color: #1f1e24; word-wrap: break-word; background-color: #ececef; border-radius: 4px; margin-top: 0; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>HANDSHAKE</code>, defined in <a href="https://gitlab.com/gnutls/gnutls/-/blob/1351f3e8e3a0a454613b9d686c948912a3928df6/tests/eagain-common.h">tests/eagain-common.h</a>
</li>
</ul>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">While the former could emulate a more practical scenario, it has a portability problem (the tests written in this way cannot run on Windows, and thus are skipped) as well as makes debugging hard. It would be nice if we could port those tests in the latter style.</p>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">Tests under <a href="https://gitlab.com/gnutls/gnutls/-/tree/master/tests/tls13" style="margin-top: 0;">tests/tls13/</a> are a good candidate for the rewrite. <a href="https://gitlab.com/gnutls/gnutls/-/commit/754098302c07b262d50b9aa70174edc74bc9e547" data-reference-type="commit" data-original="754098302c07b262d50b9aa70174edc74bc9e547" data-link="false" data-link-reference="false" data-project="179611" data-commit="754098302c07b262d50b9aa70174edc74bc9e547" data-container="body" data-placement="top" title="tests: tls13/key_share: rewrite as single process" class="gfm gfm-commit has-tooltip" style='font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; font-variant-ligatures: none; font-size: 95%;'>75409830</a> is an example of such rewrite.</p>
</div>

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

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


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