<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "Menlo"), DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=US-ASCII" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: 0.875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px;
}
body {
font-family: var(--default-regular-font, -apple-system),BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,0.01) 0 0 1px; font-family: var(--default-regular-font, -apple-system),BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<p class="details" style="font-style: italic; color: #737278;">
<a href="https://gitlab.com/jimis">Dimitrios Apostolou</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1477">#1477</a>
</p>
<div class="md" style="color: #333238; word-wrap: break-word;">
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">Running gnutls-cli against letsencrypt.org shows the following output:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre lang="plaintext" class="code highlight js-syntax-highlight language-plaintext" data-canonical-lang="" v-pre="true" style='display: block; font-size: 0.875rem; color: #333238; line-height: 1.6em; overflow-x: auto; border-radius: 4px; position: relative; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 16px; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: 0.875rem; color: inherit; word-wrap: normal; word-break: keep-all; background-color: inherit; border-radius: 4px; white-space: pre; margin-top: 0; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">$ gnutls-cli -p 443 letsencrypt.org</span>
<span id="LC2" class="line" lang="plaintext">Processed 414 CA certificate(s).</span>
<span id="LC3" class="line" lang="plaintext">Resolving 'letsencrypt.org:443'...</span>
<span id="LC4" class="line" lang="plaintext">Connecting to '34.141.11.154:443'...</span>
<span id="LC5" class="line" lang="plaintext">- Certificate type: X.509</span>
<span id="LC6" class="line" lang="plaintext">- Got a certificate list of 3 certificates.</span>
<span id="LC7" class="line" lang="plaintext">- Certificate[0] info:</span>
<span id="LC8" class="line" lang="plaintext"> - subject `CN=lencr.org', issuer `CN=R3,O=Let's Encrypt,C=US', serial 0x04eac294a0e61035d8254d5a04f61a37c802, EC/ECDSA key 256 bits, signed using RSA-SHA256, activated `2023-02-02 00:00:24 UTC', expires `2023-05-03 00:00:23 UTC', pin-sha256="Z01UftPixvNAGu26I3rx4bremFOKT/7UjuLFSPF42PA="</span>
<span id="LC9" class="line" lang="plaintext"> Public Key ID:</span>
<span id="LC10" class="line" lang="plaintext"> sha1:11be4527d70814fbfd2b37080293fc45d85afe75</span>
<span id="LC11" class="line" lang="plaintext"> sha256:674d547ed3e2c6f3401aedba237af1e1bade98538a4ffed48ee2c548f178d8f0</span>
<span id="LC12" class="line" lang="plaintext"> Public Key PIN:</span>
<span id="LC13" class="line" lang="plaintext"> pin-sha256:Z01UftPixvNAGu26I3rx4bremFOKT/7UjuLFSPF42PA=</span>
<span id="LC14" class="line" lang="plaintext"></span>
<span id="LC15" class="line" lang="plaintext">- Certificate[1] info:</span>
<span id="LC16" class="line" lang="plaintext"> - subject `CN=R3,O=Let's Encrypt,C=US', issuer `CN=ISRG Root X1,O=Internet Security Research Group,C=US', serial 0x00912b084acf0c18a753f6d62e25a75f5a, RSA key 2048 bits, signed using RSA-SHA256, activated `2020-09-04 00:00:00 UTC', expires `2025-09-15 16:00:00 UTC', pin-sha256="jQJTbIh0grw0/1TkHSumWb+Fs0Ggogr621gT3PvPKG0="</span>
<span id="LC17" class="line" lang="plaintext">- Certificate[2] info:</span>
<span id="LC18" class="line" lang="plaintext"> - subject `CN=ISRG Root X1,O=Internet Security Research Group,C=US', issuer `CN=DST Root CA X3,O=Digital Signature Trust Co.', serial 0x4001772137d4e942b8ee76aa3c640ab7, RSA key 4096 bits, signed using RSA-SHA256, activated `2021-01-20 19:14:03 UTC', expires `2024-09-30 18:14:03 UTC', pin-sha256="C5+lpZ7tcVwmwQIMcRtPbsQtWLABXhQzejna0wHFr8M="</span>
<span id="LC19" class="line" lang="plaintext">- Status: The certificate is trusted. </span></code></pre>
<copy-code></copy-code>
</div>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">The last line leads us to believe that <strong style="font-weight: bold; margin-top: 0;">the last certificate on the chain is trusted</strong>.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">However this is not the case. If I use gnutls-cli with <code style='font-size: 0.875rem; color: #1f1e24; word-wrap: break-word; background-color: #ececef; border-radius: 4px; margin-top: 0; font-weight: inherit; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>--print-cert</code> and copy-paste the certificates into their own files, <code style='font-size: 0.875rem; color: #1f1e24; word-wrap: break-word; background-color: #ececef; border-radius: 4px; font-weight: inherit; font-family: var(--default-mono-font, "Menlo"),"DejaVu Sans Mono","Liberation Mono","Consolas","Ubuntu Mono","Courier New","andale mono","lucida console",monospace; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 2px 4px;'>certtool</code> reports that <strong style="font-weight: bold;">certificate[2] is untrusted</strong>, but <strong style="font-weight: bold;">certificate[1] one is trusted</strong>.</p>
<p dir="auto" style="color: #333238; margin: 0 0 16px;" align="initial">This is because certificate[2] is issued by an expired CA, and certificate[1] is cross-signed by both certificate[2] (invalid trust) and by a trusted CA.</p>
<p dir="auto" style="color: #333238; margin: 0;" align="initial">This is not trivial to figure out. gnutls-cli should print information on what path it used to verify the chain, and not just print "certificate trusted" under the last certificate. A quick fix would be to just print "certificate[0] trusted" to avoid any confusion. But still it would be nice to have some verbose output on how gnutls came to that conclusion.</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #737278;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1477">view it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.com">gitlab.com</a>. <a href="https://gitlab.com/-/sent_notifications/7c4511ac4f4961e5a055fc977021e47e/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.com/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.com/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Issue","url":"https://gitlab.com/gnutls/gnutls/-/issues/1477"}}</script>
</p>
</div>
</body>
</html>