<!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=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>


<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<div>
<p dir="auto">I am not going to provide a fix, since I neither understand cryptography and bits very well, nor the internals of GnuTLS.  A reproducer:</p>
<pre class="code highlight js-syntax-highlight diff" lang="diff" v-pre="true"><code><span id="LC1" class="line" lang="diff"><span class="gh">diff --git a/tests/pubkey-import-export.c b/tests/pubkey-import-export.c</span></span>
<span id="LC2" class="line" lang="diff"><span class="gd">--- a/tests/pubkey-import-export.c</span></span>
<span id="LC3" class="line" lang="diff"><span class="gi">+++ b/tests/pubkey-import-export.c</span></span>
<span id="LC4" class="line" lang="diff"><span class="gu">@@ -285,6 +285,10 @@ int check_pubkey_import_export(void)</span></span>
<span id="LC5" class="line" lang="diff">        if (ret < 0)</span>
<span id="LC6" class="line" lang="diff">                fail("error\n");</span>
<span id="LC7" class="line" lang="diff"> </span>
<span id="LC8" class="line" lang="diff"><span class="gi">+       gnutls_pubkey_get_pk_algorithm(key, &ret);</span></span>
<span id="LC9" class="line" lang="diff"><span class="gi">+       if (ret == 0)</span></span>
<span id="LC10" class="line" lang="diff"><span class="gi">+               fail("error: key size is zero\n");</span></span>
<span id="LC11" class="line" lang="diff"><span class="gi">+</span></span>
<span id="LC12" class="line" lang="diff">        ret = gnutls_pubkey_verify_params(key);</span>
<span id="LC13" class="line" lang="diff">        if (ret != 0)</span>
<span id="LC14" class="line" lang="diff">                fail("error: %s\n", gnutls_strerror(ret));</span></code></pre>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/issues/640#note_122621556">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/223e035cdda2eac6065f0e6477b3cf85/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/640#note_122621556"}}</script>
</p>
</div>
</body>
</html>