summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-03-02 13:05:02 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-03-02 13:05:02 +0200
commitf992ba117fe420a7231f005e62627380689d57ab (patch)
treecd8310f3deafb78f910832aaf47b2ff7ac98aa05 /src/ui
parentff52105505dfa74fc93016aace904a1f1e86b570 (diff)
Server certificates may also be verified by CAs
If the CA file/path are configured in preferences, trust CA verification over manual TOFU checks.
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c8
-rw-r--r--src/ui/util.c11
2 files changed, 16 insertions, 3 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index 947d9d5f..0af022c5 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1585,10 +1585,16 @@ static iBool handleCommand_DocumentWidget_(iDocumentWidget *d, const char *cmd)
1585 } 1585 }
1586 } 1586 }
1587 appendFormat_String(msg, 1587 appendFormat_String(msg,
1588 "\n%sCertificate Status:\n%s%s Domain name %s%s\n" 1588 "\n%sCertificate Status:\n"
1589 "%s%s %s by CA\n"
1590 "%s%s Domain name %s%s\n"
1589 "%s%s %s (%04d-%02d-%02d %02d:%02d:%02d)\n" 1591 "%s%s %s (%04d-%02d-%02d %02d:%02d:%02d)\n"
1590 "%s%s %s", 1592 "%s%s %s",
1591 uiHeading_ColorEscape, 1593 uiHeading_ColorEscape,
1594 d->certFlags & authorityVerified_GmCertFlag ?
1595 checked : uiTextAction_ColorEscape "\u2610",
1596 uiText_ColorEscape,
1597 d->certFlags & authorityVerified_GmCertFlag ? "Verified" : "Not verified",
1592 d->certFlags & domainVerified_GmCertFlag ? checked : unchecked, 1598 d->certFlags & domainVerified_GmCertFlag ? checked : unchecked,
1593 uiText_ColorEscape, 1599 uiText_ColorEscape,
1594 d->certFlags & domainVerified_GmCertFlag ? "matches" : "mismatch", 1600 d->certFlags & domainVerified_GmCertFlag ? "matches" : "mismatch",
diff --git a/src/ui/util.c b/src/ui/util.c
index 603a65cc..5fb3e9f3 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -1177,6 +1177,8 @@ iWidget *makePreferences_Widget(void) {
1177 addChild_Widget(headings, iClob(makeHeading_Widget("Downloads folder:"))); 1177 addChild_Widget(headings, iClob(makeHeading_Widget("Downloads folder:")));
1178 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads"); 1178 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.downloads");
1179#endif 1179#endif
1180 addChild_Widget(headings, iClob(makeHeading_Widget("Search URL:")));
1181 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.searchurl");
1180 addChild_Widget(headings, iClob(makeHeading_Widget("Show URL on hover:"))); 1182 addChild_Widget(headings, iClob(makeHeading_Widget("Show URL on hover:")));
1181 addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink"))); 1183 addChild_Widget(values, iClob(makeToggle_Widget("prefs.hoverlink")));
1182 addChild_Widget(headings, iClob(makeHeading_Widget("Vertical centering:"))); 1184 addChild_Widget(headings, iClob(makeHeading_Widget("Vertical centering:")));
@@ -1300,8 +1302,6 @@ iWidget *makePreferences_Widget(void) {
1300 } 1302 }
1301 /* Network. */ { 1303 /* Network. */ {
1302 appendTwoColumnPage_(tabs, "Network", '5', &headings, &values); 1304 appendTwoColumnPage_(tabs, "Network", '5', &headings, &values);
1303 addChild_Widget(headings, iClob(makeHeading_Widget("Search URL:")));
1304 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.searchurl");
1305 addChild_Widget(headings, iClob(makeHeading_Widget("Decode URLs:"))); 1305 addChild_Widget(headings, iClob(makeHeading_Widget("Decode URLs:")));
1306 addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls"))); 1306 addChild_Widget(values, iClob(makeToggle_Widget("prefs.decodeurls")));
1307 addChild_Widget(headings, iClob(makeHeading_Widget("Cache size:"))); 1307 addChild_Widget(headings, iClob(makeHeading_Widget("Cache size:")));
@@ -1312,6 +1312,11 @@ iWidget *makePreferences_Widget(void) {
1312 addChildFlags_Widget(cacheGroup, iClob(new_LabelWidget("MB", NULL)), frameless_WidgetFlag); 1312 addChildFlags_Widget(cacheGroup, iClob(new_LabelWidget("MB", NULL)), frameless_WidgetFlag);
1313 } 1313 }
1314 addChildFlags_Widget(values, iClob(cacheGroup), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag); 1314 addChildFlags_Widget(values, iClob(cacheGroup), arrangeHorizontal_WidgetFlag | arrangeSize_WidgetFlag);
1315 makeTwoColumnHeading_("CERTIFICATES", headings, values);
1316 addChild_Widget(headings, iClob(makeHeading_Widget("CA file:")));
1317 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.ca.file");
1318 addChild_Widget(headings, iClob(makeHeading_Widget("CA path:")));
1319 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.ca.path");
1315 makeTwoColumnHeading_("PROXIES", headings, values); 1320 makeTwoColumnHeading_("PROXIES", headings, values);
1316 addChild_Widget(headings, iClob(makeHeading_Widget("Gemini proxy:"))); 1321 addChild_Widget(headings, iClob(makeHeading_Widget("Gemini proxy:")));
1317 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gemini"); 1322 setId_Widget(addChild_Widget(values, iClob(new_InputWidget(0))), "prefs.proxy.gemini");
@@ -1331,6 +1336,8 @@ iWidget *makePreferences_Widget(void) {
1331 /* Set input field sizes. */ { 1336 /* Set input field sizes. */ {
1332 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.searchurl")); 1337 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.searchurl"));
1333 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.downloads")); 1338 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.downloads"));
1339 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.ca.file"));
1340 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.ca.path"));
1334 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.proxy.gemini")); 1341 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.proxy.gemini"));
1335 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.proxy.gopher")); 1342 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.proxy.gopher"));
1336 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.proxy.http")); 1343 expandInputFieldWidth_(findChild_Widget(tabs, "prefs.proxy.http"));