<!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=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style>img {
max-width: 100%; height: auto;
}
</style>
</head>
<body>
<div class="content">
<div></div>
<h2 dir="auto">
<a id="user-content-description-of-problem" class="anchor" href="#description-of-problem" aria-hidden="true"></a>Description of problem:</h2>
<p dir="auto">Programs using GnuTLS, including <code>gnutls-cli</code> and WebKitGTK-based browsers (e.g., GNOME epiphany), can't connect to websites with the certificate "TWCA Global Root CA" in the chain.</p>
<p dir="auto">Take <a href="http://www.ntu.edu.tw" rel="nofollow noreferrer noopener" target="_blank">www.ntu.edu.tw</a> as an example. In the server-provided certificate chain, the first intermediate CA "TWCA Secure SSL Certification Authority" has authority key identifier <code>48:db:cd:de:8e:e9:49:72:5a:88:e8:b1:d8:3d:07:b3:b9:6b:66:50</code>. The second intermediate CA in the chain "TWCA Global Root CA" has the matching subject key identifier <code>48:db:cd:de:8e:e9:49:72:5a:88:e8:b1:d8:3d:07:b3:b9:6b:66:50</code>, so ideally there are no problems.</p>
<p dir="auto">The problem is, on Arch Linux, GnuTLS is configured to use p11-kit for checking certificate chains [1]. Also, <code>certdata.txt</code> from Mozilla NSS is used as the default trust store. In certdata.txt, the certificate "TWCA Global Root CA" is also included as a trusted CA, and the corresponding certificate does not have a subject key identifier. As a result, <code>_gnutls_check_valid_key_id()</code> fails.</p>
<p dir="auto">A workaround is removing "TWCA Global Root CA" from the system trust store. After that all GnuTLS-based programs work just fine.</p>
<p dir="auto">[1] <a href="https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/gnutls#n36" rel="nofollow noreferrer noopener" target="_blank">https://git.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/gnutls#n36</a></p>
<h2 dir="auto">
<a id="user-content-version-of-gnutls-used" class="anchor" href="#version-of-gnutls-used" aria-hidden="true"></a>Version of gnutls used:</h2>
<p dir="auto">3.5.19</p>
<h2 dir="auto">
<a id="user-content-distributor-of-gnutls-eg-ubuntu-fedora-rhel" class="anchor" href="#distributor-of-gnutls-eg-ubuntu-fedora-rhel" aria-hidden="true"></a>Distributor of gnutls (e.g., Ubuntu, Fedora, RHEL)</h2>
<p dir="auto">Arch Linux</p>
<h2 dir="auto">
<a id="user-content-how-reproducible" class="anchor" href="#how-reproducible" aria-hidden="true"></a>How reproducible:</h2>
<p dir="auto">Steps to Reproduce:</p>
<ul dir="auto">
<li>P11_KIT_DEBUG=all gnutls-cli -d 3 <a href="http://www.ntu.edu.tw" rel="nofollow noreferrer noopener" target="_blank">www.ntu.edu.tw</a>
</li>
<li>P11_KIT_DEBUG=all gnutls-cli -d 3 <a href="http://www.citi.sinica.edu.tw" rel="nofollow noreferrer noopener" target="_blank">www.citi.sinica.edu.tw</a>
</li>
<li>P11_KIT_DEBUG=all gnutls-cli -d 3 <a href="http://www.twca.com.tw" rel="nofollow noreferrer noopener" target="_blank">www.twca.com.tw</a>
</li>
</ul>
<h2 dir="auto">
<a id="user-content-actual-results" class="anchor" href="#actual-results" aria-hidden="true"></a>Actual results:</h2>
<p dir="auto">Output for <a href="http://www.ntu.edu.tw" rel="nofollow noreferrer noopener" target="_blank">www.ntu.edu.tw</a>: <a href="https://gitlab.com/gnutls/gnutls/uploads/796b58219bc3c3012fa97c83fae990a6/output.txt">output.txt</a></p>
<p dir="auto">The other two websites yields similar results.</p>
<h2 dir="auto">
<a id="user-content-expected-results" class="anchor" href="#expected-results" aria-hidden="true"></a>Expected results:</h2>
<p dir="auto">gnutls-cli connects to the specified website and waits for input.</p>
</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/569">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/95b72a6ef303c5a65d014a352eb08e33/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/569"}}</script>
</p>
</div>
</body>
</html>