<!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/dueno">Daiki Ueno</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1542#note_862006221">discussion</a>:
</p>
<div style="">
<blockquote dir="auto">
<p>Doesn't reintroducing algorithms to the arrays leave them usable?</p>
</blockquote>
<p dir="auto">No. If <code>--disable-gost</code> is specified, all the GOST algorithms are compiled out, through conditionals like <a href="https://gitlab.com/gnutls/gnutls/-/blob/aa11f1a0f80a039a8dc27912f178443a2b3bd069/lib/nettle/Makefile.am#L77">this</a> and the usage is also filtered <a href="https://gitlab.com/gnutls/gnutls/-/blob/aa11f1a0f80a039a8dc27912f178443a2b3bd069/lib/nettle/mac.c#L317">out</a> internally. Therefore, if one tries to use a GOST algorithm, she will get an unsupported algorithm error, regardless of this and previous MRs.</p>
<p dir="auto">The problem I try to solve is sorely about the indication whether the GOST algorithms are supported: typically with <code>gnutls-cli --list</code>. There are two approaches: one (the previous MR) is to remove the algorithms entirely from the <strong>known</strong> algorithm list, and the other is to filter out the algorithms in the API functions (e.g., <code>_list</code>) which are supposed to work on the <strong>supported</strong> algorithm list.</p>
<p dir="auto">Both have pros and cons but the former approach has a more severe issue: we break the assumption that the functions that works on the <strong>known</strong> algorithm list, such as <code>gnutls_cipher_get_name</code>, should never return NULL or error, if the given algorithm ID is defined in <code><gnutls/gnutls.h></code>. Note that we cannot easily remove GOST algorithm IDs from the public header as it breaks API compatibility.</p>
<p dir="auto">I believe the ideal situation is:</p>
<ol dir="auto">
<li>we make a clear distinction between the functions that works on the <strong>known</strong> or the <strong>supported</strong> algorithm list</li>
<li>the functions supposed to work on the <strong>known</strong> algorithm list should never return NULL or error for algorithm IDs defined in the public header</li>
<li>to check whether an algorithm is <strong>supported</strong>, a helper function is provided to complement (2)</li>
</ol>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #666;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/merge_requests/1542#note_862006221">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/1aad5566b0b86b0502e0b2126a278ca9/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/1542#note_862006221"}}</script>
</p>
</div>
</body>
</html>