<!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/ametzler">Andreas Metzler</a>
commented:
</p>
<div style="">
<p dir="auto">I am not sure on what is the preferred way to fix this. invalid-sigs bundles multiple test, none of which yet use datefudge. So I cannot simply do</p>
<pre class="code highlight js-syntax-highlight diff" lang="diff" v-pre="true"><code><span id="LC1" class="line" lang="diff"><span class="gd">--- a/tests/cert-tests/invalid-sig</span></span>
<span id="LC2" class="line" lang="diff"><span class="gi">+++ b/tests/cert-tests/invalid-sig</span></span>
<span id="LC3" class="line" lang="diff"><span class="gd">-${VALGRIND} "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/cve-2019-3829.pem"</span></span>
<span id="LC4" class="line" lang="diff"><span class="gi">+check_for_datefudge</span></span>
<span id="LC5" class="line" lang="diff"><span class="gi">+datefudge -s 2020-01-01 \</span></span>
<span id="LC6" class="line" lang="diff"><span class="gi">+       ${VALGRIND} "${CERTTOOL}" --verify-chain --infile "${srcdir}/data/cve-2019-3829.pem"</span></span></code></pre>
<p dir="auto">because then the test could show up as skipped, although most of the tests actually ran. Should I move it to a separate unit?</p>
<p dir="auto">I also think that the script is buggy, it does not FAIL for many errors:</p>
<pre class="code highlight js-syntax-highlight shell" lang="shell" v-pre="true"><code><span id="LC1" class="line" lang="shell"><span class="c">#check whether a different PKCS #1 signature than the advertized in certificate is tolerated</span></span>
<span id="LC2" class="line" lang="shell"><span class="k">${</span><span class="nv">VALGRIND</span><span class="k">}</span> <span class="s2">"</span><span class="k">${</span><span class="nv">CERTTOOL</span><span class="k">}</span><span class="s2">"</span> <span class="nt">-e</span> <span class="nt">--infile</span> <span class="s2">"</span><span class="k">${</span><span class="nv">srcdir</span><span class="k">}</span><span class="s2">/data/invalid-sig.pem"</span></span>
<span id="LC3" class="line" lang="shell"><span class="nv">rc</span><span class="o">=</span><span class="nv">$?</span></span>
<span id="LC4" class="line" lang="shell"></span>
<span id="LC5" class="line" lang="shell"><span class="c"># We're done.</span></span>
<span id="LC6" class="line" lang="shell"><span class="k">if </span><span class="nb">test</span> <span class="s2">"</span><span class="k">${</span><span class="nv">rc</span><span class="k">}</span><span class="s2">"</span> <span class="o">=</span> <span class="s2">"0"</span><span class="p">;</span> <span class="k">then</span></span>
<span id="LC7" class="line" lang="shell"><span class="k">   </span><span class="nb">echo</span> <span class="s2">"Verification of invalid signature (1) failed"</span></span>
<span id="LC8" class="line" lang="shell">   <span class="nb">exit</span> <span class="k">${</span><span class="nv">rc</span><span class="k">}</span></span>
<span id="LC9" class="line" lang="shell"><span class="k">fi</span></span></code></pre>
<p dir="auto">If certtool succeeds (although it should not) the test exits with exitcode 0, i.e. PASS.</p>
</div>


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

<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1021#note_356792928">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/7470b507d6035aeb05ca7f5f26d5223e/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/1021#note_356792928"}}</script>


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