<!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: #666;">
<a href="https://gitlab.com/ametzler">Andreas Metzler</a> created an issue <a href="https://gitlab.com/gnutls/gnutls/-/issues/1077">#1077</a>:
</p>
<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">Docs for gnutls_certificate_set_dh_params() say:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">gnutls_certificate_set_dh_params is deprecated and should not be used in</span>
<span id="LC2" class="line" lang="plaintext">newly-written code.</span>
<span id="LC3" class="line" lang="plaintext"></span>
<span id="LC4" class="line" lang="plaintext">This function is unnecessary and discouraged on GnuTLS 3.6.0 or later.</span>
<span id="LC5" class="line" lang="plaintext">Since 3.6.0, DH parameters are negotiated following RFC7919.</span></code></pre>
<p dir="auto">Which I would read as "when upgrading code to (only) work with gnutls 3.6.0 one should delete any gnutls_certificate_set_dh_params()-invocations since they are unnecessary because GnuTLS will automatically do RFC7919 negotiation."</p>
<p dir="auto">However it looks like (see below) that is not true, there is no automation but gnutls_certificate_set_dh_params needs to be replaced with gnutls_certificate_set_known_dh_params ().</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">3.6.14</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">Debian</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">always</p>
<p dir="auto">Steps to Reproduce:</p>
<p dir="auto">Take ex-serv-x509 and remove
gnutls_certificate_set_known_dh_params(x509_cred, GNUTLS_SEC_PARAM_MEDIUM);</p>
<p dir="auto">After this change</p>
<blockquote dir="auto">
<p>openssl s_client -connect localhost:5556 -cipher DHE-RSA-AES256-GCM-SHA384-tls1_2
will fail.</p>
</blockquote>
<p dir="auto">This originally came up in <a href="https://github.com/rbsec/sslscan/issues/214" rel="nofollow noreferrer noopener" target="_blank">https://github.com/rbsec/sslscan/issues/214</a>
<a href="https://bugs.debian.org/968145" rel="nofollow noreferrer noopener" target="_blank">https://bugs.debian.org/968145</a> (Exim: no TLS1.2 DHE ciphers from openssl client). I have asked first on gnutls-help list, where Daiki Ueno responded with</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">That was also my expectation, though I suspect that it's saying that it</span>
<span id="LC2" class="line" lang="plaintext">only works when the client advertises the "supported_groups" extension</span>
<span id="LC3" class="line" lang="plaintext">according to the RFC, which is not sent with the above command.</span>
<span id="LC4" class="line" lang="plaintext"></span>
<span id="LC5" class="line" lang="plaintext">In the OpenSSL git master, s_client provides the -groups option for</span>
<span id="LC6" class="line" lang="plaintext">that, and you will be able to connect to the server with:</span>
<span id="LC7" class="line" lang="plaintext"></span>
<span id="LC8" class="line" lang="plaintext"> $ openssl s_client -connect localhost:5556 -tls1_3 -groups ffdhe2048</span>
<span id="LC9" class="line" lang="plaintext"></span>
<span id="LC10" class="line" lang="plaintext">though the option doesn't seem to work with -tls1_2</span></code></pre>
<p dir="auto">I think this qualifies as a bug, the documentation does not clearly describe the actual behavior. While it could be fixed by updating the docs I would prefer to fix the behavior instead, since third party software (exim) has been coded to match the docs.</p>
</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/-/issues/1077">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/a8c3744d05e7b35779b3a458ad4d3b31/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/1077"}}</script>
</p>
</div>
</body>
</html>