<!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: #777;">
<a href="https://gitlab.com/hanno">Hanno Böck</a> created an issue:
</p>
<div></div>
<p dir="auto">I noticed a curious behavior of gnutls-cli regarding OCSP checks and intermediate certs.</p>
<p dir="auto">It seems when passing the --ocsp option the intermediate cert will be ocsp checked, but only if ocsp stapling is not set.</p>
<p dir="auto">To test (first fake a bad ocsp server by redirecting identrust's OCSP to localhost):
<code>echo "127.0.0.1 isrg.trustid.ocsp.identrust.com" >> /etc/hosts</code>
<code>gnutls-cli --ocsp zucker.schokokeks.org:443</code>
<code>gnutls-cli --ocsp letsencrypt.org:443</code></p>
<p dir="auto">The first connection will succeed, the second will not. The difference is the first host enables OCSP Stapling. I believe what's happening is that when the client detects OCSP stapling it will skip direct OCSP checks. But Stapling only staples the OCSP reply for the end-entity cert, not the intermediate.</p>
<p dir="auto">I generally think it's valuable to have a way to check the intermediate. I am not sure it should be done by default. In any case: I guess this should not depend on OCSP stapling.</p>
<p dir="auto">I propose one of the following changes:</p>
<ol dir="auto">
<li>Declare/document that --ocsp always checks the intermediate and if the end-entity OCSP comes via stapling still connect to the intermediate.</li>
<li>Declare/document that --ocsp never checks the intermediate and add another option --ocsp-check-chain or something like this that will enable intermediate checks.</li>
</ol>

</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/981">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/7af8eb09a2b467f682167adc03ed4ae9/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/981"}}</script>


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