Lagrange [work/v1.10]

DocumentWidget: Trust button shown only when untrusted

=> 804d9bd93fbde602f571ab46342acf18bd5a3e95

diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 49ac9fb5..f2553632 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -2845,7 +2845,8 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
         const iBool haveFingerprint = (d->certFlags & haveFingerprint_GmCertFlag) != 0;
         const int requiredForTrust = (available_GmCertFlag | haveFingerprint_GmCertFlag |
                                       timeVerified_GmCertFlag);
-        const iBool canTrust = ((d->certFlags & requiredForTrust) == requiredForTrust);
+        const iBool canTrust = ~d->certFlags & trusted_GmCertFlag &&
+                               ((d->certFlags & requiredForTrust) == requiredForTrust);
         const iRecentUrl *recent = findUrl_History(d->mod.history, d->mod.url);
         const iString *meta = &d->sourceMime;
         if (recent && recent->cachedResponse) {
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.10/cdiff/804d9bd93fbde602f571ab46342acf18bd5a3e95
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
71.244769 milliseconds
Gemini-to-HTML Time
0.160342 milliseconds

This content has been proxied by September (ba2dc).