<!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/rockdaboot">Tim Rühsen</a>
commented on a
<a href="https://gitlab.com/gnutls/gnutls/merge_requests/984#note_275772226">discussion</a>:
</p>
<div style="">
<p dir="auto">The fuzzer code is very small and should be easy to read (see <code>fuzz/gnutls_x509_parser_fuzzer.c</code>).</p>
<p dir="auto">So it does call gnutls_x509_crt_import() with GNUTLS_X509_FMT_DER - so a DER cert is the right thing to have.</p>
<p dir="auto">To check the code coverage of a single fuzzer:</p>
<pre class="code highlight js-syntax-highlight plaintext" lang="plaintext" v-pre="true"><code><span id="LC1" class="line" lang="plaintext">./configure --enable-code-coverage --disable-doc</span>
<span id="LC2" class="line" lang="plaintext">make clean</span>
<span id="LC3" class="line" lang="plaintext">make</span>
<span id="LC4" class="line" lang="plaintext">make check -C fuzz TESTS=gnutls_x509_parser_fuzzer</span>
<span id="LC5" class="line" lang="plaintext">make code-coverage-capture</span>
<span id="LC6" class="line" lang="plaintext">xdg-open file:///usr/oms/src/gnutls/GnuTLS-3.6.12-coverage/index.html</span></code></pre>
<p dir="auto">So you can see if the new code is really covered by the fuzzer when used with the existing corpora in <code>fuzz/gnutls_x509_parser_fuzzer.in</code> (in this case the "fuzzer" is compiled as a unit-test).</p>
<p dir="auto">Possibly, you need to run the real fuzzer first to generate new corpora (= new discovered code paths). To do that, see <code>fuzz/README.md</code> and best go with clang fuzzing, then let the fuzzer run for ~10 minutes and check code coverage again. The switch between 'test' and 'fuzzer' mode requires a rebuild starting with <code>./configure...</code>.</p>
<p dir="auto">Let me know if I can help. E.g. you add the cert to the branch, I check it out, generate new corpora and add them via git commit.</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/merge_requests/984#note_275772226">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/ba1a024340b9c32f8faa2bb6ac99fa05/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/984#note_275772226"}}</script>
</p>
</div>
</body>
</html>