[hackers] [surf/surf-webkit2] Add a flag and toggle keybinding for strict TLS || Quentin Rameau
commit 27cec484084f37e01cadcdf7ea92c64de71e0b34
Author: Quentin Rameau <quinq_AT_fifth.space>
AuthorDate: Wed Apr 19 18:35:16 2017 +0200
Commit: Quentin Rameau <quinq_AT_fifth.space>
CommitDate: Thu Apr 20 00:10:45 2017 +0200
Add a flag and toggle keybinding for strict TLS
diff --git a/config.def.h b/config.def.h
index 32cda3c..dce76f8 100644
--- a/config.def.h
+++ b/config.def.h
_AT_@ -153,6 +153,7 @@ static Key keys[] = {
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_i, toggle, { .i = LoadImages } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_v, toggle, { .i = Plugins } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_b, toggle, { .i = ScrollBars } },
+ { MODKEY|GDK_SHIFT_MASK, GDK_KEY_t, toggle, { .i = StrictTLS } },
{ MODKEY|GDK_SHIFT_MASK, GDK_KEY_m, toggle, { .i = Style } },
};
diff --git a/surf.1 b/surf.1
index 370dcee..0f02357 100644
--- a/surf.1
+++ b/surf.1
_AT_@ -3,7 +3,7 @@
surf \- simple webkit-based browser
.SH SYNOPSIS
.B surf
-.RB [-bBdDfFgGiIkKmMnNpPsSvx]
+.RB [-bBdDfFgGiIkKmMnNpPsStTvx]
.RB [-a\ cookiepolicies]
.RB [-c\ cookiefile]
.RB [-C\ stylefile]
_AT_@ -107,6 +107,12 @@ Disable Javascript
.B \-S
Enable Javascript
.TP
+.B \-t
+Disable strict TLS check
+.TP
+.B \-T
+Enable strict TLS check
+.TP
.B \-u useragent
Specify the
.I useragent
_AT_@ -217,6 +223,9 @@ Open the Web Inspector (Developer Tools) window for the current page.
.B Ctrl\-Shift\-s
Toggle script execution. This will reload the page.
.TP
+.B Ctrl\-Shift\-t
+Toggle strict TLS check. This will reload the page.
+.TP
.B Ctrl\-Shift\-v
Toggle the enabling of plugins on that surf instance. This will reload the
page.
diff --git a/surf.c b/surf.c
index 8daa1e1..e08bfe5 100644
--- a/surf.c
+++ b/surf.c
_AT_@ -226,7 +226,7 @@ static void clicknewwindow(Client *c, const Arg *a, WebKitHitTestResult *h);
static void clickexternplayer(Client *c, const Arg *a, WebKitHitTestResult *h);
static char winid[64];
-static char togglestats[10];
+static char togglestats[11];
static char pagestats[2];
static Atom atoms[AtomLast];
static Window embed;
_AT_@ -569,7 +569,8 @@ gettogglestats(Client *c)
togglestats[6] = curconfig[Plugins].val.b ? 'V' : 'v';
togglestats[7] = curconfig[Style].val.b ? 'M' : 'm';
togglestats[8] = curconfig[FrameFlattening].val.b ? 'F' : 'f';
- togglestats[9] = '\0';
+ togglestats[9] = curconfig[StrictTLS].val.b ? 'T' : 't';
+ togglestats[10] = '\0';
}
void
_AT_@ -715,7 +716,7 @@ setparameter(Client *c, int refresh, ParamName p, const Arg *a)
webkit_web_view_get_context(c->view), a->b ?
WEBKIT_TLS_ERRORS_POLICY_FAIL :
WEBKIT_TLS_ERRORS_POLICY_IGNORE);
- return; /* do not update */
+ break;
case Style:
if (a->b)
setstyle(c, getstyle(geturi(c)));
Received on Thu Apr 20 2017 - 12:21:29 CEST
This archive was generated by hypermail 2.3.0
: Thu Apr 20 2017 - 12:24:31 CEST