<!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, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=utf-8" 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: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-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,.01) 0 0 1px; font-family: "GitLab Sans",-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: #626168;">
<a href="https://gitlab.com/xry111">Xi Ruoyao</a> created an issue: <a href="https://gitlab.com/gnutls/gnutls/-/issues/1656">#1656</a>
</p>
<div class="md" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word;">
<h2 dir="auto" style="margin-top: 0; margin-bottom: 1rem; border-bottom-style: solid; border-bottom-color: #dcdcde; font-weight: 600; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d; border-bottom-width: 1px; padding-bottom: 0.25rem;" align="initial">
<a href="#description-of-problem" aria-hidden="true" class="anchor" id="user-content-description-of-problem" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Description of problem:</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">We have such a p11 object which is converted from Mozilla certificate data:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">[p11-kit-object-v1]</span>
<span id="LC2" class="line" lang="plaintext">label: "Entrust Root Certification Authority - G2"</span>
<span id="LC3" class="line" lang="plaintext">class: x-certificate-extension</span>
<span id="LC4" class="line" lang="plaintext">object-id: 2.5.29.37</span>
<span id="LC5" class="line" lang="plaintext">value: "0 %06%03U%1d%25%01%01%ff%04%160%14%06%08%2b%06%01%05%05%07%03%04%06%08%2b%06%01%05%05%07%03%01"</span>
<span id="LC6" class="line" lang="plaintext">modifiable: false</span>
<span id="LC7" class="line" lang="plaintext">-----BEGIN PUBLIC KEY-----</span>
<span id="LC8" class="line" lang="plaintext">MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuoS2ctueDGvimekwAad2</span>
<span id="LC9" class="line" lang="plaintext">6jK4lUEaydphTlhyz/72gnm/c2EGCqUn2LNf00VOHHLWTjLycooP94MZ0GqAgABF</span>
<span id="LC10" class="line" lang="plaintext">HrDH55q/ElcnHKNoLwqHvWprDl5l8xx31dSFjXAhtLMy54ui1YY5ArG40kfO5MlJ</span>
<span id="LC11" class="line" lang="plaintext">xDun3vtUfVe+8OhuwnmyOgtV4lCYFjITXC94VsHClLPyWuQnmp8k18bs0JslguPM</span>
<span id="LC12" class="line" lang="plaintext">wsRFxYyXegZrKhGfqQpuSDtv29QRGUL3jwe/9VNfnD70FyzmaaxOMkxid+q36OW7</span>
<span id="LC13" class="line" lang="plaintext">NLwZi66cUee3frVTsTMi5W3PcDwa+uKbZ7aD9I2lr2JMTeBYrGQ0EgP4to2UYySk</span>
<span id="LC14" class="line" lang="plaintext">cQIDAQAB</span>
<span id="LC15" class="line" lang="plaintext">-----END PUBLIC KEY-----</span>
<span id="LC16" class="line" lang="plaintext"></span>
<span id="LC17" class="line" lang="plaintext">[p11-kit-object-v1]</span>
<span id="LC18" class="line" lang="plaintext">label: "Entrust Root Certification Authority - G2"</span>
<span id="LC19" class="line" lang="plaintext">trusted: true</span>
<span id="LC20" class="line" lang="plaintext">nss-mozilla-ca-policy: true</span>
<span id="LC21" class="line" lang="plaintext">modifiable: false</span>
<span id="LC22" class="line" lang="plaintext">nss-server-distrust-after: "241130235959Z"</span>
<span id="LC23" class="line" lang="plaintext">nss-email-distrust-after: "%00"</span>
<span id="LC24" class="line" lang="plaintext">-----BEGIN CERTIFICATE-----</span>
<span id="LC25" class="line" lang="plaintext">MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMC</span>
<span id="LC26" class="line" lang="plaintext">VVMxFjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50</span>
<span id="LC27" class="line" lang="plaintext">cnVzdC5uZXQvbGVnYWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3Qs</span>
<span id="LC28" class="line" lang="plaintext">IEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVz</span>
<span id="LC29" class="line" lang="plaintext">dCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwHhcNMDkwNzA3MTcy</span>
<span id="LC30" class="line" lang="plaintext">NTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoTDUVu</span>
<span id="LC31" class="line" lang="plaintext">dHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwt</span>
<span id="LC32" class="line" lang="plaintext">dGVybXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0</span>
<span id="LC33" class="line" lang="plaintext">aG9yaXplZCB1c2Ugb25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmlj</span>
<span id="LC34" class="line" lang="plaintext">YXRpb24gQXV0aG9yaXR5IC0gRzIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK</span>
<span id="LC35" class="line" lang="plaintext">AoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP/vaCeb9zYQYKpSfYs1/T</span>
<span id="LC36" class="line" lang="plaintext">RU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXzHHfV1IWN</span>
<span id="LC37" class="line" lang="plaintext">cCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hW</span>
<span id="LC38" class="line" lang="plaintext">wcKUs/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1</span>
<span id="LC39" class="line" lang="plaintext">U1+cPvQXLOZprE4yTGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0</span>
<span id="LC40" class="line" lang="plaintext">jaWvYkxN4FisZDQSA/i2jZRjJKRxAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAP</span>
<span id="LC41" class="line" lang="plaintext">BgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ60B7vfec7aVHUbI2fkBJmqzAN</span>
<span id="LC42" class="line" lang="plaintext">BgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5ZiXMRrEPR9RP/</span>
<span id="LC43" class="line" lang="plaintext">jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ</span>
<span id="LC44" class="line" lang="plaintext">Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v</span>
<span id="LC45" class="line" lang="plaintext">1fN2D807iDginWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4R</span>
<span id="LC46" class="line" lang="plaintext">nAuknZoh8/CbCzB428Hch0P+vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmH</span>
<span id="LC47" class="line" lang="plaintext">VHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xOe4pIb4tF9g==</span>
<span id="LC48" class="line" lang="plaintext">-----END CERTIFICATE-----</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Note that the certificate has a <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;'>nss-server-distrust-after</code> field. But when trying a website using this root CA with <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; font-weight: inherit; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;'>gnutls-cli www.fidelity.com -d9999</code>:</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">|<2>| check_found_cert: cert doesn't match the expected</span>
<span id="LC2" class="line" lang="plaintext">|<3>| ASSERT: pkcs11.c[find_cert_cb]:4272</span>
<span id="LC3" class="line" lang="plaintext">|<3>| ASSERT: pkcs11.c[find_cert_cb]:4083</span>
<span id="LC4" class="line" lang="plaintext">|<2>| get_distrust_after: did not find cert, using issuer DN + serial, using DN only</span>
<span id="LC5" class="line" lang="plaintext">|<3>| ASSERT: pkcs11.c[_gnutls_pkcs11_get_distrust_after]:4861</span>
<span id="LC6" class="line" lang="plaintext">|<2>| p11: No login requested.</span>
<span id="LC7" class="line" lang="plaintext">|<2>| check_found_cert: cert doesn't match the expected</span>
<span id="LC8" class="line" lang="plaintext">|<3>| ASSERT: pkcs11.c[find_cert_cb]:4272</span>
<span id="LC9" class="line" lang="plaintext">|<3>| ASSERT: pkcs11.c[find_cert_cb]:4083</span>
<span id="LC10" class="line" lang="plaintext">|<3>| ASSERT: pkcs11.c[_gnutls_pkcs11_get_distrust_after]:4876</span>
<span id="LC11" class="line" lang="plaintext">|<2>| get_distrust_after: did not find any cert</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">So it seems GnuTLS has not really found the field.</p>
<h2 dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; border-bottom-style: solid; border-bottom-color: #dcdcde; font-weight: 600; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d; border-bottom-width: 1px; padding-bottom: 0.25rem;" align="initial">
<a href="#version-of-gnutls-used" aria-hidden="true" class="anchor" id="user-content-version-of-gnutls-used" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Version of gnutls used:</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">3.8.8</p>
<h2 dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; border-bottom-style: solid; border-bottom-color: #dcdcde; font-weight: 600; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d; border-bottom-width: 1px; padding-bottom: 0.25rem;" align="initial">
<a href="#distributor-of-gnutls-eg-ubuntu-fedora-rhel" aria-hidden="true" class="anchor" id="user-content-distributor-of-gnutls-eg-ubuntu-fedora-rhel" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">Originally found on Beyond Linux From Scratch, same result on Fedora Rawhide</p>
<h2 dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; border-bottom-style: solid; border-bottom-color: #dcdcde; font-weight: 600; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d; border-bottom-width: 1px; padding-bottom: 0.25rem;" align="initial">
<a href="#how-reproducible" aria-hidden="true" class="anchor" id="user-content-how-reproducible" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>How reproducible:</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">See above.</p>
<h2 dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; border-bottom-style: solid; border-bottom-color: #dcdcde; font-weight: 600; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d; border-bottom-width: 1px; padding-bottom: 0.25rem;" align="initial">
<a href="#actual-results" aria-hidden="true" class="anchor" id="user-content-actual-results" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Actual results:</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">GnuTLS accept the certificate (the behavior is correct) but the debug info shows the <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;'>nss-server-distrust-after</code> field isn't found at all.</p>
<h2 dir="auto" style="margin-top: 1.5rem; margin-bottom: 1rem; border-bottom-style: solid; border-bottom-color: #dcdcde; font-weight: 600; font-size: 1.3125rem; letter-spacing: -0.01em; line-height: 1.25; color: #18171d; border-bottom-width: 1px; padding-bottom: 0.25rem;" align="initial">
<a href="#expected-results" aria-hidden="true" class="anchor" id="user-content-expected-results" style="margin-top: 0; float: left; margin-left: -20px; text-decoration: none; outline: none;"></a>Expected results:</h2>
<p dir="auto" style="color: #3a383f; margin: 0;" align="initial">GnuTLS still accept the certificate, but after comparing the <code style='font-size: 90%; color: #18171d; word-wrap: break-word; border-radius: .25rem; background-color: #ececef; margin-top: 0; font-weight: inherit; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; white-space: pre-wrap; overflow-wrap: break-word; word-break: keep-all; padding: 0.125rem 0.25rem;'>nss-server-distrust-after</code> field.</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
Reply to this email directly or <a href="https://gitlab.com/gnutls/gnutls/-/issues/1656">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/2fc73e971e742ec5df42acbb2ff98cb4/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/1656"}}</script>
</p>
</div>
</body>
</html>