netsurf: branch master updated. release/3.9-354-g92caa16
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/92caa16cfcd10ecc20249...
...commit http://git.netsurf-browser.org/netsurf.git/commit/92caa16cfcd10ecc2024972...
...tree http://git.netsurf-browser.org/netsurf.git/tree/92caa16cfcd10ecc2024972fb...
The branch, master has been updated
via 92caa16cfcd10ecc2024972fbef740fbdbd3254b (commit)
from 5063fc838e9933b73bf6c8d2f330e5a8e53d7544 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=92caa16cfcd10ecc202...
commit 92caa16cfcd10ecc2024972fbef740fbdbd3254b
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Add missing unrefs
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/content.c b/content/content.c
index a87be00..552ee07 100644
--- a/content/content.c
+++ b/content/content.c
@@ -592,6 +592,7 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
&match) == lwc_error_ok &&
(match == true))) {
/* No insecurity to find */
+ lwc_string_unref(scheme);
return false;
}
@@ -600,9 +601,11 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
&match) == lwc_error_ok)
&& (match == false)) {
/* I did see something insecure -- ME! */
+ lwc_string_unref(scheme);
return true;
}
+ lwc_string_unref(scheme);
/* I am supposed to be secure, but was I overridden */
if (urldb_get_cert_permissions(url)) {
/* I was https:// but I was overridden, that's no good */
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 1fa3161..16fa73e 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4671,6 +4671,7 @@ browser_window_page_info_state browser_window_get_page_info_state(
(lwc_string_isequal(scheme, corestring_lwc_resource,
&match) == lwc_error_ok &&
(match == true))) {
+ lwc_string_unref(scheme);
return PAGE_STATE_INTERNAL;
}
@@ -4678,6 +4679,7 @@ browser_window_page_info_state browser_window_get_page_info_state(
if (lwc_string_isequal(scheme, corestring_lwc_file,
&match) == lwc_error_ok &&
match == true) {
+ lwc_string_unref(scheme);
return PAGE_STATE_LOCAL;
}
@@ -4686,9 +4688,12 @@ browser_window_page_info_state browser_window_get_page_info_state(
&match) == lwc_error_ok &&
(match == false))) {
/* Some remote content, not https, therefore insecure */
+ lwc_string_unref(scheme);
return PAGE_STATE_INSECURE;
}
+ lwc_string_unref(scheme);
+
/* Did we have to override this SSL setting? */
if (urldb_get_cert_permissions(bw->current_parameters.url)) {
return PAGE_STATE_SECURE_OVERRIDE;
-----------------------------------------------------------------------
Summary of changes:
content/content.c | 3 +++
desktop/browser_window.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/content/content.c b/content/content.c
index a87be00..552ee07 100644
--- a/content/content.c
+++ b/content/content.c
@@ -592,6 +592,7 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
&match) == lwc_error_ok &&
(match == true))) {
/* No insecurity to find */
+ lwc_string_unref(scheme);
return false;
}
@@ -600,9 +601,11 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
&match) == lwc_error_ok)
&& (match == false)) {
/* I did see something insecure -- ME! */
+ lwc_string_unref(scheme);
return true;
}
+ lwc_string_unref(scheme);
/* I am supposed to be secure, but was I overridden */
if (urldb_get_cert_permissions(url)) {
/* I was https:// but I was overridden, that's no good */
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 1fa3161..16fa73e 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4671,6 +4671,7 @@ browser_window_page_info_state browser_window_get_page_info_state(
(lwc_string_isequal(scheme, corestring_lwc_resource,
&match) == lwc_error_ok &&
(match == true))) {
+ lwc_string_unref(scheme);
return PAGE_STATE_INTERNAL;
}
@@ -4678,6 +4679,7 @@ browser_window_page_info_state browser_window_get_page_info_state(
if (lwc_string_isequal(scheme, corestring_lwc_file,
&match) == lwc_error_ok &&
match == true) {
+ lwc_string_unref(scheme);
return PAGE_STATE_LOCAL;
}
@@ -4686,9 +4688,12 @@ browser_window_page_info_state browser_window_get_page_info_state(
&match) == lwc_error_ok &&
(match == false))) {
/* Some remote content, not https, therefore insecure */
+ lwc_string_unref(scheme);
return PAGE_STATE_INSECURE;
}
+ lwc_string_unref(scheme);
+
/* Did we have to override this SSL setting? */
if (urldb_get_cert_permissions(bw->current_parameters.url)) {
return PAGE_STATE_SECURE_OVERRIDE;
--
NetSurf Browser
3 years, 1 month
netsurf: branch master updated. release/3.9-353-g5063fc8
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/5063fc838e9933b73bf6c...
...commit http://git.netsurf-browser.org/netsurf.git/commit/5063fc838e9933b73bf6c8d...
...tree http://git.netsurf-browser.org/netsurf.git/tree/5063fc838e9933b73bf6c8d2f...
The branch, master has been updated
via 5063fc838e9933b73bf6c8d2f330e5a8e53d7544 (commit)
via 715586bb6548ca9281aa88abadec328272eb585f (commit)
via 33c81b69325ecd0686477916c2d0a1c590eba773 (commit)
via 2e07d955b6489ac7d98708deb58adef1cb98d67a (commit)
via 868c42b34493fdee2a44db68f04aa7f198afc096 (commit)
from 08e2cc32bab262979126837b82de6db2922b9afb (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=5063fc838e9933b73bf...
commit 5063fc838e9933b73bf6c8d2f330e5a8e53d7544
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
monkey: Support reporting page info state
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 26ae090..49cc63c 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -404,6 +404,48 @@ gui_window_console_log(struct gui_window *g,
(int)msglen, msg);
}
+static void
+gui_window_report_page_info(struct gui_window *g)
+{
+ const char *state = "***WAH***";
+
+ switch (browser_window_get_page_info_state(g->bw)) {
+ case PAGE_STATE_UNKNOWN:
+ state = "UNKNOWN";
+ break;
+
+ case PAGE_STATE_INTERNAL:
+ state = "INTERNAL";
+ break;
+
+ case PAGE_STATE_LOCAL:
+ state = "LOCAL";
+ break;
+
+ case PAGE_STATE_INSECURE:
+ state = "INSECURE";
+ break;
+
+ case PAGE_STATE_SECURE_OVERRIDE:
+ state = "SECURE_OVERRIDE";
+ break;
+
+ case PAGE_STATE_SECURE_ISSUES:
+ state = "SECURE_ISSUES";
+ break;
+
+ case PAGE_STATE_SECURE:
+ state = "SECURE";
+ break;
+
+ default:
+ assert(0 && "Monkey needs some lovin' here");
+ break;
+ }
+ moutf(MOUT_WINDOW, "PAGE_STATUS WIN %u STATUS %s",
+ g->win_num, state);
+}
+
/**** Handlers ****/
static void
@@ -718,6 +760,10 @@ gui_window_event(struct gui_window *gw, enum gui_window_event event)
gui_window_stop_throbber(gw);
break;
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ gui_window_report_page_info(gw);
+ break;
+
default:
break;
}
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=715586bb6548ca9281a...
commit 715586bb6548ca9281aa88abadec328272eb585f
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
html_saw_insecure_objects: Don't infinite loop on objects
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index c49697b..631045a 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2680,6 +2680,7 @@ html_saw_insecure_objects(struct content *c)
if (content_saw_insecure_objects(obj->content))
return true;
}
+ obj = obj->next;
}
/* Now check the script list */
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=33c81b69325ecd06864...
commit 33c81b69325ecd0686477916c2d0a1c590eba773
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
html_css_fetcher: Use corestring_lwc_x_ns_css
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/handlers/html/html_css_fetcher.c b/content/handlers/html/html_css_fetcher.c
index 7987ea0..71fd78f 100644
--- a/content/handlers/html/html_css_fetcher.c
+++ b/content/handlers/html/html_css_fetcher.c
@@ -31,6 +31,7 @@
#include "netsurf/inttypes.h"
#include "utils/config.h"
+#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/ring.h"
#include "utils/nsurl.h"
@@ -284,7 +285,6 @@ static void html_css_fetcher_poll(lwc_string *scheme)
/* exported interface documented in html_internal.h */
nserror html_css_fetcher_register(void)
{
- lwc_string *scheme;
const struct fetcher_operation_table html_css_fetcher_ops = {
.initialise = html_css_fetcher_initialise,
.acceptable = html_css_fetcher_can_fetch,
@@ -296,13 +296,7 @@ nserror html_css_fetcher_register(void)
.finalise = html_css_fetcher_finalise
};
- if (lwc_intern_string("x-ns-css", SLEN("x-ns-css"),
- &scheme) != lwc_error_ok) {
- NSLOG(netsurf, INFO, "could not intern \"x-ns-css\".");
- return NSERROR_INIT_FAILED;
- }
-
- return fetcher_add(scheme, &html_css_fetcher_ops);
+ return fetcher_add(corestring_lwc_x_ns_css, &html_css_fetcher_ops);
}
/* exported interface documented in html_internal.h */
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=2e07d955b6489ac7d98...
commit 2e07d955b6489ac7d98708deb58adef1cb98d67a
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
content_saw_insecure_objects: Fix various corner cases
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/content.c b/content/content.c
index 1572628..a87be00 100644
--- a/content/content.c
+++ b/content/content.c
@@ -569,7 +569,8 @@ bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen)
bool content_saw_insecure_objects(struct hlcache_handle *h)
{
struct content *c = hlcache_handle_get_content(h);
- lwc_string *scheme = nsurl_get_component(content_get_url(c), NSURL_SCHEME);
+ struct nsurl *url = hlcache_handle_get_url(h);
+ lwc_string *scheme = nsurl_get_component(url, NSURL_SCHEME);
bool match;
/* Is this an internal scheme? If so, we trust here and stop */
@@ -581,6 +582,14 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
(match == true)) ||
(lwc_string_isequal(scheme, corestring_lwc_resource,
&match) == lwc_error_ok &&
+ (match == true)) ||
+ /* Our internal x-ns-css scheme is secure */
+ (lwc_string_isequal(scheme, corestring_lwc_x_ns_css,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ /* We also treat file: as "not insecure" here */
+ (lwc_string_isequal(scheme, corestring_lwc_file,
+ &match) == lwc_error_ok &&
(match == true))) {
/* No insecurity to find */
return false;
@@ -595,13 +604,13 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
}
/* I am supposed to be secure, but was I overridden */
- if (urldb_get_cert_permissions(content_get_url(c))) {
+ if (urldb_get_cert_permissions(url)) {
/* I was https:// but I was overridden, that's no good */
return true;
}
/* Otherwise try and chain through the handler */
- if (c->handler->saw_insecure_objects != NULL) {
+ if (c != NULL && c->handler->saw_insecure_objects != NULL) {
return c->handler->saw_insecure_objects(c);
}
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=868c42b34493fdee2a4...
commit 868c42b34493fdee2a44db68f04aa7f198afc096
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Add x-ns-css corestring
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/utils/corestringlist.h b/utils/corestringlist.h
index b109545..8bb5b42 100644
--- a/utils/corestringlist.h
+++ b/utils/corestringlist.h
@@ -150,6 +150,7 @@ CORESTRING_LWC_VALUE(query_auth, "query/auth");
CORESTRING_LWC_VALUE(query_ssl, "query/ssl");
CORESTRING_LWC_VALUE(query_timeout, "query/timeout");
CORESTRING_LWC_VALUE(query_fetcherror, "query/fetcherror");
+CORESTRING_LWC_VALUE(x_ns_css, "x-ns-css");
/* mime types */
CORESTRING_LWC_VALUE(multipart_form_data, "multipart/form-data");
-----------------------------------------------------------------------
Summary of changes:
content/content.c | 15 ++++++++--
content/handlers/html/html.c | 1 +
content/handlers/html/html_css_fetcher.c | 10 ++-----
frontends/monkey/browser.c | 46 ++++++++++++++++++++++++++++++
utils/corestringlist.h | 1 +
5 files changed, 62 insertions(+), 11 deletions(-)
diff --git a/content/content.c b/content/content.c
index 1572628..a87be00 100644
--- a/content/content.c
+++ b/content/content.c
@@ -569,7 +569,8 @@ bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen)
bool content_saw_insecure_objects(struct hlcache_handle *h)
{
struct content *c = hlcache_handle_get_content(h);
- lwc_string *scheme = nsurl_get_component(content_get_url(c), NSURL_SCHEME);
+ struct nsurl *url = hlcache_handle_get_url(h);
+ lwc_string *scheme = nsurl_get_component(url, NSURL_SCHEME);
bool match;
/* Is this an internal scheme? If so, we trust here and stop */
@@ -581,6 +582,14 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
(match == true)) ||
(lwc_string_isequal(scheme, corestring_lwc_resource,
&match) == lwc_error_ok &&
+ (match == true)) ||
+ /* Our internal x-ns-css scheme is secure */
+ (lwc_string_isequal(scheme, corestring_lwc_x_ns_css,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ /* We also treat file: as "not insecure" here */
+ (lwc_string_isequal(scheme, corestring_lwc_file,
+ &match) == lwc_error_ok &&
(match == true))) {
/* No insecurity to find */
return false;
@@ -595,13 +604,13 @@ bool content_saw_insecure_objects(struct hlcache_handle *h)
}
/* I am supposed to be secure, but was I overridden */
- if (urldb_get_cert_permissions(content_get_url(c))) {
+ if (urldb_get_cert_permissions(url)) {
/* I was https:// but I was overridden, that's no good */
return true;
}
/* Otherwise try and chain through the handler */
- if (c->handler->saw_insecure_objects != NULL) {
+ if (c != NULL && c->handler->saw_insecure_objects != NULL) {
return c->handler->saw_insecure_objects(c);
}
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index c49697b..631045a 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2680,6 +2680,7 @@ html_saw_insecure_objects(struct content *c)
if (content_saw_insecure_objects(obj->content))
return true;
}
+ obj = obj->next;
}
/* Now check the script list */
diff --git a/content/handlers/html/html_css_fetcher.c b/content/handlers/html/html_css_fetcher.c
index 7987ea0..71fd78f 100644
--- a/content/handlers/html/html_css_fetcher.c
+++ b/content/handlers/html/html_css_fetcher.c
@@ -31,6 +31,7 @@
#include "netsurf/inttypes.h"
#include "utils/config.h"
+#include "utils/corestrings.h"
#include "utils/log.h"
#include "utils/ring.h"
#include "utils/nsurl.h"
@@ -284,7 +285,6 @@ static void html_css_fetcher_poll(lwc_string *scheme)
/* exported interface documented in html_internal.h */
nserror html_css_fetcher_register(void)
{
- lwc_string *scheme;
const struct fetcher_operation_table html_css_fetcher_ops = {
.initialise = html_css_fetcher_initialise,
.acceptable = html_css_fetcher_can_fetch,
@@ -296,13 +296,7 @@ nserror html_css_fetcher_register(void)
.finalise = html_css_fetcher_finalise
};
- if (lwc_intern_string("x-ns-css", SLEN("x-ns-css"),
- &scheme) != lwc_error_ok) {
- NSLOG(netsurf, INFO, "could not intern \"x-ns-css\".");
- return NSERROR_INIT_FAILED;
- }
-
- return fetcher_add(scheme, &html_css_fetcher_ops);
+ return fetcher_add(corestring_lwc_x_ns_css, &html_css_fetcher_ops);
}
/* exported interface documented in html_internal.h */
diff --git a/frontends/monkey/browser.c b/frontends/monkey/browser.c
index 26ae090..49cc63c 100644
--- a/frontends/monkey/browser.c
+++ b/frontends/monkey/browser.c
@@ -404,6 +404,48 @@ gui_window_console_log(struct gui_window *g,
(int)msglen, msg);
}
+static void
+gui_window_report_page_info(struct gui_window *g)
+{
+ const char *state = "***WAH***";
+
+ switch (browser_window_get_page_info_state(g->bw)) {
+ case PAGE_STATE_UNKNOWN:
+ state = "UNKNOWN";
+ break;
+
+ case PAGE_STATE_INTERNAL:
+ state = "INTERNAL";
+ break;
+
+ case PAGE_STATE_LOCAL:
+ state = "LOCAL";
+ break;
+
+ case PAGE_STATE_INSECURE:
+ state = "INSECURE";
+ break;
+
+ case PAGE_STATE_SECURE_OVERRIDE:
+ state = "SECURE_OVERRIDE";
+ break;
+
+ case PAGE_STATE_SECURE_ISSUES:
+ state = "SECURE_ISSUES";
+ break;
+
+ case PAGE_STATE_SECURE:
+ state = "SECURE";
+ break;
+
+ default:
+ assert(0 && "Monkey needs some lovin' here");
+ break;
+ }
+ moutf(MOUT_WINDOW, "PAGE_STATUS WIN %u STATUS %s",
+ g->win_num, state);
+}
+
/**** Handlers ****/
static void
@@ -718,6 +760,10 @@ gui_window_event(struct gui_window *gw, enum gui_window_event event)
gui_window_stop_throbber(gw);
break;
+ case GW_EVENT_PAGE_INFO_CHANGE:
+ gui_window_report_page_info(gw);
+ break;
+
default:
break;
}
diff --git a/utils/corestringlist.h b/utils/corestringlist.h
index b109545..8bb5b42 100644
--- a/utils/corestringlist.h
+++ b/utils/corestringlist.h
@@ -150,6 +150,7 @@ CORESTRING_LWC_VALUE(query_auth, "query/auth");
CORESTRING_LWC_VALUE(query_ssl, "query/ssl");
CORESTRING_LWC_VALUE(query_timeout, "query/timeout");
CORESTRING_LWC_VALUE(query_fetcherror, "query/fetcherror");
+CORESTRING_LWC_VALUE(x_ns_css, "x-ns-css");
/* mime types */
CORESTRING_LWC_VALUE(multipart_form_data, "multipart/form-data");
--
NetSurf Browser
3 years, 1 month
netsurf: branch master updated. release/3.9-348-g08e2cc3
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/08e2cc32bab2629791268...
...commit http://git.netsurf-browser.org/netsurf.git/commit/08e2cc32bab262979126837...
...tree http://git.netsurf-browser.org/netsurf.git/tree/08e2cc32bab262979126837b8...
The branch, master has been updated
via 08e2cc32bab262979126837b82de6db2922b9afb (commit)
from a0af810966d37ca176fc78225b3156e5a69c77ee (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=08e2cc32bab26297912...
commit 08e2cc32bab262979126837b82de6db2922b9afb
Author: Vincent Sanders <vince(a)kyllikki.org>
Commit: Vincent Sanders <vince(a)kyllikki.org>
repurpose ssl certificate core window for nitial page infor window on gtk
diff --git a/frontends/gtk/Makefile b/frontends/gtk/Makefile
index 2f151e7..ae2e856 100644
--- a/frontends/gtk/Makefile
+++ b/frontends/gtk/Makefile
@@ -169,7 +169,7 @@ S_FRONTEND := gui.c schedule.c layout_pango.c bitmap.c plotters.c \
selection.c window.c fetch.c download.c menu.c print.c \
search.c tabs.c toolbar.c gettext.c compat.c viewdata.c \
viewsource.c preferences.c about.c resources.c corewindow.c \
- local_history.c global_history.c cookies.c hotlist.c ssl_cert.c
+ local_history.c global_history.c cookies.c hotlist.c page_info.c
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 351b002..609662e 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -69,7 +69,6 @@
#include "gtk/schedule.h"
#include "gtk/selection.h"
#include "gtk/search.h"
-#include "gtk/ssl_cert.h"
#include "gtk/bitmap.h"
#include "gtk/resources.h"
#include "gtk/layout_pango.h"
diff --git a/frontends/gtk/page_info.c b/frontends/gtk/page_info.c
new file mode 100644
index 0000000..adc2dfa
--- /dev/null
+++ b/frontends/gtk/page_info.c
@@ -0,0 +1,268 @@
+/*
+ * Copyright 2015 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+/**
+ * \file
+ * Implementation of gtk certificate viewing using gtk core windows.
+ */
+
+#include <stdint.h>
+#include <stdlib.h>
+#include <gtk/gtk.h>
+
+#include "utils/log.h"
+#include "netsurf/keypress.h"
+#include "netsurf/plotters.h"
+#include "netsurf/browser_window.h"
+#include "desktop/sslcert_viewer.h"
+
+#include "gtk/plotters.h"
+#include "gtk/scaffolding.h"
+#include "gtk/resources.h"
+#include "gtk/page_info.h"
+#include "gtk/corewindow.h"
+
+
+/**
+ * GTK certificate viewing window context
+ */
+struct nsgtk_crtvrfy_window {
+ /** GTK core window context */
+ struct nsgtk_corewindow core;
+ /** GTK builder for window */
+ GtkBuilder *builder;
+ /** GTK dialog window being shown */
+ GtkDialog *dlg;
+ /** SSL certificate viewer context data */
+ struct sslcert_session_data *ssl_data;
+};
+
+/**
+ * destroy a previously created certificate view
+ */
+static nserror nsgtk_crtvrfy_destroy(struct nsgtk_crtvrfy_window *crtvrfy_win)
+{
+ nserror res;
+
+ res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
+ if (res == NSERROR_OK) {
+ res = nsgtk_corewindow_fini(&crtvrfy_win->core);
+ gtk_widget_destroy(GTK_WIDGET(crtvrfy_win->dlg));
+ g_object_unref(G_OBJECT(crtvrfy_win->builder));
+ free(crtvrfy_win);
+ }
+ return res;
+}
+
+static void
+nsgtk_crtvrfy_accept(GtkButton *w, gpointer data)
+{
+ struct nsgtk_crtvrfy_window *crtvrfy_win;
+ crtvrfy_win = (struct nsgtk_crtvrfy_window *)data;
+
+ sslcert_viewer_accept(crtvrfy_win->ssl_data);
+
+ nsgtk_crtvrfy_destroy(crtvrfy_win);
+}
+
+static void
+nsgtk_crtvrfy_reject(GtkWidget *w, gpointer data)
+{
+ struct nsgtk_crtvrfy_window *crtvrfy_win;
+ crtvrfy_win = (struct nsgtk_crtvrfy_window *)data;
+
+ sslcert_viewer_reject(crtvrfy_win->ssl_data);
+
+ nsgtk_crtvrfy_destroy(crtvrfy_win);
+}
+
+static gboolean
+nsgtk_crtvrfy_delete_event(GtkWidget *w, GdkEvent *event, gpointer data)
+{
+ nsgtk_crtvrfy_reject(w, data);
+ return FALSE;
+}
+
+/**
+ * callback for mouse action for certificate verify on core window
+ *
+ * \param nsgtk_cw The nsgtk core window structure.
+ * \param mouse_state netsurf mouse state on event
+ * \param x location of event
+ * \param y location of event
+ * \return NSERROR_OK on success otherwise appropriate error code
+ */
+static nserror
+nsgtk_crtvrfy_mouse(struct nsgtk_corewindow *nsgtk_cw,
+ browser_mouse_state mouse_state,
+ int x, int y)
+{
+ struct nsgtk_crtvrfy_window *crtvrfy_win;
+ /* technically degenerate container of */
+ crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
+
+ sslcert_viewer_mouse_action(crtvrfy_win->ssl_data, mouse_state, x, y);
+
+ return NSERROR_OK;
+}
+
+/**
+ * callback for keypress for certificate verify on core window
+ *
+ * \param nsgtk_cw The nsgtk core window structure.
+ * \param nskey The netsurf key code
+ * \return NSERROR_OK on success otherwise appropriate error code
+ */
+static nserror
+nsgtk_crtvrfy_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
+{
+ struct nsgtk_crtvrfy_window *crtvrfy_win;
+
+ /* technically degenerate container of */
+ crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
+
+ if (sslcert_viewer_keypress(crtvrfy_win->ssl_data, nskey)) {
+ return NSERROR_OK;
+ }
+ return NSERROR_NOT_IMPLEMENTED;
+}
+
+/**
+ * callback on draw event for certificate verify on core window
+ *
+ * \param nsgtk_cw The nsgtk core window structure.
+ * \param r The rectangle of the window that needs updating.
+ * \return NSERROR_OK on success otherwise appropriate error code
+ */
+static nserror
+nsgtk_crtvrfy_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
+{
+ struct redraw_context ctx = {
+ .interactive = true,
+ .background_images = true,
+ .plot = &nsgtk_plotters
+ };
+ struct nsgtk_crtvrfy_window *crtvrfy_win;
+
+ /* technically degenerate container of */
+ crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
+
+ sslcert_viewer_redraw(crtvrfy_win->ssl_data, 0, 0, r, &ctx);
+
+ return NSERROR_OK;
+}
+
+static nserror dummy_cb(bool proceed, void *pw)
+{
+ return NSERROR_OK;
+}
+
+/* exported interface documented in gtk/page_info.h */
+nserror nsgtk_page_info(struct browser_window *bw)
+{
+ struct nsgtk_crtvrfy_window *ncwin;
+ nserror res;
+
+ size_t num;
+ struct ssl_cert_info *chain;
+ struct nsurl *url;
+
+ browser_window_get_ssl_chain(bw, &num, &chain);
+ url = browser_window_access_url(bw);
+
+ ncwin = malloc(sizeof(struct nsgtk_crtvrfy_window));
+ if (ncwin == NULL) {
+ return NSERROR_NOMEM;
+ }
+
+ res = nsgtk_builder_new_from_resname("ssl", &ncwin->builder);
+ if (res != NSERROR_OK) {
+ NSLOG(netsurf, INFO, "SSL UI builder init failed");
+ free(ncwin);
+ return res;
+ }
+
+ gtk_builder_connect_signals(ncwin->builder, NULL);
+
+ ncwin->dlg = GTK_DIALOG(gtk_builder_get_object(ncwin->builder,
+ "wndSSLProblem"));
+
+ /* set parent for transient dialog */
+ gtk_window_set_transient_for(GTK_WINDOW(ncwin->dlg),
+ nsgtk_scaffolding_window(nsgtk_current_scaffolding()));
+
+ ncwin->core.scrolled = GTK_SCROLLED_WINDOW(
+ gtk_builder_get_object(ncwin->builder, "SSLScrolled"));
+
+ ncwin->core.drawing_area = GTK_DRAWING_AREA(
+ gtk_builder_get_object(ncwin->builder, "SSLDrawingArea"));
+
+ /* make the delete event call our destructor */
+ g_signal_connect(G_OBJECT(ncwin->dlg),
+ "delete_event",
+ G_CALLBACK(nsgtk_crtvrfy_delete_event),
+ ncwin);
+
+ /* accept button */
+ g_signal_connect(G_OBJECT(gtk_builder_get_object(ncwin->builder,
+ "sslaccept")),
+ "clicked",
+ G_CALLBACK(nsgtk_crtvrfy_accept),
+ ncwin);
+
+ /* reject button */
+ g_signal_connect(G_OBJECT(gtk_builder_get_object(ncwin->builder,
+ "sslreject")),
+ "clicked",
+ G_CALLBACK(nsgtk_crtvrfy_reject),
+ ncwin);
+
+ /* initialise GTK core window */
+ ncwin->core.draw = nsgtk_crtvrfy_draw;
+ ncwin->core.key = nsgtk_crtvrfy_key;
+ ncwin->core.mouse = nsgtk_crtvrfy_mouse;
+
+ res = nsgtk_corewindow_init(&ncwin->core);
+ if (res != NSERROR_OK) {
+ g_object_unref(G_OBJECT(ncwin->dlg));
+ free(ncwin);
+ return res;
+ }
+
+ /* initialise certificate viewing interface */
+ res = sslcert_viewer_create_session_data(num, url, dummy_cb, NULL, chain,
+ &ncwin->ssl_data);
+ if (res != NSERROR_OK) {
+ g_object_unref(G_OBJECT(ncwin->dlg));
+ free(ncwin);
+ return res;
+ }
+
+ res = sslcert_viewer_init(ncwin->core.cb_table,
+ (struct core_window *)ncwin,
+ ncwin->ssl_data);
+ if (res != NSERROR_OK) {
+ g_object_unref(G_OBJECT(ncwin->dlg));
+ free(ncwin);
+ return res;
+ }
+
+ gtk_widget_show(GTK_WIDGET(ncwin->dlg));
+
+ return NSERROR_OK;
+}
diff --git a/frontends/gtk/page_info.h b/frontends/gtk/page_info.h
new file mode 100644
index 0000000..ad443fc
--- /dev/null
+++ b/frontends/gtk/page_info.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2019 Vincent Sanders <vince(a)netsurf-browser.org>
+ *
+ * This file is part of NetSurf, http://www.netsurf-browser.org/
+ *
+ * NetSurf is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * NetSurf is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef NETSURF_GTK_PAGE_INFO_H
+#define NETSURF_GTK_PAGE_INFO_H 1
+
+/**
+ * Page information window
+ *
+ * \param bw the browser window to get page information for
+ * \return NSERROR_OK or error code if prompt creation failed.
+ */
+nserror nsgtk_page_info(struct browser_window *bw);
+
+#endif
diff --git a/frontends/gtk/ssl_cert.c b/frontends/gtk/ssl_cert.c
deleted file mode 100644
index 9d98db1..0000000
--- a/frontends/gtk/ssl_cert.c
+++ /dev/null
@@ -1,259 +0,0 @@
-/*
- * Copyright 2015 Vincent Sanders <vince(a)netsurf-browser.org>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-/**
- * \file
- * Implementation of gtk certificate viewing using gtk core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <gtk/gtk.h>
-
-#include "utils/log.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "gtk/plotters.h"
-#include "gtk/scaffolding.h"
-#include "gtk/resources.h"
-#include "gtk/ssl_cert.h"
-#include "gtk/corewindow.h"
-
-
-/**
- * GTK certificate viewing window context
- */
-struct nsgtk_crtvrfy_window {
- /** GTK core window context */
- struct nsgtk_corewindow core;
- /** GTK builder for window */
- GtkBuilder *builder;
- /** GTK dialog window being shown */
- GtkDialog *dlg;
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-};
-
-/**
- * destroy a previously created certificate view
- */
-static nserror nsgtk_crtvrfy_destroy(struct nsgtk_crtvrfy_window *crtvrfy_win)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
- if (res == NSERROR_OK) {
- res = nsgtk_corewindow_fini(&crtvrfy_win->core);
- gtk_widget_destroy(GTK_WIDGET(crtvrfy_win->dlg));
- g_object_unref(G_OBJECT(crtvrfy_win->builder));
- free(crtvrfy_win);
- }
- return res;
-}
-
-static void
-nsgtk_crtvrfy_accept(GtkButton *w, gpointer data)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)data;
-
- sslcert_viewer_accept(crtvrfy_win->ssl_data);
-
- nsgtk_crtvrfy_destroy(crtvrfy_win);
-}
-
-static void
-nsgtk_crtvrfy_reject(GtkWidget *w, gpointer data)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)data;
-
- sslcert_viewer_reject(crtvrfy_win->ssl_data);
-
- nsgtk_crtvrfy_destroy(crtvrfy_win);
-}
-
-static gboolean
-nsgtk_crtvrfy_delete_event(GtkWidget *w, GdkEvent *event, gpointer data)
-{
- nsgtk_crtvrfy_reject(w, data);
- return FALSE;
-}
-
-/**
- * callback for mouse action for certificate verify on core window
- *
- * \param nsgtk_cw The nsgtk core window structure.
- * \param mouse_state netsurf mouse state on event
- * \param x location of event
- * \param y location of event
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsgtk_crtvrfy_mouse(struct nsgtk_corewindow *nsgtk_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
-
- sslcert_viewer_mouse_action(crtvrfy_win->ssl_data, mouse_state, x, y);
-
- return NSERROR_OK;
-}
-
-/**
- * callback for keypress for certificate verify on core window
- *
- * \param nsgtk_cw The nsgtk core window structure.
- * \param nskey The netsurf key code
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsgtk_crtvrfy_key(struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey)
-{
- struct nsgtk_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
-
- if (sslcert_viewer_keypress(crtvrfy_win->ssl_data, nskey)) {
- return NSERROR_OK;
- }
- return NSERROR_NOT_IMPLEMENTED;
-}
-
-/**
- * callback on draw event for certificate verify on core window
- *
- * \param nsgtk_cw The nsgtk core window structure.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsgtk_crtvrfy_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
-{
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &nsgtk_plotters
- };
- struct nsgtk_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsgtk_crtvrfy_window *)nsgtk_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data, 0, 0, r, &ctx);
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in gtk/ssl_cert.h */
-nserror gtk_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct nsgtk_crtvrfy_window *ncwin;
- nserror res;
-
- ncwin = malloc(sizeof(struct nsgtk_crtvrfy_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- res = nsgtk_builder_new_from_resname("ssl", &ncwin->builder);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "SSL UI builder init failed");
- free(ncwin);
- return res;
- }
-
- gtk_builder_connect_signals(ncwin->builder, NULL);
-
- ncwin->dlg = GTK_DIALOG(gtk_builder_get_object(ncwin->builder,
- "wndSSLProblem"));
-
- /* set parent for transient dialog */
- gtk_window_set_transient_for(GTK_WINDOW(ncwin->dlg),
- nsgtk_scaffolding_window(nsgtk_current_scaffolding()));
-
- ncwin->core.scrolled = GTK_SCROLLED_WINDOW(
- gtk_builder_get_object(ncwin->builder, "SSLScrolled"));
-
- ncwin->core.drawing_area = GTK_DRAWING_AREA(
- gtk_builder_get_object(ncwin->builder, "SSLDrawingArea"));
-
- /* make the delete event call our destructor */
- g_signal_connect(G_OBJECT(ncwin->dlg),
- "delete_event",
- G_CALLBACK(nsgtk_crtvrfy_delete_event),
- ncwin);
-
- /* accept button */
- g_signal_connect(G_OBJECT(gtk_builder_get_object(ncwin->builder,
- "sslaccept")),
- "clicked",
- G_CALLBACK(nsgtk_crtvrfy_accept),
- ncwin);
-
- /* reject button */
- g_signal_connect(G_OBJECT(gtk_builder_get_object(ncwin->builder,
- "sslreject")),
- "clicked",
- G_CALLBACK(nsgtk_crtvrfy_reject),
- ncwin);
-
- /* initialise GTK core window */
- ncwin->core.draw = nsgtk_crtvrfy_draw;
- ncwin->core.key = nsgtk_crtvrfy_key;
- ncwin->core.mouse = nsgtk_crtvrfy_mouse;
-
- res = nsgtk_corewindow_init(&ncwin->core);
- if (res != NSERROR_OK) {
- g_object_unref(G_OBJECT(ncwin->dlg));
- free(ncwin);
- return res;
- }
-
- /* initialise certificate viewing interface */
- res = sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
- &ncwin->ssl_data);
- if (res != NSERROR_OK) {
- g_object_unref(G_OBJECT(ncwin->dlg));
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- g_object_unref(G_OBJECT(ncwin->dlg));
- free(ncwin);
- return res;
- }
-
- gtk_widget_show(GTK_WIDGET(ncwin->dlg));
-
- return NSERROR_OK;
-}
diff --git a/frontends/gtk/ssl_cert.h b/frontends/gtk/ssl_cert.h
deleted file mode 100644
index 1712756..0000000
--- a/frontends/gtk/ssl_cert.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2005 James Bursa <bursa(a)users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NETSURF_GTK_SSL_CERT_H
-#define NETSURF_GTK_SSL_CERT_H 1
-
-struct nsurl;
-struct ssl_cert_info;
-
-/**
- * Prompt the user to verify a certificate with issuse.
- *
- * \param url The URL being verified.
- * \param certs The certificate to be verified
- * \param num The number of certificates to be verified.
- * \param cb Callback upon user decision.
- * \param cbpw Context pointer passed to cb
- * \return NSERROR_OK or error code if prompt creation failed.
- */
-nserror gtk_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-#endif
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index 8eba867..5d7d3f4 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -69,6 +69,7 @@
#include "gtk/about.h"
#include "gtk/gdk.h"
#include "gtk/bitmap.h"
+#include "gtk/page_info.h"
#include "gtk/toolbar.h"
/**
@@ -301,6 +302,9 @@ make_toolbar_item_throbber(bool sensitivity, bool edit)
* create url bar toolbar item widget
*
* create a gtk entry widget with a completion attached
+ *
+ * \param sensitivity if the entry should be created sensitive to input
+ * \param edit if the entry should be editable
*/
static GtkToolItem *
make_toolbar_item_url_bar(bool sensitivity, bool edit)
@@ -314,6 +318,9 @@ make_toolbar_item_url_bar(bool sensitivity, bool edit)
if (entry == NULL) {
return NULL;
}
+ nsgtk_entry_set_icon_from_icon_name(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ NSGTK_STOCK_INFO);
if (edit) {
gtk_entry_set_width_chars(GTK_ENTRY(entry), 9);
@@ -1941,6 +1948,31 @@ url_entry_changed_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
/**
+ * callback for url entry widget icon button release
+ *
+ * handler connected to url entry widget for the icon release signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param event The key change event that changed the entry.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE to allow activation.
+ */
+static void
+url_entry_icon_release_cb(GtkEntry *entry,
+ GtkEntryIconPosition icon_pos,
+ GdkEvent *event,
+ gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ nsgtk_page_info(bw);
+}
+
+
+/**
* handler for web search tool bar entry item activate signal
*
* handler connected to web search entry widget for the activate signal
@@ -3276,6 +3308,10 @@ toolbar_connect_signal(struct nsgtk_toolbar *tb, nsgtk_toolbar_button itemid)
"changed",
G_CALLBACK(url_entry_changed_cb),
tb);
+ g_signal_connect(GTK_WIDGET(entry),
+ "icon-release",
+ G_CALLBACK(url_entry_icon_release_cb),
+ tb);
nsgtk_completion_connect_signals(entry,
tb->get_bw,
-----------------------------------------------------------------------
Summary of changes:
frontends/gtk/Makefile | 2 +-
frontends/gtk/gui.c | 1 -
frontends/gtk/{ssl_cert.c => page_info.c} | 25 ++++++++-----
.../image/webp.h => frontends/gtk/page_info.h | 15 ++++----
frontends/gtk/ssl_cert.h | 37 --------------------
frontends/gtk/toolbar.c | 36 +++++++++++++++++++
6 files changed, 62 insertions(+), 54 deletions(-)
rename frontends/gtk/{ssl_cert.c => page_info.c} (93%)
copy content/handlers/image/webp.h => frontends/gtk/page_info.h (73%)
delete mode 100644 frontends/gtk/ssl_cert.h
diff --git a/frontends/gtk/Makefile b/frontends/gtk/Makefile
index 2f151e7..ae2e856 100644
--- a/frontends/gtk/Makefile
+++ b/frontends/gtk/Makefile
@@ -169,7 +169,7 @@ S_FRONTEND := gui.c schedule.c layout_pango.c bitmap.c plotters.c \
selection.c window.c fetch.c download.c menu.c print.c \
search.c tabs.c toolbar.c gettext.c compat.c viewdata.c \
viewsource.c preferences.c about.c resources.c corewindow.c \
- local_history.c global_history.c cookies.c hotlist.c ssl_cert.c
+ local_history.c global_history.c cookies.c hotlist.c page_info.c
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
diff --git a/frontends/gtk/gui.c b/frontends/gtk/gui.c
index 351b002..609662e 100644
--- a/frontends/gtk/gui.c
+++ b/frontends/gtk/gui.c
@@ -69,7 +69,6 @@
#include "gtk/schedule.h"
#include "gtk/selection.h"
#include "gtk/search.h"
-#include "gtk/ssl_cert.h"
#include "gtk/bitmap.h"
#include "gtk/resources.h"
#include "gtk/layout_pango.h"
diff --git a/frontends/gtk/ssl_cert.c b/frontends/gtk/page_info.c
similarity index 93%
rename from frontends/gtk/ssl_cert.c
rename to frontends/gtk/page_info.c
index 9d98db1..adc2dfa 100644
--- a/frontends/gtk/ssl_cert.c
+++ b/frontends/gtk/page_info.c
@@ -28,12 +28,13 @@
#include "utils/log.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
+#include "netsurf/browser_window.h"
#include "desktop/sslcert_viewer.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
#include "gtk/resources.h"
-#include "gtk/ssl_cert.h"
+#include "gtk/page_info.h"
#include "gtk/corewindow.h"
@@ -166,16 +167,24 @@ nsgtk_crtvrfy_draw(struct nsgtk_corewindow *nsgtk_cw, struct rect *r)
return NSERROR_OK;
}
-/* exported interface documented in gtk/ssl_cert.h */
-nserror gtk_cert_verify(struct nsurl *url,
- const struct ssl_cert_info *certs,
- unsigned long num,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
+static nserror dummy_cb(bool proceed, void *pw)
+{
+ return NSERROR_OK;
+}
+
+/* exported interface documented in gtk/page_info.h */
+nserror nsgtk_page_info(struct browser_window *bw)
{
struct nsgtk_crtvrfy_window *ncwin;
nserror res;
+ size_t num;
+ struct ssl_cert_info *chain;
+ struct nsurl *url;
+
+ browser_window_get_ssl_chain(bw, &num, &chain);
+ url = browser_window_access_url(bw);
+
ncwin = malloc(sizeof(struct nsgtk_crtvrfy_window));
if (ncwin == NULL) {
return NSERROR_NOMEM;
@@ -236,7 +245,7 @@ nserror gtk_cert_verify(struct nsurl *url,
}
/* initialise certificate viewing interface */
- res = sslcert_viewer_create_session_data(num, url, cb, cbpw, certs,
+ res = sslcert_viewer_create_session_data(num, url, dummy_cb, NULL, chain,
&ncwin->ssl_data);
if (res != NSERROR_OK) {
g_object_unref(G_OBJECT(ncwin->dlg));
diff --git a/content/handlers/image/webp.h b/frontends/gtk/page_info.h
similarity index 73%
copy from content/handlers/image/webp.h
copy to frontends/gtk/page_info.h
index b219f25..ad443fc 100644
--- a/content/handlers/image/webp.h
+++ b/frontends/gtk/page_info.h
@@ -16,14 +16,15 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#ifndef NETSURF_GTK_PAGE_INFO_H
+#define NETSURF_GTK_PAGE_INFO_H 1
+
/**
- * \file
- * Interface to image/webp content handlers
+ * Page information window
+ *
+ * \param bw the browser window to get page information for
+ * \return NSERROR_OK or error code if prompt creation failed.
*/
-
-#ifndef _NETSURF_IMAGE_WEBP_H_
-#define _NETSURF_IMAGE_WEBP_H_
-
-nserror nswebp_init(void);
+nserror nsgtk_page_info(struct browser_window *bw);
#endif
diff --git a/frontends/gtk/ssl_cert.h b/frontends/gtk/ssl_cert.h
deleted file mode 100644
index 1712756..0000000
--- a/frontends/gtk/ssl_cert.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright 2005 James Bursa <bursa(a)users.sourceforge.net>
- *
- * This file is part of NetSurf, http://www.netsurf-browser.org/
- *
- * NetSurf is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * NetSurf is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef NETSURF_GTK_SSL_CERT_H
-#define NETSURF_GTK_SSL_CERT_H 1
-
-struct nsurl;
-struct ssl_cert_info;
-
-/**
- * Prompt the user to verify a certificate with issuse.
- *
- * \param url The URL being verified.
- * \param certs The certificate to be verified
- * \param num The number of certificates to be verified.
- * \param cb Callback upon user decision.
- * \param cbpw Context pointer passed to cb
- * \return NSERROR_OK or error code if prompt creation failed.
- */
-nserror gtk_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-#endif
diff --git a/frontends/gtk/toolbar.c b/frontends/gtk/toolbar.c
index 8eba867..5d7d3f4 100644
--- a/frontends/gtk/toolbar.c
+++ b/frontends/gtk/toolbar.c
@@ -69,6 +69,7 @@
#include "gtk/about.h"
#include "gtk/gdk.h"
#include "gtk/bitmap.h"
+#include "gtk/page_info.h"
#include "gtk/toolbar.h"
/**
@@ -301,6 +302,9 @@ make_toolbar_item_throbber(bool sensitivity, bool edit)
* create url bar toolbar item widget
*
* create a gtk entry widget with a completion attached
+ *
+ * \param sensitivity if the entry should be created sensitive to input
+ * \param edit if the entry should be editable
*/
static GtkToolItem *
make_toolbar_item_url_bar(bool sensitivity, bool edit)
@@ -314,6 +318,9 @@ make_toolbar_item_url_bar(bool sensitivity, bool edit)
if (entry == NULL) {
return NULL;
}
+ nsgtk_entry_set_icon_from_icon_name(entry,
+ GTK_ENTRY_ICON_PRIMARY,
+ NSGTK_STOCK_INFO);
if (edit) {
gtk_entry_set_width_chars(GTK_ENTRY(entry), 9);
@@ -1941,6 +1948,31 @@ url_entry_changed_cb(GtkWidget *widget, GdkEventKey *event, gpointer data)
/**
+ * callback for url entry widget icon button release
+ *
+ * handler connected to url entry widget for the icon release signal
+ *
+ * \param widget The widget the signal is being delivered to.
+ * \param event The key change event that changed the entry.
+ * \param data The toolbar context passed when the signal was connected
+ * \return TRUE to allow activation.
+ */
+static void
+url_entry_icon_release_cb(GtkEntry *entry,
+ GtkEntryIconPosition icon_pos,
+ GdkEvent *event,
+ gpointer data)
+{
+ struct nsgtk_toolbar *tb = (struct nsgtk_toolbar *)data;
+ struct browser_window *bw;
+
+ bw = tb->get_bw(tb->get_ctx);
+
+ nsgtk_page_info(bw);
+}
+
+
+/**
* handler for web search tool bar entry item activate signal
*
* handler connected to web search entry widget for the activate signal
@@ -3276,6 +3308,10 @@ toolbar_connect_signal(struct nsgtk_toolbar *tb, nsgtk_toolbar_button itemid)
"changed",
G_CALLBACK(url_entry_changed_cb),
tb);
+ g_signal_connect(GTK_WIDGET(entry),
+ "icon-release",
+ G_CALLBACK(url_entry_icon_release_cb),
+ tb);
nsgtk_completion_connect_signals(entry,
tb->get_bw,
--
NetSurf Browser
3 years, 1 month
netsurf: branch master updated. release/3.9-347-ga0af810
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/a0af810966d37ca176fc7...
...commit http://git.netsurf-browser.org/netsurf.git/commit/a0af810966d37ca176fc782...
...tree http://git.netsurf-browser.org/netsurf.git/tree/a0af810966d37ca176fc78225...
The branch, master has been updated
via a0af810966d37ca176fc78225b3156e5a69c77ee (commit)
from 9faca2b9407097359d682b4593fed7a418b86400 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=a0af810966d37ca176f...
commit a0af810966d37ca176fc78225b3156e5a69c77ee
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Some early padlock ideas
diff --git a/docs/padlock/padlock-insecure.svg b/docs/padlock/padlock-insecure.svg
new file mode 100644
index 0000000..82f3b24
--- /dev/null
+++ b/docs/padlock/padlock-insecure.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="1190.000000pt"
+ height="1280.000000pt"
+ viewBox="0 0 1190.000000 1280.000000"
+ preserveAspectRatio="xMidYMid meet"
+ id="svg8"
+ sodipodi:docname="padlock-insecure.svg"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1416"
+ id="namedview10"
+ showgrid="false"
+ inkscape:zoom="0.39111844"
+ inkscape:cx="-663.2803"
+ inkscape:cy="1243.2619"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg8" />
+ <metadata
+ id="metadata2">
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+<rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+</rdf:RDF>
+</metadata>
+ <g
+ transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
+ fill="#000000"
+ stroke="none"
+ id="g6">
+ <path
+ d="M5610 11999 c-1096 -88 -1924 -626 -2375 -1544 -80 -162 -155 -347 -155 -380 0 -8 -4 -15 -8 -15 -4 0 -8 -8 -9 -17 -1 -19 -6 -38 -16 -63 -17 -47 -78 -287 -91 -360 -3 -19 -8 -46 -11 -59 -2 -14 -7 -47 -10 -74 -3 -28 -8 -53 -10 -56 -8 -13 -24 -189 -28 -313 -1 -27 -5 -48 -10 -48 -4 0 -3 -9 3 -20 8 -14 8 -20 0 -20 -7 0 -8 -6 -1 -19 6 -10 8 -21 5 -24 -3 -3 -5 -392 -4 -865 l1 -860 -26 -20 c-14 -11 -69 -30 -123 -43 -159 -36 -266 -74 -364 -128 -109 -60 -149 -91 -240 -183 -206 -208 -334 -560 -353 -968 -5 -99 -4 -3022 1 -3125 8 -175 28 -319 46 -343 7 -8 7 -12 -1 -12 -7 0 -9 -5 -4 -13 4 -6 8 -16 9 -22 1 -5 11 -34 23 -62 11 -29 17 -53 13 -53 -4 0 -2 -4 3 -8 10 -7 37 -61 37 -72 0 -3 6 -12 14 -21 8 -9 12 -18 9 -21 -3 -3 6 -17 20 -32 13 -14 25 -29 25 -31 0 -14 84 -117 122 -150 24 -21 34 -32 23 -24 -18 13 -19 13 -6 -3 7 -10 17 -18 22 -18 5 0 17 -8 27 -17 39 -37 67 -57 121 -86 175 -94 267 -121 521 -153 111 -13 461 -15 3121 -14 3106 0 3123 0 3314 39 221 45 397 134 531 270 161 162 238 342 269 626 12 107 15 407 15 1696 0 862 -2 1573 -4 1580 -3 8 -7 63 -10 122 -4 60 -8 112 -10 116 -3 4 -7 27 -10 51 -17 143 -76 342 -137 463 -30 57 -107 176 -138 211 -62 69 -159 160 -174 164 -13 3 -37 30 -38 44 0 7 -4 4 -8 -7 -8 -19 -8 -19 -15 3 -5 14 -13 21 -21 18 -8 -3 -19 2 -25 10 -7 8 -19 14 -26 14 -8 0 -14 5 -14 10 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -9 10 -20 10 -11 0 -20 5 -20 11 0 5 -4 7 -10 4 -5 -3 -10 -1 -10 5 0 6 -4 8 -10 5 -5 -3 -10 -2 -10 4 0 5 -8 8 -17 6 -10 -1 -30 4 -45 11 -15 8 -31 13 -35 13 -4 -1 -16 1 -25 4 -46 18 -54 20 -69 23 -9 2 -27 8 -40 13 -13 5 -27 8 -30 7 -4 0 -17 8 -30 19 -14 13 -20 14 -15 5 4 -8 -4 -2 -18 13 l-26 28 0 847 c-1 466 -3 883 -5 927 -7 117 -14 206 -19 240 -3 24 -26 169 -40 255 -21 125 -30 170 -36 170 -4 0 -6 10 -5 23 1 12 -1 27 -5 32 -5 6 -11 24 -13 40 -9 46 -14 68 -25 96 -6 15 -8 29 -6 32 3 3 -2 22 -10 42 -9 21 -16 47 -16 59 0 16 -2 18 -9 7 -7 -10 -11 -1 -16 32 -4 26 -12 47 -17 47 -6 0 -8 9 -5 20 3 11 1 20 -4 20 -5 0 -9 7 -9 15 0 8 -4 15 -10 15 -5 0 -6 7 -3 17 5 11 3 14 -6 8 -10 -6 -11 -2 -6 15 5 17 4 21 -5 15 -8 -5 -11 -4 -6 3 7 11 -28 93 -96 227 -22 44 -55 107 -71 140 -17 33 -34 62 -38 65 -3 3 -16 25 -29 49 -12 24 -26 49 -31 55 -30 36 -84 113 -105 149 -13 23 -24 38 -24 34 0 -4 -6 -2 -14 5 -8 7 -12 16 -9 20 2 4 -7 19 -21 33 -15 14 -26 31 -26 37 0 6 -3 8 -7 5 -3 -4 -13 2 -20 13 -8 11 -19 18 -24 15 -5 -4 -9 2 -9 12 0 11 -20 39 -45 63 -24 24 -42 47 -39 52 3 4 -4 8 -15 8 -11 0 -22 9 -26 20 -3 11 -13 20 -21 20 -8 0 -14 7 -14 15 0 8 -7 15 -16 15 -8 0 -12 5 -9 10 3 6 -1 10 -9 10 -9 0 -16 5 -16 11 0 5 -3 8 -7 6 -5 -3 -14 1 -21 9 -7 8 -9 14 -5 14 4 1 -4 8 -19 16 -16 8 -28 19 -28 24 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -5 10 -10 10 -6 0 -21 11 -34 25 -13 14 -26 25 -30 25 -7 0 -67 41 -76 51 -3 3 -19 13 -37 22 -17 9 -37 22 -45 29 -18 17 -59 42 -143 85 -38 19 -73 40 -76 45 -3 5 -9 9 -12 9 -4 0 -26 8 -49 18 -374 158 -665 229 -1072 261 -150 12 -504 11 -656 -1z m475 -1214 c103 -10 140 -15 240 -31 90 -15 283 -67 314 -85 17 -9 74 -31 79 -30 10 4 273 -148 292 -170 3 -3 23 -18 44 -35 22 -16 49 -38 60 -49 12 -11 35 -31 51 -43 17 -13 23 -21 15 -17 -8 4 -1 -6 16 -22 27 -24 98 -107 157 -184 10 -13 27 -40 38 -59 11 -19 28 -48 39 -65 19 -30 73 -126 75 -135 1 -3 10 -23 20 -45 10 -22 18 -43 17 -47 -1 -5 2 -8 6 -8 5 0 9 -6 10 -12 2 -29 29 -88 37 -81 4 5 5 3 1 -4 -4 -7 7 -50 23 -97 16 -46 27 -87 24 -90 -3 -3 0 -12 7 -21 7 -9 10 -18 7 -22 -4 -3 -2 -12 4 -20 9 -10 8 -13 -2 -13 -9 -1 -8 -5 5 -15 11 -8 15 -15 8 -15 -8 0 -9 -7 -1 -27 6 -16 12 -37 14 -48 8 -49 27 -203 29 -230 0 -16 5 -33 11 -37 7 -5 6 -8 0 -8 -6 0 -11 -9 -11 -20 0 -11 4 -20 9 -20 5 0 4 -6 -2 -14 -9 -11 -9 -15 1 -20 10 -5 10 -7 1 -12 -19 -8 -16 -24 5 -24 10 0 13 -3 6 -8 -16 -10 -18 -222 -3 -222 8 0 9 -4 0 -13 -8 -10 -12 -215 -13 -707 l-3 -694 -34 -20 c-34 -20 -56 -20 -1717 -24 -1216 -3 -1683 -1 -1688 7 -4 6 -22 11 -40 11 -69 0 -65 -59 -66 905 -1 479 -1 872 0 875 1 3 3 32 5 65 4 65 10 117 26 210 6 33 12 71 13 85 2 14 6 32 10 41 4 9 8 27 10 41 1 13 5 28 8 33 3 6 9 28 13 50 8 42 47 159 71 212 8 17 14 34 14 39 0 33 188 356 247 424 36 42 197 200 239 235 110 93 398 240 507 259 7 1 28 7 47 14 58 19 273 52 382 58 57 4 104 7 105 8 4 3 156 -3 218 -9z"
+ id="path4" />
+ </g>
+ <rect
+ id="rect14"
+ width="1321.9366"
+ height="329.28085"
+ x="-502.36847"
+ y="728.58783"
+ style="stroke-width:1.05677092;fill:#ffffff"
+ ry="46.090546"
+ transform="matrix(0.7710634,-0.63675838,0.53742864,0.84330923,0,0)" />
+ <rect
+ transform="matrix(0.7710634,-0.63675838,0.53742864,0.84330923,0,0)"
+ ry="35.784081"
+ style="fill:#ff0000;stroke-width:0.82046276"
+ y="771.86188"
+ x="-367.09418"
+ height="255.64925"
+ width="1026.3339"
+ id="rect16" />
+</svg>
diff --git a/docs/padlock/padlock-warning.svg b/docs/padlock/padlock-warning.svg
new file mode 100644
index 0000000..b22b7a1
--- /dev/null
+++ b/docs/padlock/padlock-warning.svg
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="1190.000000pt"
+ height="1280.000000pt"
+ viewBox="0 0 1190.000000 1280.000000"
+ preserveAspectRatio="xMidYMid meet"
+ id="svg8"
+ sodipodi:docname="padlock-warning.svg"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+ <defs
+ id="defs12">
+ <linearGradient
+ y1="45.47"
+ x2="0"
+ y2="-.599"
+ id="0"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.31117,0,0,1.30239,737.39,159.91)">
+ <stop
+ id="stop33"
+ stop-color="#ffc515" />
+ <stop
+ id="stop35"
+ stop-color="#ffd55b"
+ offset="1" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1416"
+ id="namedview10"
+ showgrid="false"
+ inkscape:zoom="0.13828125"
+ inkscape:cx="807.79661"
+ inkscape:cy="853.33333"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg8" />
+ <metadata
+ id="metadata2">
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+<rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+</rdf:RDF>
+</metadata>
+ <g
+ transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
+ fill="#000000"
+ stroke="none"
+ id="g6">
+ <path
+ d="M5610 11999 c-1096 -88 -1924 -626 -2375 -1544 -80 -162 -155 -347 -155 -380 0 -8 -4 -15 -8 -15 -4 0 -8 -8 -9 -17 -1 -19 -6 -38 -16 -63 -17 -47 -78 -287 -91 -360 -3 -19 -8 -46 -11 -59 -2 -14 -7 -47 -10 -74 -3 -28 -8 -53 -10 -56 -8 -13 -24 -189 -28 -313 -1 -27 -5 -48 -10 -48 -4 0 -3 -9 3 -20 8 -14 8 -20 0 -20 -7 0 -8 -6 -1 -19 6 -10 8 -21 5 -24 -3 -3 -5 -392 -4 -865 l1 -860 -26 -20 c-14 -11 -69 -30 -123 -43 -159 -36 -266 -74 -364 -128 -109 -60 -149 -91 -240 -183 -206 -208 -334 -560 -353 -968 -5 -99 -4 -3022 1 -3125 8 -175 28 -319 46 -343 7 -8 7 -12 -1 -12 -7 0 -9 -5 -4 -13 4 -6 8 -16 9 -22 1 -5 11 -34 23 -62 11 -29 17 -53 13 -53 -4 0 -2 -4 3 -8 10 -7 37 -61 37 -72 0 -3 6 -12 14 -21 8 -9 12 -18 9 -21 -3 -3 6 -17 20 -32 13 -14 25 -29 25 -31 0 -14 84 -117 122 -150 24 -21 34 -32 23 -24 -18 13 -19 13 -6 -3 7 -10 17 -18 22 -18 5 0 17 -8 27 -17 39 -37 67 -57 121 -86 175 -94 267 -121 521 -153 111 -13 461 -15 3121 -14 3106 0 3123 0 3314 39 221 45 397 134 531 270 161 162 238 342 269 626 12 107 15 407 15 1696 0 862 -2 1573 -4 1580 -3 8 -7 63 -10 122 -4 60 -8 112 -10 116 -3 4 -7 27 -10 51 -17 143 -76 342 -137 463 -30 57 -107 176 -138 211 -62 69 -159 160 -174 164 -13 3 -37 30 -38 44 0 7 -4 4 -8 -7 -8 -19 -8 -19 -15 3 -5 14 -13 21 -21 18 -8 -3 -19 2 -25 10 -7 8 -19 14 -26 14 -8 0 -14 5 -14 10 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -9 10 -20 10 -11 0 -20 5 -20 11 0 5 -4 7 -10 4 -5 -3 -10 -1 -10 5 0 6 -4 8 -10 5 -5 -3 -10 -2 -10 4 0 5 -8 8 -17 6 -10 -1 -30 4 -45 11 -15 8 -31 13 -35 13 -4 -1 -16 1 -25 4 -46 18 -54 20 -69 23 -9 2 -27 8 -40 13 -13 5 -27 8 -30 7 -4 0 -17 8 -30 19 -14 13 -20 14 -15 5 4 -8 -4 -2 -18 13 l-26 28 0 847 c-1 466 -3 883 -5 927 -7 117 -14 206 -19 240 -3 24 -26 169 -40 255 -21 125 -30 170 -36 170 -4 0 -6 10 -5 23 1 12 -1 27 -5 32 -5 6 -11 24 -13 40 -9 46 -14 68 -25 96 -6 15 -8 29 -6 32 3 3 -2 22 -10 42 -9 21 -16 47 -16 59 0 16 -2 18 -9 7 -7 -10 -11 -1 -16 32 -4 26 -12 47 -17 47 -6 0 -8 9 -5 20 3 11 1 20 -4 20 -5 0 -9 7 -9 15 0 8 -4 15 -10 15 -5 0 -6 7 -3 17 5 11 3 14 -6 8 -10 -6 -11 -2 -6 15 5 17 4 21 -5 15 -8 -5 -11 -4 -6 3 7 11 -28 93 -96 227 -22 44 -55 107 -71 140 -17 33 -34 62 -38 65 -3 3 -16 25 -29 49 -12 24 -26 49 -31 55 -30 36 -84 113 -105 149 -13 23 -24 38 -24 34 0 -4 -6 -2 -14 5 -8 7 -12 16 -9 20 2 4 -7 19 -21 33 -15 14 -26 31 -26 37 0 6 -3 8 -7 5 -3 -4 -13 2 -20 13 -8 11 -19 18 -24 15 -5 -4 -9 2 -9 12 0 11 -20 39 -45 63 -24 24 -42 47 -39 52 3 4 -4 8 -15 8 -11 0 -22 9 -26 20 -3 11 -13 20 -21 20 -8 0 -14 7 -14 15 0 8 -7 15 -16 15 -8 0 -12 5 -9 10 3 6 -1 10 -9 10 -9 0 -16 5 -16 11 0 5 -3 8 -7 6 -5 -3 -14 1 -21 9 -7 8 -9 14 -5 14 4 1 -4 8 -19 16 -16 8 -28 19 -28 24 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -5 10 -10 10 -6 0 -21 11 -34 25 -13 14 -26 25 -30 25 -7 0 -67 41 -76 51 -3 3 -19 13 -37 22 -17 9 -37 22 -45 29 -18 17 -59 42 -143 85 -38 19 -73 40 -76 45 -3 5 -9 9 -12 9 -4 0 -26 8 -49 18 -374 158 -665 229 -1072 261 -150 12 -504 11 -656 -1z m475 -1214 c103 -10 140 -15 240 -31 90 -15 283 -67 314 -85 17 -9 74 -31 79 -30 10 4 273 -148 292 -170 3 -3 23 -18 44 -35 22 -16 49 -38 60 -49 12 -11 35 -31 51 -43 17 -13 23 -21 15 -17 -8 4 -1 -6 16 -22 27 -24 98 -107 157 -184 10 -13 27 -40 38 -59 11 -19 28 -48 39 -65 19 -30 73 -126 75 -135 1 -3 10 -23 20 -45 10 -22 18 -43 17 -47 -1 -5 2 -8 6 -8 5 0 9 -6 10 -12 2 -29 29 -88 37 -81 4 5 5 3 1 -4 -4 -7 7 -50 23 -97 16 -46 27 -87 24 -90 -3 -3 0 -12 7 -21 7 -9 10 -18 7 -22 -4 -3 -2 -12 4 -20 9 -10 8 -13 -2 -13 -9 -1 -8 -5 5 -15 11 -8 15 -15 8 -15 -8 0 -9 -7 -1 -27 6 -16 12 -37 14 -48 8 -49 27 -203 29 -230 0 -16 5 -33 11 -37 7 -5 6 -8 0 -8 -6 0 -11 -9 -11 -20 0 -11 4 -20 9 -20 5 0 4 -6 -2 -14 -9 -11 -9 -15 1 -20 10 -5 10 -7 1 -12 -19 -8 -16 -24 5 -24 10 0 13 -3 6 -8 -16 -10 -18 -222 -3 -222 8 0 9 -4 0 -13 -8 -10 -12 -215 -13 -707 l-3 -694 -34 -20 c-34 -20 -56 -20 -1717 -24 -1216 -3 -1683 -1 -1688 7 -4 6 -22 11 -40 11 -69 0 -65 -59 -66 905 -1 479 -1 872 0 875 1 3 3 32 5 65 4 65 10 117 26 210 6 33 12 71 13 85 2 14 6 32 10 41 4 9 8 27 10 41 1 13 5 28 8 33 3 6 9 28 13 50 8 42 47 159 71 212 8 17 14 34 14 39 0 33 188 356 247 424 36 42 197 200 239 235 110 93 398 240 507 259 7 1 28 7 47 14 58 19 273 52 382 58 57 4 104 7 105 8 4 3 156 -3 218 -9z"
+ id="path4" />
+ </g>
+ <g
+ id="g44"
+ transform="matrix(14.340787,0,0,14.340787,-10339.937,-1906.3913)">
+ <path
+ id="path40"
+ d="m 797.94,212.01 -25.607,-48 c -0.736,-1.333 -2.068,-2.074 -3.551,-2.074 -1.483,0 -2.822,0.889 -3.569,2.222 l -25.417,48 c -0.598,1.185 -0.605,2.815 0.132,4 0.737,1.185 1.921,1.778 3.404,1.778 h 51.02 c 1.483,0 2.821,-0.741 3.42,-1.926 0.747,-1.185 0.753,-2.667 0.165,-4"
+ inkscape:connector-curvature="0"
+ style="fill:url(#0)" />
+ <path
+ id="path42"
+ transform="matrix(1.05196,0,0,1.05196,796.53,161.87)"
+ d="m -26.309,18.07 c -1.18,0 -2.135,0.968 -2.135,2.129 v 12.82 c 0,1.176 0.948,2.129 2.135,2.129 1.183,0 2.135,-0.968 2.135,-2.129 v -12.82 c 0,-1.176 -0.946,-2.129 -2.135,-2.129 z m 0,21.348 c -1.18,0 -2.135,0.954 -2.135,2.135 0,1.18 0.954,2.135 2.135,2.135 1.181,0 2.135,-0.954 2.135,-2.135 0,-1.18 -0.952,-2.135 -2.135,-2.135 z"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:0.75;stroke:#40330d" />
+ </g>
+</svg>
diff --git a/docs/padlock/padlock.svg b/docs/padlock/padlock.svg
new file mode 100644
index 0000000..b7277c4
--- /dev/null
+++ b/docs/padlock/padlock.svg
@@ -0,0 +1,69 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="1190.000000pt" height="1280.000000pt" viewBox="0 0 1190.000000 1280.000000"
+ preserveAspectRatio="xMidYMid meet">
+<metadata>
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+</metadata>
+<g transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M5610 11999 c-1096 -88 -1924 -626 -2375 -1544 -80 -162 -155 -347
+-155 -380 0 -8 -4 -15 -8 -15 -4 0 -8 -8 -9 -17 -1 -19 -6 -38 -16 -63 -17
+-47 -78 -287 -91 -360 -3 -19 -8 -46 -11 -59 -2 -14 -7 -47 -10 -74 -3 -28 -8
+-53 -10 -56 -8 -13 -24 -189 -28 -313 -1 -27 -5 -48 -10 -48 -4 0 -3 -9 3 -20
+8 -14 8 -20 0 -20 -7 0 -8 -6 -1 -19 6 -10 8 -21 5 -24 -3 -3 -5 -392 -4 -865
+l1 -860 -26 -20 c-14 -11 -69 -30 -123 -43 -159 -36 -266 -74 -364 -128 -109
+-60 -149 -91 -240 -183 -206 -208 -334 -560 -353 -968 -5 -99 -4 -3022 1
+-3125 8 -175 28 -319 46 -343 7 -8 7 -12 -1 -12 -7 0 -9 -5 -4 -13 4 -6 8 -16
+9 -22 1 -5 11 -34 23 -62 11 -29 17 -53 13 -53 -4 0 -2 -4 3 -8 10 -7 37 -61
+37 -72 0 -3 6 -12 14 -21 8 -9 12 -18 9 -21 -3 -3 6 -17 20 -32 13 -14 25 -29
+25 -31 0 -14 84 -117 122 -150 24 -21 34 -32 23 -24 -18 13 -19 13 -6 -3 7
+-10 17 -18 22 -18 5 0 17 -8 27 -17 39 -37 67 -57 121 -86 175 -94 267 -121
+521 -153 111 -13 461 -15 3121 -14 3106 0 3123 0 3314 39 221 45 397 134 531
+270 161 162 238 342 269 626 12 107 15 407 15 1696 0 862 -2 1573 -4 1580 -3
+8 -7 63 -10 122 -4 60 -8 112 -10 116 -3 4 -7 27 -10 51 -17 143 -76 342 -137
+463 -30 57 -107 176 -138 211 -62 69 -159 160 -174 164 -13 3 -37 30 -38 44 0
+7 -4 4 -8 -7 -8 -19 -8 -19 -15 3 -5 14 -13 21 -21 18 -8 -3 -19 2 -25 10 -7
+8 -19 14 -26 14 -8 0 -14 5 -14 10 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -9
+10 -20 10 -11 0 -20 5 -20 11 0 5 -4 7 -10 4 -5 -3 -10 -1 -10 5 0 6 -4 8 -10
+5 -5 -3 -10 -2 -10 4 0 5 -8 8 -17 6 -10 -1 -30 4 -45 11 -15 8 -31 13 -35 13
+-4 -1 -16 1 -25 4 -46 18 -54 20 -69 23 -9 2 -27 8 -40 13 -13 5 -27 8 -30 7
+-4 0 -17 8 -30 19 -14 13 -20 14 -15 5 4 -8 -4 -2 -18 13 l-26 28 0 847 c-1
+466 -3 883 -5 927 -7 117 -14 206 -19 240 -3 24 -26 169 -40 255 -21 125 -30
+170 -36 170 -4 0 -6 10 -5 23 1 12 -1 27 -5 32 -5 6 -11 24 -13 40 -9 46 -14
+68 -25 96 -6 15 -8 29 -6 32 3 3 -2 22 -10 42 -9 21 -16 47 -16 59 0 16 -2 18
+-9 7 -7 -10 -11 -1 -16 32 -4 26 -12 47 -17 47 -6 0 -8 9 -5 20 3 11 1 20 -4
+20 -5 0 -9 7 -9 15 0 8 -4 15 -10 15 -5 0 -6 7 -3 17 5 11 3 14 -6 8 -10 -6
+-11 -2 -6 15 5 17 4 21 -5 15 -8 -5 -11 -4 -6 3 7 11 -28 93 -96 227 -22 44
+-55 107 -71 140 -17 33 -34 62 -38 65 -3 3 -16 25 -29 49 -12 24 -26 49 -31
+55 -30 36 -84 113 -105 149 -13 23 -24 38 -24 34 0 -4 -6 -2 -14 5 -8 7 -12
+16 -9 20 2 4 -7 19 -21 33 -15 14 -26 31 -26 37 0 6 -3 8 -7 5 -3 -4 -13 2
+-20 13 -8 11 -19 18 -24 15 -5 -4 -9 2 -9 12 0 11 -20 39 -45 63 -24 24 -42
+47 -39 52 3 4 -4 8 -15 8 -11 0 -22 9 -26 20 -3 11 -13 20 -21 20 -8 0 -14 7
+-14 15 0 8 -7 15 -16 15 -8 0 -12 5 -9 10 3 6 -1 10 -9 10 -9 0 -16 5 -16 11
+0 5 -3 8 -7 6 -5 -3 -14 1 -21 9 -7 8 -9 14 -5 14 4 1 -4 8 -19 16 -16 8 -28
+19 -28 24 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -5 10 -10 10 -6 0 -21 11
+-34 25 -13 14 -26 25 -30 25 -7 0 -67 41 -76 51 -3 3 -19 13 -37 22 -17 9 -37
+22 -45 29 -18 17 -59 42 -143 85 -38 19 -73 40 -76 45 -3 5 -9 9 -12 9 -4 0
+-26 8 -49 18 -374 158 -665 229 -1072 261 -150 12 -504 11 -656 -1z m475
+-1214 c103 -10 140 -15 240 -31 90 -15 283 -67 314 -85 17 -9 74 -31 79 -30
+10 4 273 -148 292 -170 3 -3 23 -18 44 -35 22 -16 49 -38 60 -49 12 -11 35
+-31 51 -43 17 -13 23 -21 15 -17 -8 4 -1 -6 16 -22 27 -24 98 -107 157 -184
+10 -13 27 -40 38 -59 11 -19 28 -48 39 -65 19 -30 73 -126 75 -135 1 -3 10
+-23 20 -45 10 -22 18 -43 17 -47 -1 -5 2 -8 6 -8 5 0 9 -6 10 -12 2 -29 29
+-88 37 -81 4 5 5 3 1 -4 -4 -7 7 -50 23 -97 16 -46 27 -87 24 -90 -3 -3 0 -12
+7 -21 7 -9 10 -18 7 -22 -4 -3 -2 -12 4 -20 9 -10 8 -13 -2 -13 -9 -1 -8 -5 5
+-15 11 -8 15 -15 8 -15 -8 0 -9 -7 -1 -27 6 -16 12 -37 14 -48 8 -49 27 -203
+29 -230 0 -16 5 -33 11 -37 7 -5 6 -8 0 -8 -6 0 -11 -9 -11 -20 0 -11 4 -20 9
+-20 5 0 4 -6 -2 -14 -9 -11 -9 -15 1 -20 10 -5 10 -7 1 -12 -19 -8 -16 -24 5
+-24 10 0 13 -3 6 -8 -16 -10 -18 -222 -3 -222 8 0 9 -4 0 -13 -8 -10 -12 -215
+-13 -707 l-3 -694 -34 -20 c-34 -20 -56 -20 -1717 -24 -1216 -3 -1683 -1
+-1688 7 -4 6 -22 11 -40 11 -69 0 -65 -59 -66 905 -1 479 -1 872 0 875 1 3 3
+32 5 65 4 65 10 117 26 210 6 33 12 71 13 85 2 14 6 32 10 41 4 9 8 27 10 41
+1 13 5 28 8 33 3 6 9 28 13 50 8 42 47 159 71 212 8 17 14 34 14 39 0 33 188
+356 247 424 36 42 197 200 239 235 110 93 398 240 507 259 7 1 28 7 47 14 58
+19 273 52 382 58 57 4 104 7 105 8 4 3 156 -3 218 -9z"/>
+</g>
+</svg>
-----------------------------------------------------------------------
Summary of changes:
docs/padlock/padlock-insecure.svg | 80 +++++++++++++++++++++++++++++++
docs/padlock/padlock-warning.svg | 93 +++++++++++++++++++++++++++++++++++++
docs/padlock/padlock.svg | 69 +++++++++++++++++++++++++++
3 files changed, 242 insertions(+)
create mode 100644 docs/padlock/padlock-insecure.svg
create mode 100644 docs/padlock/padlock-warning.svg
create mode 100644 docs/padlock/padlock.svg
diff --git a/docs/padlock/padlock-insecure.svg b/docs/padlock/padlock-insecure.svg
new file mode 100644
index 0000000..82f3b24
--- /dev/null
+++ b/docs/padlock/padlock-insecure.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="1190.000000pt"
+ height="1280.000000pt"
+ viewBox="0 0 1190.000000 1280.000000"
+ preserveAspectRatio="xMidYMid meet"
+ id="svg8"
+ sodipodi:docname="padlock-insecure.svg"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+ <defs
+ id="defs12" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1416"
+ id="namedview10"
+ showgrid="false"
+ inkscape:zoom="0.39111844"
+ inkscape:cx="-663.2803"
+ inkscape:cy="1243.2619"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg8" />
+ <metadata
+ id="metadata2">
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+<rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+</rdf:RDF>
+</metadata>
+ <g
+ transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
+ fill="#000000"
+ stroke="none"
+ id="g6">
+ <path
+ d="M5610 11999 c-1096 -88 -1924 -626 -2375 -1544 -80 -162 -155 -347 -155 -380 0 -8 -4 -15 -8 -15 -4 0 -8 -8 -9 -17 -1 -19 -6 -38 -16 -63 -17 -47 -78 -287 -91 -360 -3 -19 -8 -46 -11 -59 -2 -14 -7 -47 -10 -74 -3 -28 -8 -53 -10 -56 -8 -13 -24 -189 -28 -313 -1 -27 -5 -48 -10 -48 -4 0 -3 -9 3 -20 8 -14 8 -20 0 -20 -7 0 -8 -6 -1 -19 6 -10 8 -21 5 -24 -3 -3 -5 -392 -4 -865 l1 -860 -26 -20 c-14 -11 -69 -30 -123 -43 -159 -36 -266 -74 -364 -128 -109 -60 -149 -91 -240 -183 -206 -208 -334 -560 -353 -968 -5 -99 -4 -3022 1 -3125 8 -175 28 -319 46 -343 7 -8 7 -12 -1 -12 -7 0 -9 -5 -4 -13 4 -6 8 -16 9 -22 1 -5 11 -34 23 -62 11 -29 17 -53 13 -53 -4 0 -2 -4 3 -8 10 -7 37 -61 37 -72 0 -3 6 -12 14 -21 8 -9 12 -18 9 -21 -3 -3 6 -17 20 -32 13 -14 25 -29 25 -31 0 -14 84 -117 122 -150 24 -21 34 -32 23 -24 -18 13 -19 13 -6 -3 7 -10 17 -18 22 -18 5 0 17 -8 27 -17 39 -37 67 -57 121 -86 175 -94 267 -121 521 -153 111 -13 461 -15 3121 -14 3106 0 3123 0 3314 39 221 45 397 134 531 270 161 162 238 342 269 626 12 107 15 407 15 1696 0 862 -2 1573 -4 1580 -3 8 -7 63 -10 122 -4 60 -8 112 -10 116 -3 4 -7 27 -10 51 -17 143 -76 342 -137 463 -30 57 -107 176 -138 211 -62 69 -159 160 -174 164 -13 3 -37 30 -38 44 0 7 -4 4 -8 -7 -8 -19 -8 -19 -15 3 -5 14 -13 21 -21 18 -8 -3 -19 2 -25 10 -7 8 -19 14 -26 14 -8 0 -14 5 -14 10 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -9 10 -20 10 -11 0 -20 5 -20 11 0 5 -4 7 -10 4 -5 -3 -10 -1 -10 5 0 6 -4 8 -10 5 -5 -3 -10 -2 -10 4 0 5 -8 8 -17 6 -10 -1 -30 4 -45 11 -15 8 -31 13 -35 13 -4 -1 -16 1 -25 4 -46 18 -54 20 -69 23 -9 2 -27 8 -40 13 -13 5 -27 8 -30 7 -4 0 -17 8 -30 19 -14 13 -20 14 -15 5 4 -8 -4 -2 -18 13 l-26 28 0 847 c-1 466 -3 883 -5 927 -7 117 -14 206 -19 240 -3 24 -26 169 -40 255 -21 125 -30 170 -36 170 -4 0 -6 10 -5 23 1 12 -1 27 -5 32 -5 6 -11 24 -13 40 -9 46 -14 68 -25 96 -6 15 -8 29 -6 32 3 3 -2 22 -10 42 -9 21 -16 47 -16 59 0 16 -2 18 -9 7 -7 -10 -11 -1 -16 32 -4 26 -12 47 -17 47 -6 0 -8 9 -5 20 3 11 1 20 -4 20 -5 0 -9 7 -9 15 0 8 -4 15 -10 15 -5 0 -6 7 -3 17 5 11 3 14 -6 8 -10 -6 -11 -2 -6 15 5 17 4 21 -5 15 -8 -5 -11 -4 -6 3 7 11 -28 93 -96 227 -22 44 -55 107 -71 140 -17 33 -34 62 -38 65 -3 3 -16 25 -29 49 -12 24 -26 49 -31 55 -30 36 -84 113 -105 149 -13 23 -24 38 -24 34 0 -4 -6 -2 -14 5 -8 7 -12 16 -9 20 2 4 -7 19 -21 33 -15 14 -26 31 -26 37 0 6 -3 8 -7 5 -3 -4 -13 2 -20 13 -8 11 -19 18 -24 15 -5 -4 -9 2 -9 12 0 11 -20 39 -45 63 -24 24 -42 47 -39 52 3 4 -4 8 -15 8 -11 0 -22 9 -26 20 -3 11 -13 20 -21 20 -8 0 -14 7 -14 15 0 8 -7 15 -16 15 -8 0 -12 5 -9 10 3 6 -1 10 -9 10 -9 0 -16 5 -16 11 0 5 -3 8 -7 6 -5 -3 -14 1 -21 9 -7 8 -9 14 -5 14 4 1 -4 8 -19 16 -16 8 -28 19 -28 24 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -5 10 -10 10 -6 0 -21 11 -34 25 -13 14 -26 25 -30 25 -7 0 -67 41 -76 51 -3 3 -19 13 -37 22 -17 9 -37 22 -45 29 -18 17 -59 42 -143 85 -38 19 -73 40 -76 45 -3 5 -9 9 -12 9 -4 0 -26 8 -49 18 -374 158 -665 229 -1072 261 -150 12 -504 11 -656 -1z m475 -1214 c103 -10 140 -15 240 -31 90 -15 283 -67 314 -85 17 -9 74 -31 79 -30 10 4 273 -148 292 -170 3 -3 23 -18 44 -35 22 -16 49 -38 60 -49 12 -11 35 -31 51 -43 17 -13 23 -21 15 -17 -8 4 -1 -6 16 -22 27 -24 98 -107 157 -184 10 -13 27 -40 38 -59 11 -19 28 -48 39 -65 19 -30 73 -126 75 -135 1 -3 10 -23 20 -45 10 -22 18 -43 17 -47 -1 -5 2 -8 6 -8 5 0 9 -6 10 -12 2 -29 29 -88 37 -81 4 5 5 3 1 -4 -4 -7 7 -50 23 -97 16 -46 27 -87 24 -90 -3 -3 0 -12 7 -21 7 -9 10 -18 7 -22 -4 -3 -2 -12 4 -20 9 -10 8 -13 -2 -13 -9 -1 -8 -5 5 -15 11 -8 15 -15 8 -15 -8 0 -9 -7 -1 -27 6 -16 12 -37 14 -48 8 -49 27 -203 29 -230 0 -16 5 -33 11 -37 7 -5 6 -8 0 -8 -6 0 -11 -9 -11 -20 0 -11 4 -20 9 -20 5 0 4 -6 -2 -14 -9 -11 -9 -15 1 -20 10 -5 10 -7 1 -12 -19 -8 -16 -24 5 -24 10 0 13 -3 6 -8 -16 -10 -18 -222 -3 -222 8 0 9 -4 0 -13 -8 -10 -12 -215 -13 -707 l-3 -694 -34 -20 c-34 -20 -56 -20 -1717 -24 -1216 -3 -1683 -1 -1688 7 -4 6 -22 11 -40 11 -69 0 -65 -59 -66 905 -1 479 -1 872 0 875 1 3 3 32 5 65 4 65 10 117 26 210 6 33 12 71 13 85 2 14 6 32 10 41 4 9 8 27 10 41 1 13 5 28 8 33 3 6 9 28 13 50 8 42 47 159 71 212 8 17 14 34 14 39 0 33 188 356 247 424 36 42 197 200 239 235 110 93 398 240 507 259 7 1 28 7 47 14 58 19 273 52 382 58 57 4 104 7 105 8 4 3 156 -3 218 -9z"
+ id="path4" />
+ </g>
+ <rect
+ id="rect14"
+ width="1321.9366"
+ height="329.28085"
+ x="-502.36847"
+ y="728.58783"
+ style="stroke-width:1.05677092;fill:#ffffff"
+ ry="46.090546"
+ transform="matrix(0.7710634,-0.63675838,0.53742864,0.84330923,0,0)" />
+ <rect
+ transform="matrix(0.7710634,-0.63675838,0.53742864,0.84330923,0,0)"
+ ry="35.784081"
+ style="fill:#ff0000;stroke-width:0.82046276"
+ y="771.86188"
+ x="-367.09418"
+ height="255.64925"
+ width="1026.3339"
+ id="rect16" />
+</svg>
diff --git a/docs/padlock/padlock-warning.svg b/docs/padlock/padlock-warning.svg
new file mode 100644
index 0000000..b22b7a1
--- /dev/null
+++ b/docs/padlock/padlock-warning.svg
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ version="1.0"
+ width="1190.000000pt"
+ height="1280.000000pt"
+ viewBox="0 0 1190.000000 1280.000000"
+ preserveAspectRatio="xMidYMid meet"
+ id="svg8"
+ sodipodi:docname="padlock-warning.svg"
+ inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
+ <defs
+ id="defs12">
+ <linearGradient
+ y1="45.47"
+ x2="0"
+ y2="-.599"
+ id="0"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.31117,0,0,1.30239,737.39,159.91)">
+ <stop
+ id="stop33"
+ stop-color="#ffc515" />
+ <stop
+ id="stop35"
+ stop-color="#ffd55b"
+ offset="1" />
+ </linearGradient>
+ </defs>
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="2560"
+ inkscape:window-height="1416"
+ id="namedview10"
+ showgrid="false"
+ inkscape:zoom="0.13828125"
+ inkscape:cx="807.79661"
+ inkscape:cy="853.33333"
+ inkscape:window-x="0"
+ inkscape:window-y="24"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg8" />
+ <metadata
+ id="metadata2">
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+<rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+</rdf:RDF>
+</metadata>
+ <g
+ transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
+ fill="#000000"
+ stroke="none"
+ id="g6">
+ <path
+ d="M5610 11999 c-1096 -88 -1924 -626 -2375 -1544 -80 -162 -155 -347 -155 -380 0 -8 -4 -15 -8 -15 -4 0 -8 -8 -9 -17 -1 -19 -6 -38 -16 -63 -17 -47 -78 -287 -91 -360 -3 -19 -8 -46 -11 -59 -2 -14 -7 -47 -10 -74 -3 -28 -8 -53 -10 -56 -8 -13 -24 -189 -28 -313 -1 -27 -5 -48 -10 -48 -4 0 -3 -9 3 -20 8 -14 8 -20 0 -20 -7 0 -8 -6 -1 -19 6 -10 8 -21 5 -24 -3 -3 -5 -392 -4 -865 l1 -860 -26 -20 c-14 -11 -69 -30 -123 -43 -159 -36 -266 -74 -364 -128 -109 -60 -149 -91 -240 -183 -206 -208 -334 -560 -353 -968 -5 -99 -4 -3022 1 -3125 8 -175 28 -319 46 -343 7 -8 7 -12 -1 -12 -7 0 -9 -5 -4 -13 4 -6 8 -16 9 -22 1 -5 11 -34 23 -62 11 -29 17 -53 13 -53 -4 0 -2 -4 3 -8 10 -7 37 -61 37 -72 0 -3 6 -12 14 -21 8 -9 12 -18 9 -21 -3 -3 6 -17 20 -32 13 -14 25 -29 25 -31 0 -14 84 -117 122 -150 24 -21 34 -32 23 -24 -18 13 -19 13 -6 -3 7 -10 17 -18 22 -18 5 0 17 -8 27 -17 39 -37 67 -57 121 -86 175 -94 267 -121 521 -153 111 -13 461 -15 3121 -14 3106 0 3123 0 3314 39 221 45 397 134 531 270 161 162 238 342 269 626 12 107 15 407 15 1696 0 862 -2 1573 -4 1580 -3 8 -7 63 -10 122 -4 60 -8 112 -10 116 -3 4 -7 27 -10 51 -17 143 -76 342 -137 463 -30 57 -107 176 -138 211 -62 69 -159 160 -174 164 -13 3 -37 30 -38 44 0 7 -4 4 -8 -7 -8 -19 -8 -19 -15 3 -5 14 -13 21 -21 18 -8 -3 -19 2 -25 10 -7 8 -19 14 -26 14 -8 0 -14 5 -14 10 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -9 10 -20 10 -11 0 -20 5 -20 11 0 5 -4 7 -10 4 -5 -3 -10 -1 -10 5 0 6 -4 8 -10 5 -5 -3 -10 -2 -10 4 0 5 -8 8 -17 6 -10 -1 -30 4 -45 11 -15 8 -31 13 -35 13 -4 -1 -16 1 -25 4 -46 18 -54 20 -69 23 -9 2 -27 8 -40 13 -13 5 -27 8 -30 7 -4 0 -17 8 -30 19 -14 13 -20 14 -15 5 4 -8 -4 -2 -18 13 l-26 28 0 847 c-1 466 -3 883 -5 927 -7 117 -14 206 -19 240 -3 24 -26 169 -40 255 -21 125 -30 170 -36 170 -4 0 -6 10 -5 23 1 12 -1 27 -5 32 -5 6 -11 24 -13 40 -9 46 -14 68 -25 96 -6 15 -8 29 -6 32 3 3 -2 22 -10 42 -9 21 -16 47 -16 59 0 16 -2 18 -9 7 -7 -10 -11 -1 -16 32 -4 26 -12 47 -17 47 -6 0 -8 9 -5 20 3 11 1 20 -4 20 -5 0 -9 7 -9 15 0 8 -4 15 -10 15 -5 0 -6 7 -3 17 5 11 3 14 -6 8 -10 -6 -11 -2 -6 15 5 17 4 21 -5 15 -8 -5 -11 -4 -6 3 7 11 -28 93 -96 227 -22 44 -55 107 -71 140 -17 33 -34 62 -38 65 -3 3 -16 25 -29 49 -12 24 -26 49 -31 55 -30 36 -84 113 -105 149 -13 23 -24 38 -24 34 0 -4 -6 -2 -14 5 -8 7 -12 16 -9 20 2 4 -7 19 -21 33 -15 14 -26 31 -26 37 0 6 -3 8 -7 5 -3 -4 -13 2 -20 13 -8 11 -19 18 -24 15 -5 -4 -9 2 -9 12 0 11 -20 39 -45 63 -24 24 -42 47 -39 52 3 4 -4 8 -15 8 -11 0 -22 9 -26 20 -3 11 -13 20 -21 20 -8 0 -14 7 -14 15 0 8 -7 15 -16 15 -8 0 -12 5 -9 10 3 6 -1 10 -9 10 -9 0 -16 5 -16 11 0 5 -3 8 -7 6 -5 -3 -14 1 -21 9 -7 8 -9 14 -5 14 4 1 -4 8 -19 16 -16 8 -28 19 -28 24 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -5 10 -10 10 -6 0 -21 11 -34 25 -13 14 -26 25 -30 25 -7 0 -67 41 -76 51 -3 3 -19 13 -37 22 -17 9 -37 22 -45 29 -18 17 -59 42 -143 85 -38 19 -73 40 -76 45 -3 5 -9 9 -12 9 -4 0 -26 8 -49 18 -374 158 -665 229 -1072 261 -150 12 -504 11 -656 -1z m475 -1214 c103 -10 140 -15 240 -31 90 -15 283 -67 314 -85 17 -9 74 -31 79 -30 10 4 273 -148 292 -170 3 -3 23 -18 44 -35 22 -16 49 -38 60 -49 12 -11 35 -31 51 -43 17 -13 23 -21 15 -17 -8 4 -1 -6 16 -22 27 -24 98 -107 157 -184 10 -13 27 -40 38 -59 11 -19 28 -48 39 -65 19 -30 73 -126 75 -135 1 -3 10 -23 20 -45 10 -22 18 -43 17 -47 -1 -5 2 -8 6 -8 5 0 9 -6 10 -12 2 -29 29 -88 37 -81 4 5 5 3 1 -4 -4 -7 7 -50 23 -97 16 -46 27 -87 24 -90 -3 -3 0 -12 7 -21 7 -9 10 -18 7 -22 -4 -3 -2 -12 4 -20 9 -10 8 -13 -2 -13 -9 -1 -8 -5 5 -15 11 -8 15 -15 8 -15 -8 0 -9 -7 -1 -27 6 -16 12 -37 14 -48 8 -49 27 -203 29 -230 0 -16 5 -33 11 -37 7 -5 6 -8 0 -8 -6 0 -11 -9 -11 -20 0 -11 4 -20 9 -20 5 0 4 -6 -2 -14 -9 -11 -9 -15 1 -20 10 -5 10 -7 1 -12 -19 -8 -16 -24 5 -24 10 0 13 -3 6 -8 -16 -10 -18 -222 -3 -222 8 0 9 -4 0 -13 -8 -10 -12 -215 -13 -707 l-3 -694 -34 -20 c-34 -20 -56 -20 -1717 -24 -1216 -3 -1683 -1 -1688 7 -4 6 -22 11 -40 11 -69 0 -65 -59 -66 905 -1 479 -1 872 0 875 1 3 3 32 5 65 4 65 10 117 26 210 6 33 12 71 13 85 2 14 6 32 10 41 4 9 8 27 10 41 1 13 5 28 8 33 3 6 9 28 13 50 8 42 47 159 71 212 8 17 14 34 14 39 0 33 188 356 247 424 36 42 197 200 239 235 110 93 398 240 507 259 7 1 28 7 47 14 58 19 273 52 382 58 57 4 104 7 105 8 4 3 156 -3 218 -9z"
+ id="path4" />
+ </g>
+ <g
+ id="g44"
+ transform="matrix(14.340787,0,0,14.340787,-10339.937,-1906.3913)">
+ <path
+ id="path40"
+ d="m 797.94,212.01 -25.607,-48 c -0.736,-1.333 -2.068,-2.074 -3.551,-2.074 -1.483,0 -2.822,0.889 -3.569,2.222 l -25.417,48 c -0.598,1.185 -0.605,2.815 0.132,4 0.737,1.185 1.921,1.778 3.404,1.778 h 51.02 c 1.483,0 2.821,-0.741 3.42,-1.926 0.747,-1.185 0.753,-2.667 0.165,-4"
+ inkscape:connector-curvature="0"
+ style="fill:url(#0)" />
+ <path
+ id="path42"
+ transform="matrix(1.05196,0,0,1.05196,796.53,161.87)"
+ d="m -26.309,18.07 c -1.18,0 -2.135,0.968 -2.135,2.129 v 12.82 c 0,1.176 0.948,2.129 2.135,2.129 1.183,0 2.135,-0.968 2.135,-2.129 v -12.82 c 0,-1.176 -0.946,-2.129 -2.135,-2.129 z m 0,21.348 c -1.18,0 -2.135,0.954 -2.135,2.135 0,1.18 0.954,2.135 2.135,2.135 1.181,0 2.135,-0.954 2.135,-2.135 0,-1.18 -0.952,-2.135 -2.135,-2.135 z"
+ inkscape:connector-curvature="0"
+ style="fill:#000000;fill-opacity:0.75;stroke:#40330d" />
+ </g>
+</svg>
diff --git a/docs/padlock/padlock.svg b/docs/padlock/padlock.svg
new file mode 100644
index 0000000..b7277c4
--- /dev/null
+++ b/docs/padlock/padlock.svg
@@ -0,0 +1,69 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
+ "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
+ width="1190.000000pt" height="1280.000000pt" viewBox="0 0 1190.000000 1280.000000"
+ preserveAspectRatio="xMidYMid meet">
+<metadata>
+Created by potrace 1.15, written by Peter Selinger 2001-2017
+</metadata>
+<g transform="translate(0.000000,1280.000000) scale(0.100000,-0.100000)"
+fill="#000000" stroke="none">
+<path d="M5610 11999 c-1096 -88 -1924 -626 -2375 -1544 -80 -162 -155 -347
+-155 -380 0 -8 -4 -15 -8 -15 -4 0 -8 -8 -9 -17 -1 -19 -6 -38 -16 -63 -17
+-47 -78 -287 -91 -360 -3 -19 -8 -46 -11 -59 -2 -14 -7 -47 -10 -74 -3 -28 -8
+-53 -10 -56 -8 -13 -24 -189 -28 -313 -1 -27 -5 -48 -10 -48 -4 0 -3 -9 3 -20
+8 -14 8 -20 0 -20 -7 0 -8 -6 -1 -19 6 -10 8 -21 5 -24 -3 -3 -5 -392 -4 -865
+l1 -860 -26 -20 c-14 -11 -69 -30 -123 -43 -159 -36 -266 -74 -364 -128 -109
+-60 -149 -91 -240 -183 -206 -208 -334 -560 -353 -968 -5 -99 -4 -3022 1
+-3125 8 -175 28 -319 46 -343 7 -8 7 -12 -1 -12 -7 0 -9 -5 -4 -13 4 -6 8 -16
+9 -22 1 -5 11 -34 23 -62 11 -29 17 -53 13 -53 -4 0 -2 -4 3 -8 10 -7 37 -61
+37 -72 0 -3 6 -12 14 -21 8 -9 12 -18 9 -21 -3 -3 6 -17 20 -32 13 -14 25 -29
+25 -31 0 -14 84 -117 122 -150 24 -21 34 -32 23 -24 -18 13 -19 13 -6 -3 7
+-10 17 -18 22 -18 5 0 17 -8 27 -17 39 -37 67 -57 121 -86 175 -94 267 -121
+521 -153 111 -13 461 -15 3121 -14 3106 0 3123 0 3314 39 221 45 397 134 531
+270 161 162 238 342 269 626 12 107 15 407 15 1696 0 862 -2 1573 -4 1580 -3
+8 -7 63 -10 122 -4 60 -8 112 -10 116 -3 4 -7 27 -10 51 -17 143 -76 342 -137
+463 -30 57 -107 176 -138 211 -62 69 -159 160 -174 164 -13 3 -37 30 -38 44 0
+7 -4 4 -8 -7 -8 -19 -8 -19 -15 3 -5 14 -13 21 -21 18 -8 -3 -19 2 -25 10 -7
+8 -19 14 -26 14 -8 0 -14 5 -14 10 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -9
+10 -20 10 -11 0 -20 5 -20 11 0 5 -4 7 -10 4 -5 -3 -10 -1 -10 5 0 6 -4 8 -10
+5 -5 -3 -10 -2 -10 4 0 5 -8 8 -17 6 -10 -1 -30 4 -45 11 -15 8 -31 13 -35 13
+-4 -1 -16 1 -25 4 -46 18 -54 20 -69 23 -9 2 -27 8 -40 13 -13 5 -27 8 -30 7
+-4 0 -17 8 -30 19 -14 13 -20 14 -15 5 4 -8 -4 -2 -18 13 l-26 28 0 847 c-1
+466 -3 883 -5 927 -7 117 -14 206 -19 240 -3 24 -26 169 -40 255 -21 125 -30
+170 -36 170 -4 0 -6 10 -5 23 1 12 -1 27 -5 32 -5 6 -11 24 -13 40 -9 46 -14
+68 -25 96 -6 15 -8 29 -6 32 3 3 -2 22 -10 42 -9 21 -16 47 -16 59 0 16 -2 18
+-9 7 -7 -10 -11 -1 -16 32 -4 26 -12 47 -17 47 -6 0 -8 9 -5 20 3 11 1 20 -4
+20 -5 0 -9 7 -9 15 0 8 -4 15 -10 15 -5 0 -6 7 -3 17 5 11 3 14 -6 8 -10 -6
+-11 -2 -6 15 5 17 4 21 -5 15 -8 -5 -11 -4 -6 3 7 11 -28 93 -96 227 -22 44
+-55 107 -71 140 -17 33 -34 62 -38 65 -3 3 -16 25 -29 49 -12 24 -26 49 -31
+55 -30 36 -84 113 -105 149 -13 23 -24 38 -24 34 0 -4 -6 -2 -14 5 -8 7 -12
+16 -9 20 2 4 -7 19 -21 33 -15 14 -26 31 -26 37 0 6 -3 8 -7 5 -3 -4 -13 2
+-20 13 -8 11 -19 18 -24 15 -5 -4 -9 2 -9 12 0 11 -20 39 -45 63 -24 24 -42
+47 -39 52 3 4 -4 8 -15 8 -11 0 -22 9 -26 20 -3 11 -13 20 -21 20 -8 0 -14 7
+-14 15 0 8 -7 15 -16 15 -8 0 -12 5 -9 10 3 6 -1 10 -9 10 -9 0 -16 5 -16 11
+0 5 -3 8 -7 6 -5 -3 -14 1 -21 9 -7 8 -9 14 -5 14 4 1 -4 8 -19 16 -16 8 -28
+19 -28 24 0 6 -7 10 -15 10 -8 0 -15 5 -15 10 0 6 -5 10 -10 10 -6 0 -21 11
+-34 25 -13 14 -26 25 -30 25 -7 0 -67 41 -76 51 -3 3 -19 13 -37 22 -17 9 -37
+22 -45 29 -18 17 -59 42 -143 85 -38 19 -73 40 -76 45 -3 5 -9 9 -12 9 -4 0
+-26 8 -49 18 -374 158 -665 229 -1072 261 -150 12 -504 11 -656 -1z m475
+-1214 c103 -10 140 -15 240 -31 90 -15 283 -67 314 -85 17 -9 74 -31 79 -30
+10 4 273 -148 292 -170 3 -3 23 -18 44 -35 22 -16 49 -38 60 -49 12 -11 35
+-31 51 -43 17 -13 23 -21 15 -17 -8 4 -1 -6 16 -22 27 -24 98 -107 157 -184
+10 -13 27 -40 38 -59 11 -19 28 -48 39 -65 19 -30 73 -126 75 -135 1 -3 10
+-23 20 -45 10 -22 18 -43 17 -47 -1 -5 2 -8 6 -8 5 0 9 -6 10 -12 2 -29 29
+-88 37 -81 4 5 5 3 1 -4 -4 -7 7 -50 23 -97 16 -46 27 -87 24 -90 -3 -3 0 -12
+7 -21 7 -9 10 -18 7 -22 -4 -3 -2 -12 4 -20 9 -10 8 -13 -2 -13 -9 -1 -8 -5 5
+-15 11 -8 15 -15 8 -15 -8 0 -9 -7 -1 -27 6 -16 12 -37 14 -48 8 -49 27 -203
+29 -230 0 -16 5 -33 11 -37 7 -5 6 -8 0 -8 -6 0 -11 -9 -11 -20 0 -11 4 -20 9
+-20 5 0 4 -6 -2 -14 -9 -11 -9 -15 1 -20 10 -5 10 -7 1 -12 -19 -8 -16 -24 5
+-24 10 0 13 -3 6 -8 -16 -10 -18 -222 -3 -222 8 0 9 -4 0 -13 -8 -10 -12 -215
+-13 -707 l-3 -694 -34 -20 c-34 -20 -56 -20 -1717 -24 -1216 -3 -1683 -1
+-1688 7 -4 6 -22 11 -40 11 -69 0 -65 -59 -66 905 -1 479 -1 872 0 875 1 3 3
+32 5 65 4 65 10 117 26 210 6 33 12 71 13 85 2 14 6 32 10 41 4 9 8 27 10 41
+1 13 5 28 8 33 3 6 9 28 13 50 8 42 47 159 71 212 8 17 14 34 14 39 0 33 188
+356 247 424 36 42 197 200 239 235 110 93 398 240 507 259 7 1 28 7 47 14 58
+19 273 52 382 58 57 4 104 7 105 8 4 3 156 -3 218 -9z"/>
+</g>
+</svg>
--
NetSurf Browser
3 years, 1 month
netsurf: branch master updated. release/3.9-346-g9faca2b
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/9faca2b9407097359d682...
...commit http://git.netsurf-browser.org/netsurf.git/commit/9faca2b9407097359d682b4...
...tree http://git.netsurf-browser.org/netsurf.git/tree/9faca2b9407097359d682b459...
The branch, master has been updated
via 9faca2b9407097359d682b4593fed7a418b86400 (commit)
via 7f628f7ee8f8707e72ad8cfd54edc024b5e66b95 (commit)
from 6fc2666d07f28cd845b5697853b9b0e61f8848c5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=9faca2b9407097359d6...
commit 9faca2b9407097359d682b4593fed7a418b86400
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Add missing include
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/content.c b/content/content.c
index c0119ea..1572628 100644
--- a/content/content.c
+++ b/content/content.c
@@ -38,6 +38,7 @@
#include "content/content_protected.h"
#include "content/content_debug.h"
#include "content/hlcache.h"
+#include "content/urldb.h"
#define URL_FMT_SPC "%.140s"
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=7f628f7ee8f8707e72a...
commit 7f628f7ee8f8707e72ad8cfd54edc024b5e66b95
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
browser_window: Add an event for page info state change
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 7227023..1fa3161 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -818,6 +818,11 @@ static nserror browser_window_content_ready(struct browser_window *bw)
browser_window_create_iframes(bw, html_get_iframe(bw->current_content));
}
+ /* Indicate page status may have changed */
+ if (res == NSERROR_OK) {
+ res = guit->window->event(bw->window, GW_EVENT_PAGE_INFO_CHANGE);
+ }
+
return res;
}
diff --git a/include/netsurf/window.h b/include/netsurf/window.h
index 38ce295..8f14a8c 100644
--- a/include/netsurf/window.h
+++ b/include/netsurf/window.h
@@ -119,6 +119,12 @@ enum gui_window_event {
* selection started
*/
GW_EVENT_START_SELECTION,
+
+ /**
+ * Page status has changed and so the padlock should be
+ * updated.
+ */
+ GW_EVENT_PAGE_INFO_CHANGE,
};
/**
-----------------------------------------------------------------------
Summary of changes:
content/content.c | 1 +
desktop/browser_window.c | 5 +++++
include/netsurf/window.h | 6 ++++++
3 files changed, 12 insertions(+)
diff --git a/content/content.c b/content/content.c
index c0119ea..1572628 100644
--- a/content/content.c
+++ b/content/content.c
@@ -38,6 +38,7 @@
#include "content/content_protected.h"
#include "content/content_debug.h"
#include "content/hlcache.h"
+#include "content/urldb.h"
#define URL_FMT_SPC "%.140s"
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 7227023..1fa3161 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -818,6 +818,11 @@ static nserror browser_window_content_ready(struct browser_window *bw)
browser_window_create_iframes(bw, html_get_iframe(bw->current_content));
}
+ /* Indicate page status may have changed */
+ if (res == NSERROR_OK) {
+ res = guit->window->event(bw->window, GW_EVENT_PAGE_INFO_CHANGE);
+ }
+
return res;
}
diff --git a/include/netsurf/window.h b/include/netsurf/window.h
index 38ce295..8f14a8c 100644
--- a/include/netsurf/window.h
+++ b/include/netsurf/window.h
@@ -119,6 +119,12 @@ enum gui_window_event {
* selection started
*/
GW_EVENT_START_SELECTION,
+
+ /**
+ * Page status has changed and so the padlock should be
+ * updated.
+ */
+ GW_EVENT_PAGE_INFO_CHANGE,
};
/**
--
NetSurf Browser
3 years, 1 month
netsurf-wiki: branch master updated. 772bb03198f96ae821dc134eea72b05c2f248bfa
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/772bb03198f96ae8...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/772bb03198f96ae821...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/772bb03198f96ae821dc...
The branch, master has been updated
via 772bb03198f96ae821dc134eea72b05c2f248bfa (commit)
from 04df956c80fbed4d677b3ecad735ca4390b0ceb6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf-wiki.git/commit/?id=772bb03198f96a...
commit 772bb03198f96ae821dc134eea72b05c2f248bfa
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Plan
diff --git a/developer-weekend/dec-2019.mdwn b/developer-weekend/dec-2019.mdwn
index 4b09b14..0d9f7db 100644
--- a/developer-weekend/dec-2019.mdwn
+++ b/developer-weekend/dec-2019.mdwn
@@ -129,6 +129,36 @@ Vince
* Finished extended internet test badgering including full reorganisation of
the monkey-tests tree.
+Plan for page info
+==================
+
+1. We add to browser_window the concept of the currently displayed page info.
+2. That info is an enumeration of:
+ * UNKNOWN (nothing loaded?)
+ * INTERNAL (e.g. `about:` etc)
+ * INSECURE (e.g. `http://`)
+ * SECURE+PROBLEMS (e.g. `https://` but `http://` images, or badssl)
+ * SECURE (all is well)
+3. Whenever the currently displayed page changes, `browser_window` will send a
+ notification to the GUI, which will then be able to retrieve the current
+ state information.
+4. More detailed page information will be available through further APIs
+
+Then separately
+
+When the page information button is clicked, the GUI pops up a corewindow for
+it. This window will show information about the page's security, etc. Most of
+the information for this can be directly retrieved from the browser_window and
+as such, the corewindow will be initialised with the browser_window pointer.
+The GUI will be responsible for destroying the corewindow when the browser
+window is going away, and for notifying the corewindow when the browser window
+event indicating info-change occurs.
+
+This means that the corewindow is borrowing from the browser window, so we need
+to ensure that anything the browser window returns by pointer will remain safe
+for use even when navigation events occur.
+
+
Statement of work
=================
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/dec-2019.mdwn | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/developer-weekend/dec-2019.mdwn b/developer-weekend/dec-2019.mdwn
index 4b09b14..0d9f7db 100644
--- a/developer-weekend/dec-2019.mdwn
+++ b/developer-weekend/dec-2019.mdwn
@@ -129,6 +129,36 @@ Vince
* Finished extended internet test badgering including full reorganisation of
the monkey-tests tree.
+Plan for page info
+==================
+
+1. We add to browser_window the concept of the currently displayed page info.
+2. That info is an enumeration of:
+ * UNKNOWN (nothing loaded?)
+ * INTERNAL (e.g. `about:` etc)
+ * INSECURE (e.g. `http://`)
+ * SECURE+PROBLEMS (e.g. `https://` but `http://` images, or badssl)
+ * SECURE (all is well)
+3. Whenever the currently displayed page changes, `browser_window` will send a
+ notification to the GUI, which will then be able to retrieve the current
+ state information.
+4. More detailed page information will be available through further APIs
+
+Then separately
+
+When the page information button is clicked, the GUI pops up a corewindow for
+it. This window will show information about the page's security, etc. Most of
+the information for this can be directly retrieved from the browser_window and
+as such, the corewindow will be initialised with the browser_window pointer.
+The GUI will be responsible for destroying the corewindow when the browser
+window is going away, and for notifying the corewindow when the browser window
+event indicating info-change occurs.
+
+This means that the corewindow is borrowing from the browser window, so we need
+to ensure that anything the browser window returns by pointer will remain safe
+for use even when navigation events occur.
+
+
Statement of work
=================
--
NetSurf Developer Wiki Backing Store
3 years, 1 month
netsurf: branch master updated. release/3.9-344-g6fc2666
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/6fc2666d07f28cd845b56...
...commit http://git.netsurf-browser.org/netsurf.git/commit/6fc2666d07f28cd845b5697...
...tree http://git.netsurf-browser.org/netsurf.git/tree/6fc2666d07f28cd845b569785...
The branch, master has been updated
via 6fc2666d07f28cd845b5697853b9b0e61f8848c5 (commit)
from 9741df214d7b291c8de40e9b21d4411e523d0bb3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=6fc2666d07f28cd845b...
commit 6fc2666d07f28cd845b5697853b9b0e61f8848c5
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Allow contents to indicate if they believe they may not be secure.
HTML contents reference many other objects. The browser window
needs to know if any of them may not be secure, in which case it
needs to report that in its page state. If other content types
might refer to sub-contents, they will need to define the callback
too.
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/content/content.c b/content/content.c
index 82a87c5..c0119ea 100644
--- a/content/content.c
+++ b/content/content.c
@@ -28,6 +28,7 @@
#include "netsurf/inttypes.h"
#include "utils/log.h"
#include "utils/messages.h"
+#include "utils/corestrings.h"
#include "netsurf/browser_window.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
@@ -564,6 +565,50 @@ bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen)
}
/* exported interface, documented in content/content.h */
+bool content_saw_insecure_objects(struct hlcache_handle *h)
+{
+ struct content *c = hlcache_handle_get_content(h);
+ lwc_string *scheme = nsurl_get_component(content_get_url(c), NSURL_SCHEME);
+ bool match;
+
+ /* Is this an internal scheme? If so, we trust here and stop */
+ if ((lwc_string_isequal(scheme, corestring_lwc_about,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_data,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_resource,
+ &match) == lwc_error_ok &&
+ (match == true))) {
+ /* No insecurity to find */
+ return false;
+ }
+
+ /* Okay, not internal, am *I* secure? */
+ if ((lwc_string_isequal(scheme, corestring_lwc_https,
+ &match) == lwc_error_ok)
+ && (match == false)) {
+ /* I did see something insecure -- ME! */
+ return true;
+ }
+
+ /* I am supposed to be secure, but was I overridden */
+ if (urldb_get_cert_permissions(content_get_url(c))) {
+ /* I was https:// but I was overridden, that's no good */
+ return true;
+ }
+
+ /* Otherwise try and chain through the handler */
+ if (c->handler->saw_insecure_objects != NULL) {
+ return c->handler->saw_insecure_objects(c);
+ }
+
+ /* If we can't see insecure objects, we can't see them */
+ return false;
+}
+
+/* exported interface, documented in content/content.h */
bool content_redraw(hlcache_handle *h, struct content_redraw_data *data,
const struct rect *clip, const struct redraw_context *ctx)
{
diff --git a/content/content.h b/content/content.h
index f3e578b..0dbd58d 100644
--- a/content/content.h
+++ b/content/content.h
@@ -420,5 +420,17 @@ bool content_is_locked(struct hlcache_handle *h);
*/
bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen);
+/**
+ * Determine if the content referred to any insecure objects.
+ *
+ * Query the content to determine if any of its referred objects were loaded
+ * in a manner not considered secure. For a content to be recursively
+ * secure it must only load over https and must not have certificate overrides
+ * in place.
+ *
+ * \param h The handle to the content
+ * \return Whether the content referred to any insecure objects
+ */
+bool content_saw_insecure_objects(struct hlcache_handle *h);
#endif
diff --git a/content/content_protected.h b/content/content_protected.h
index ec62a21..af0ee72 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -83,6 +83,7 @@ struct content_handler {
void (*add_user)(struct content *c);
void (*remove_user)(struct content *c);
bool (*exec)(struct content *c, const char *src, size_t srclen);
+ bool (*saw_insecure_objects)(struct content *c);
/** handler dependant content sensitive internal data interface. */
void * (*get_internal)(const struct content *c, void *context);
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 25633a8..c49697b 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2667,6 +2667,34 @@ out_no_string:
return result;
}
+/* See \ref content_saw_insecure_objects */
+static bool
+html_saw_insecure_objects(struct content *c)
+{
+ html_content *htmlc = (html_content *)c;
+ struct content_html_object *obj = htmlc->object_list;
+
+ /* Check through the object list */
+ while (obj != NULL) {
+ if (obj->content != NULL) {
+ if (content_saw_insecure_objects(obj->content))
+ return true;
+ }
+ }
+
+ /* Now check the script list */
+ if (html_saw_insecure_scripts(htmlc)) {
+ return true;
+ }
+
+ /* Now check stylesheets */
+ if (html_saw_insecure_stylesheets(htmlc)) {
+ return true;
+ }
+
+ return false;
+}
+
/**
* Compute the type of a content
*
@@ -2710,6 +2738,7 @@ static const content_handler html_content_handler = {
.get_encoding = html_encoding,
.type = html_content_type,
.exec = html_exec,
+ .saw_insecure_objects = html_saw_insecure_objects,
.no_share = true,
};
diff --git a/content/handlers/html/html_css.c b/content/handlers/html/html_css.c
index 5550573..5d9987d 100644
--- a/content/handlers/html/html_css.c
+++ b/content/handlers/html/html_css.c
@@ -487,6 +487,23 @@ struct html_stylesheet *html_get_stylesheets(hlcache_handle *h, unsigned int *n)
return c->stylesheets;
}
+/* exported interface documented in html/html_internal.h */
+bool html_saw_insecure_stylesheets(html_content *html)
+{
+ struct html_stylesheet *s;
+ unsigned int i;
+
+ for (i = 0, s = html->stylesheets; i < html->stylesheet_count;
+ i++, s++) {
+ if (s->sheet != NULL) {
+ if (content_saw_insecure_objects(s->sheet)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
/* exported interface documented in html/html_internal.h */
nserror html_css_free_stylesheets(html_content *html)
diff --git a/content/handlers/html/html_internal.h b/content/handlers/html/html_internal.h
index 388c155..11891e6 100644
--- a/content/handlers/html/html_internal.h
+++ b/content/handlers/html/html_internal.h
@@ -328,6 +328,11 @@ nserror html_script_free(html_content *htmlc);
*/
nserror html_script_invalidate_ctx(html_content *htmlc);
+/**
+ * Check if any of the scripts loaded were insecure
+ */
+bool html_saw_insecure_scripts(html_content *htmlc);
+
/* in html/html_forms.c */
struct form *html_forms_get_forms(const char *docenc, dom_html_document *doc);
struct form_control *html_forms_get_control_for_node(struct form *forms,
@@ -347,6 +352,9 @@ nserror html_css_new_stylesheets(html_content *c);
nserror html_css_quirks_stylesheets(html_content *c);
nserror html_css_free_stylesheets(html_content *html);
+/** Return if any of the stylesheets were loaded insecurely */
+bool html_saw_insecure_stylesheets(html_content *html);
+
bool html_css_process_link(html_content *htmlc, dom_node *node);
bool html_css_process_style(html_content *htmlc, dom_node *node);
bool html_css_update_style(html_content *c, dom_node *style);
diff --git a/content/handlers/html/html_script.c b/content/handlers/html/html_script.c
index f7131e2..f4754fe 100644
--- a/content/handlers/html/html_script.c
+++ b/content/handlers/html/html_script.c
@@ -590,6 +590,31 @@ html_process_script(void *ctx, dom_node *node)
}
/* exported internal interface documented in html/html_internal.h */
+bool html_saw_insecure_scripts(html_content *htmlc)
+{
+ struct html_script *s;
+ unsigned int i;
+
+ for (i = 0, s = htmlc->scripts; i != htmlc->scripts_count; i++, s++) {
+ if (s->type == HTML_SCRIPT_INLINE) {
+ /* Inline scripts are no less secure than their
+ * containing HTML content
+ */
+ continue;
+ }
+ if (s->data.handle == NULL) {
+ /* We've not begun loading this? */
+ continue;
+ }
+ if (content_saw_insecure_objects(s->data.handle)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/* exported internal interface documented in html/html_internal.h */
nserror html_script_free(html_content *html)
{
unsigned int i;
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index a9c2778..7227023 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4649,7 +4649,8 @@ browser_window_page_info_state browser_window_get_page_info_state(
assert(bw != NULL);
/* Do we have any parameters? If not -- UNKNOWN */
- if (bw->current_parameters.url == NULL) {
+ if (bw->current_parameters.url == NULL ||
+ bw->current_content == NULL) {
return PAGE_STATE_UNKNOWN;
}
@@ -4688,8 +4689,10 @@ browser_window_page_info_state browser_window_get_page_info_state(
return PAGE_STATE_SECURE_OVERRIDE;
}
- /** \todo Determine if sub-elements of this fetch were insecure */
- /* If so, return PAGE_STATE_SECURE_ISSUES */
+ /* If we've seen insecure content internally then we need to say so */
+ if (content_saw_insecure_objects(bw->current_content)) {
+ return PAGE_STATE_SECURE_ISSUES;
+ }
/* All is well, return secure state */
return PAGE_STATE_SECURE;
-----------------------------------------------------------------------
Summary of changes:
content/content.c | 45 +++++++++++++++++++++++++++++++++
content/content.h | 12 +++++++++
content/content_protected.h | 1 +
content/handlers/html/html.c | 29 +++++++++++++++++++++
content/handlers/html/html_css.c | 17 +++++++++++++
content/handlers/html/html_internal.h | 8 ++++++
content/handlers/html/html_script.c | 25 ++++++++++++++++++
desktop/browser_window.c | 9 ++++---
8 files changed, 143 insertions(+), 3 deletions(-)
diff --git a/content/content.c b/content/content.c
index 82a87c5..c0119ea 100644
--- a/content/content.c
+++ b/content/content.c
@@ -28,6 +28,7 @@
#include "netsurf/inttypes.h"
#include "utils/log.h"
#include "utils/messages.h"
+#include "utils/corestrings.h"
#include "netsurf/browser_window.h"
#include "netsurf/bitmap.h"
#include "netsurf/content.h"
@@ -564,6 +565,50 @@ bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen)
}
/* exported interface, documented in content/content.h */
+bool content_saw_insecure_objects(struct hlcache_handle *h)
+{
+ struct content *c = hlcache_handle_get_content(h);
+ lwc_string *scheme = nsurl_get_component(content_get_url(c), NSURL_SCHEME);
+ bool match;
+
+ /* Is this an internal scheme? If so, we trust here and stop */
+ if ((lwc_string_isequal(scheme, corestring_lwc_about,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_data,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_resource,
+ &match) == lwc_error_ok &&
+ (match == true))) {
+ /* No insecurity to find */
+ return false;
+ }
+
+ /* Okay, not internal, am *I* secure? */
+ if ((lwc_string_isequal(scheme, corestring_lwc_https,
+ &match) == lwc_error_ok)
+ && (match == false)) {
+ /* I did see something insecure -- ME! */
+ return true;
+ }
+
+ /* I am supposed to be secure, but was I overridden */
+ if (urldb_get_cert_permissions(content_get_url(c))) {
+ /* I was https:// but I was overridden, that's no good */
+ return true;
+ }
+
+ /* Otherwise try and chain through the handler */
+ if (c->handler->saw_insecure_objects != NULL) {
+ return c->handler->saw_insecure_objects(c);
+ }
+
+ /* If we can't see insecure objects, we can't see them */
+ return false;
+}
+
+/* exported interface, documented in content/content.h */
bool content_redraw(hlcache_handle *h, struct content_redraw_data *data,
const struct rect *clip, const struct redraw_context *ctx)
{
diff --git a/content/content.h b/content/content.h
index f3e578b..0dbd58d 100644
--- a/content/content.h
+++ b/content/content.h
@@ -420,5 +420,17 @@ bool content_is_locked(struct hlcache_handle *h);
*/
bool content_exec(struct hlcache_handle *h, const char *src, size_t srclen);
+/**
+ * Determine if the content referred to any insecure objects.
+ *
+ * Query the content to determine if any of its referred objects were loaded
+ * in a manner not considered secure. For a content to be recursively
+ * secure it must only load over https and must not have certificate overrides
+ * in place.
+ *
+ * \param h The handle to the content
+ * \return Whether the content referred to any insecure objects
+ */
+bool content_saw_insecure_objects(struct hlcache_handle *h);
#endif
diff --git a/content/content_protected.h b/content/content_protected.h
index ec62a21..af0ee72 100644
--- a/content/content_protected.h
+++ b/content/content_protected.h
@@ -83,6 +83,7 @@ struct content_handler {
void (*add_user)(struct content *c);
void (*remove_user)(struct content *c);
bool (*exec)(struct content *c, const char *src, size_t srclen);
+ bool (*saw_insecure_objects)(struct content *c);
/** handler dependant content sensitive internal data interface. */
void * (*get_internal)(const struct content *c, void *context);
diff --git a/content/handlers/html/html.c b/content/handlers/html/html.c
index 25633a8..c49697b 100644
--- a/content/handlers/html/html.c
+++ b/content/handlers/html/html.c
@@ -2667,6 +2667,34 @@ out_no_string:
return result;
}
+/* See \ref content_saw_insecure_objects */
+static bool
+html_saw_insecure_objects(struct content *c)
+{
+ html_content *htmlc = (html_content *)c;
+ struct content_html_object *obj = htmlc->object_list;
+
+ /* Check through the object list */
+ while (obj != NULL) {
+ if (obj->content != NULL) {
+ if (content_saw_insecure_objects(obj->content))
+ return true;
+ }
+ }
+
+ /* Now check the script list */
+ if (html_saw_insecure_scripts(htmlc)) {
+ return true;
+ }
+
+ /* Now check stylesheets */
+ if (html_saw_insecure_stylesheets(htmlc)) {
+ return true;
+ }
+
+ return false;
+}
+
/**
* Compute the type of a content
*
@@ -2710,6 +2738,7 @@ static const content_handler html_content_handler = {
.get_encoding = html_encoding,
.type = html_content_type,
.exec = html_exec,
+ .saw_insecure_objects = html_saw_insecure_objects,
.no_share = true,
};
diff --git a/content/handlers/html/html_css.c b/content/handlers/html/html_css.c
index 5550573..5d9987d 100644
--- a/content/handlers/html/html_css.c
+++ b/content/handlers/html/html_css.c
@@ -487,6 +487,23 @@ struct html_stylesheet *html_get_stylesheets(hlcache_handle *h, unsigned int *n)
return c->stylesheets;
}
+/* exported interface documented in html/html_internal.h */
+bool html_saw_insecure_stylesheets(html_content *html)
+{
+ struct html_stylesheet *s;
+ unsigned int i;
+
+ for (i = 0, s = html->stylesheets; i < html->stylesheet_count;
+ i++, s++) {
+ if (s->sheet != NULL) {
+ if (content_saw_insecure_objects(s->sheet)) {
+ return true;
+ }
+ }
+ }
+
+ return false;
+}
/* exported interface documented in html/html_internal.h */
nserror html_css_free_stylesheets(html_content *html)
diff --git a/content/handlers/html/html_internal.h b/content/handlers/html/html_internal.h
index 388c155..11891e6 100644
--- a/content/handlers/html/html_internal.h
+++ b/content/handlers/html/html_internal.h
@@ -328,6 +328,11 @@ nserror html_script_free(html_content *htmlc);
*/
nserror html_script_invalidate_ctx(html_content *htmlc);
+/**
+ * Check if any of the scripts loaded were insecure
+ */
+bool html_saw_insecure_scripts(html_content *htmlc);
+
/* in html/html_forms.c */
struct form *html_forms_get_forms(const char *docenc, dom_html_document *doc);
struct form_control *html_forms_get_control_for_node(struct form *forms,
@@ -347,6 +352,9 @@ nserror html_css_new_stylesheets(html_content *c);
nserror html_css_quirks_stylesheets(html_content *c);
nserror html_css_free_stylesheets(html_content *html);
+/** Return if any of the stylesheets were loaded insecurely */
+bool html_saw_insecure_stylesheets(html_content *html);
+
bool html_css_process_link(html_content *htmlc, dom_node *node);
bool html_css_process_style(html_content *htmlc, dom_node *node);
bool html_css_update_style(html_content *c, dom_node *style);
diff --git a/content/handlers/html/html_script.c b/content/handlers/html/html_script.c
index f7131e2..f4754fe 100644
--- a/content/handlers/html/html_script.c
+++ b/content/handlers/html/html_script.c
@@ -590,6 +590,31 @@ html_process_script(void *ctx, dom_node *node)
}
/* exported internal interface documented in html/html_internal.h */
+bool html_saw_insecure_scripts(html_content *htmlc)
+{
+ struct html_script *s;
+ unsigned int i;
+
+ for (i = 0, s = htmlc->scripts; i != htmlc->scripts_count; i++, s++) {
+ if (s->type == HTML_SCRIPT_INLINE) {
+ /* Inline scripts are no less secure than their
+ * containing HTML content
+ */
+ continue;
+ }
+ if (s->data.handle == NULL) {
+ /* We've not begun loading this? */
+ continue;
+ }
+ if (content_saw_insecure_objects(s->data.handle)) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
+/* exported internal interface documented in html/html_internal.h */
nserror html_script_free(html_content *html)
{
unsigned int i;
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index a9c2778..7227023 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4649,7 +4649,8 @@ browser_window_page_info_state browser_window_get_page_info_state(
assert(bw != NULL);
/* Do we have any parameters? If not -- UNKNOWN */
- if (bw->current_parameters.url == NULL) {
+ if (bw->current_parameters.url == NULL ||
+ bw->current_content == NULL) {
return PAGE_STATE_UNKNOWN;
}
@@ -4688,8 +4689,10 @@ browser_window_page_info_state browser_window_get_page_info_state(
return PAGE_STATE_SECURE_OVERRIDE;
}
- /** \todo Determine if sub-elements of this fetch were insecure */
- /* If so, return PAGE_STATE_SECURE_ISSUES */
+ /* If we've seen insecure content internally then we need to say so */
+ if (content_saw_insecure_objects(bw->current_content)) {
+ return PAGE_STATE_SECURE_ISSUES;
+ }
/* All is well, return secure state */
return PAGE_STATE_SECURE;
--
NetSurf Browser
3 years, 1 month
netsurf: branch master updated. release/3.9-343-g9741df2
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf.git/shortlog/9741df214d7b291c8de40...
...commit http://git.netsurf-browser.org/netsurf.git/commit/9741df214d7b291c8de40e9...
...tree http://git.netsurf-browser.org/netsurf.git/tree/9741df214d7b291c8de40e9b2...
The branch, master has been updated
via 9741df214d7b291c8de40e9b21d4411e523d0bb3 (commit)
from 03f72abdb3416fd6fd869beafa03f2c4f3803df0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=9741df214d7b291c8de...
commit 9741df214d7b291c8de40e9b21d4411e523d0bb3
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
browser_window: Add basic page info state and SSL accessors
In order to begin work on the page info dialog, we need access
to the current page's state and SSL chain if available.
Signed-off-by: Daniel Silverstone <dsilvers(a)digital-scurf.org>
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 28647a4..a9c2778 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4638,3 +4638,75 @@ browser_window__reload_current_parameters(struct browser_window *bw)
memset(&bw->current_parameters, 0, sizeof(bw->current_parameters));
return browser_window__navigate_internal(bw, &bw->loading_parameters);
}
+
+/* Exported interface, documented in browser_window.h */
+browser_window_page_info_state browser_window_get_page_info_state(
+ struct browser_window *bw)
+{
+ lwc_string *scheme;
+ bool match;
+
+ assert(bw != NULL);
+
+ /* Do we have any parameters? If not -- UNKNOWN */
+ if (bw->current_parameters.url == NULL) {
+ return PAGE_STATE_UNKNOWN;
+ }
+
+ scheme = nsurl_get_component(bw->current_parameters.url, NSURL_SCHEME);
+
+ /* Is this an internal scheme? */
+ if ((lwc_string_isequal(scheme, corestring_lwc_about,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_data,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_resource,
+ &match) == lwc_error_ok &&
+ (match == true))) {
+ return PAGE_STATE_INTERNAL;
+ }
+
+ /* Is this file:/// ? */
+ if (lwc_string_isequal(scheme, corestring_lwc_file,
+ &match) == lwc_error_ok &&
+ match == true) {
+ return PAGE_STATE_LOCAL;
+ }
+
+ /* If not https, from here on down that'd be insecure */
+ if ((lwc_string_isequal(scheme, corestring_lwc_https,
+ &match) == lwc_error_ok &&
+ (match == false))) {
+ /* Some remote content, not https, therefore insecure */
+ return PAGE_STATE_INSECURE;
+ }
+
+ /* Did we have to override this SSL setting? */
+ if (urldb_get_cert_permissions(bw->current_parameters.url)) {
+ return PAGE_STATE_SECURE_OVERRIDE;
+ }
+
+ /** \todo Determine if sub-elements of this fetch were insecure */
+ /* If so, return PAGE_STATE_SECURE_ISSUES */
+
+ /* All is well, return secure state */
+ return PAGE_STATE_SECURE;
+}
+
+/* Exported interface, documented in browser_window.h */
+nserror browser_window_get_ssl_chain(struct browser_window *bw, size_t *num,
+ struct ssl_cert_info **chain)
+{
+ assert(bw != NULL);
+
+ if (bw->current_ssl_info.num == 0) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ *num = bw->current_ssl_info.num;
+ *chain = &(bw->current_ssl_info.certs[0]);
+
+ return NSERROR_OK;
+}
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 9bb191c..98139aa 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -42,6 +42,7 @@ struct form_control;
struct nsurl;
struct rect;
struct redraw_context;
+struct ssl_cert_info;
enum content_debug;
/**
@@ -58,6 +59,19 @@ typedef enum {
DRAGGING_OTHER
} browser_drag_type;
+/**
+ * Browser window page information states
+ */
+typedef enum {
+ PAGE_STATE_UNKNOWN, /**< Unable to determine */
+ PAGE_STATE_INTERNAL, /**< Page loaded from internal handler */
+ PAGE_STATE_LOCAL, /**< Page loaded from file:/// etc */
+ PAGE_STATE_INSECURE, /**< Insecure page load */
+ PAGE_STATE_SECURE_OVERRIDE, /**< Secure load, but had to override */
+ PAGE_STATE_SECURE_ISSUES, /**< Secure load, but has insecure elements */
+ PAGE_STATE_SECURE, /**< Secure load */
+} browser_window_page_info_state;
+
typedef enum {
BW_EDITOR_NONE = 0, /**< No selection, no editing */
BW_EDITOR_CAN_COPY = (1 << 0), /**< Have selection */
@@ -740,4 +754,35 @@ nserror browser_window_console_log(struct browser_window *bw,
size_t msglen,
browser_window_console_flags flags);
+/**
+ * Request the current browser window page info state.
+ *
+ * The page information state is an indicator enumeration to be used by
+ * frontends to indicate to the user if the page they are viewing is able
+ * to be trusted. This is often shown as a padlock of some kind.
+ *
+ * This is also used by the internal page information corewindow to render
+ * to the user what the situation is.
+ *
+ * \param bw The browser window
+ * \return The state of the browser window
+ */
+browser_window_page_info_state browser_window_get_page_info_state(
+ struct browser_window *bw);
+
+/**
+ * Request the current browser window SSL certificate chain.
+ *
+ * When the page has SSL information, this will retrieve the certificate chain.
+ *
+ * If there is no chain available, this will return NSERROR_NOT_FOUND
+ *
+ * \param bw The browser window
+ * \param num Pointer to be filled out with chain length
+ * \param chain Pointer to be filled out with chain base
+ * \return Whether or not the chain is available
+ */
+nserror browser_window_get_ssl_chain(struct browser_window *bw, size_t *num,
+ struct ssl_cert_info **chain);
+
#endif
-----------------------------------------------------------------------
Summary of changes:
desktop/browser_window.c | 72 ++++++++++++++++++++++++++++++++++++++
include/netsurf/browser_window.h | 45 ++++++++++++++++++++++++
2 files changed, 117 insertions(+)
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 28647a4..a9c2778 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -4638,3 +4638,75 @@ browser_window__reload_current_parameters(struct browser_window *bw)
memset(&bw->current_parameters, 0, sizeof(bw->current_parameters));
return browser_window__navigate_internal(bw, &bw->loading_parameters);
}
+
+/* Exported interface, documented in browser_window.h */
+browser_window_page_info_state browser_window_get_page_info_state(
+ struct browser_window *bw)
+{
+ lwc_string *scheme;
+ bool match;
+
+ assert(bw != NULL);
+
+ /* Do we have any parameters? If not -- UNKNOWN */
+ if (bw->current_parameters.url == NULL) {
+ return PAGE_STATE_UNKNOWN;
+ }
+
+ scheme = nsurl_get_component(bw->current_parameters.url, NSURL_SCHEME);
+
+ /* Is this an internal scheme? */
+ if ((lwc_string_isequal(scheme, corestring_lwc_about,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_data,
+ &match) == lwc_error_ok &&
+ (match == true)) ||
+ (lwc_string_isequal(scheme, corestring_lwc_resource,
+ &match) == lwc_error_ok &&
+ (match == true))) {
+ return PAGE_STATE_INTERNAL;
+ }
+
+ /* Is this file:/// ? */
+ if (lwc_string_isequal(scheme, corestring_lwc_file,
+ &match) == lwc_error_ok &&
+ match == true) {
+ return PAGE_STATE_LOCAL;
+ }
+
+ /* If not https, from here on down that'd be insecure */
+ if ((lwc_string_isequal(scheme, corestring_lwc_https,
+ &match) == lwc_error_ok &&
+ (match == false))) {
+ /* Some remote content, not https, therefore insecure */
+ return PAGE_STATE_INSECURE;
+ }
+
+ /* Did we have to override this SSL setting? */
+ if (urldb_get_cert_permissions(bw->current_parameters.url)) {
+ return PAGE_STATE_SECURE_OVERRIDE;
+ }
+
+ /** \todo Determine if sub-elements of this fetch were insecure */
+ /* If so, return PAGE_STATE_SECURE_ISSUES */
+
+ /* All is well, return secure state */
+ return PAGE_STATE_SECURE;
+}
+
+/* Exported interface, documented in browser_window.h */
+nserror browser_window_get_ssl_chain(struct browser_window *bw, size_t *num,
+ struct ssl_cert_info **chain)
+{
+ assert(bw != NULL);
+
+ if (bw->current_ssl_info.num == 0) {
+ return NSERROR_NOT_FOUND;
+ }
+
+ *num = bw->current_ssl_info.num;
+ *chain = &(bw->current_ssl_info.certs[0]);
+
+ return NSERROR_OK;
+}
diff --git a/include/netsurf/browser_window.h b/include/netsurf/browser_window.h
index 9bb191c..98139aa 100644
--- a/include/netsurf/browser_window.h
+++ b/include/netsurf/browser_window.h
@@ -42,6 +42,7 @@ struct form_control;
struct nsurl;
struct rect;
struct redraw_context;
+struct ssl_cert_info;
enum content_debug;
/**
@@ -58,6 +59,19 @@ typedef enum {
DRAGGING_OTHER
} browser_drag_type;
+/**
+ * Browser window page information states
+ */
+typedef enum {
+ PAGE_STATE_UNKNOWN, /**< Unable to determine */
+ PAGE_STATE_INTERNAL, /**< Page loaded from internal handler */
+ PAGE_STATE_LOCAL, /**< Page loaded from file:/// etc */
+ PAGE_STATE_INSECURE, /**< Insecure page load */
+ PAGE_STATE_SECURE_OVERRIDE, /**< Secure load, but had to override */
+ PAGE_STATE_SECURE_ISSUES, /**< Secure load, but has insecure elements */
+ PAGE_STATE_SECURE, /**< Secure load */
+} browser_window_page_info_state;
+
typedef enum {
BW_EDITOR_NONE = 0, /**< No selection, no editing */
BW_EDITOR_CAN_COPY = (1 << 0), /**< Have selection */
@@ -740,4 +754,35 @@ nserror browser_window_console_log(struct browser_window *bw,
size_t msglen,
browser_window_console_flags flags);
+/**
+ * Request the current browser window page info state.
+ *
+ * The page information state is an indicator enumeration to be used by
+ * frontends to indicate to the user if the page they are viewing is able
+ * to be trusted. This is often shown as a padlock of some kind.
+ *
+ * This is also used by the internal page information corewindow to render
+ * to the user what the situation is.
+ *
+ * \param bw The browser window
+ * \return The state of the browser window
+ */
+browser_window_page_info_state browser_window_get_page_info_state(
+ struct browser_window *bw);
+
+/**
+ * Request the current browser window SSL certificate chain.
+ *
+ * When the page has SSL information, this will retrieve the certificate chain.
+ *
+ * If there is no chain available, this will return NSERROR_NOT_FOUND
+ *
+ * \param bw The browser window
+ * \param num Pointer to be filled out with chain length
+ * \param chain Pointer to be filled out with chain base
+ * \return Whether or not the chain is available
+ */
+nserror browser_window_get_ssl_chain(struct browser_window *bw, size_t *num,
+ struct ssl_cert_info **chain);
+
#endif
--
NetSurf Browser
3 years, 1 month
netsurf-wiki: branch master updated. 04df956c80fbed4d677b3ecad735ca4390b0ceb6
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/04df956c80fbed4d...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/04df956c80fbed4d67...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/04df956c80fbed4d677b...
The branch, master has been updated
via 04df956c80fbed4d677b3ecad735ca4390b0ceb6 (commit)
from db8d6d84e4fe51fc3d90acf4c63df041825fad26 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf-wiki.git/commit/?id=04df956c80fbed...
commit 04df956c80fbed4d677b3ecad735ca4390b0ceb6
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
We tried, we failed
diff --git a/developer-weekend/dec-2019.mdwn b/developer-weekend/dec-2019.mdwn
index 6ddf783..4b09b14 100644
--- a/developer-weekend/dec-2019.mdwn
+++ b/developer-weekend/dec-2019.mdwn
@@ -50,7 +50,7 @@ Topics
* Bug triage
* Do general triage **DONE**
* Specifically address [[!bug 2682]] (NetSurf on RISC OS keeps crashing in
- curl-ares)
+ curl-ares) **We looked, we couldn't work out what it was**
* Look at [[!bug 2686]] [[!bug 2701]] (WebP in SDK) **DONE** Daniel updated
toolchains
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/dec-2019.mdwn | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/developer-weekend/dec-2019.mdwn b/developer-weekend/dec-2019.mdwn
index 6ddf783..4b09b14 100644
--- a/developer-weekend/dec-2019.mdwn
+++ b/developer-weekend/dec-2019.mdwn
@@ -50,7 +50,7 @@ Topics
* Bug triage
* Do general triage **DONE**
* Specifically address [[!bug 2682]] (NetSurf on RISC OS keeps crashing in
- curl-ares)
+ curl-ares) **We looked, we couldn't work out what it was**
* Look at [[!bug 2686]] [[!bug 2701]] (WebP in SDK) **DONE** Daniel updated
toolchains
--
NetSurf Developer Wiki Backing Store
3 years, 1 month
netsurf-wiki: branch master updated. db8d6d84e4fe51fc3d90acf4c63df041825fad26
by NetSurf Browser Project
Gitweb links:
...log http://git.netsurf-browser.org/netsurf-wiki.git/shortlog/db8d6d84e4fe51fc...
...commit http://git.netsurf-browser.org/netsurf-wiki.git/commit/db8d6d84e4fe51fc3d...
...tree http://git.netsurf-browser.org/netsurf-wiki.git/tree/db8d6d84e4fe51fc3d90...
The branch, master has been updated
via db8d6d84e4fe51fc3d90acf4c63df041825fad26 (commit)
from ab0b5a4f78a4c483459b0a53ada565b33f190a0b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff http://git.netsurf-browser.org/netsurf-wiki.git/commit/?id=db8d6d84e4fe51...
commit db8d6d84e4fe51fc3d90acf4c63df041825fad26
Author: Daniel Silverstone <dsilvers(a)digital-scurf.org>
Commit: Daniel Silverstone <dsilvers(a)digital-scurf.org>
More notes
diff --git a/developer-weekend/dec-2019.mdwn b/developer-weekend/dec-2019.mdwn
index 1ee5b68..6ddf783 100644
--- a/developer-weekend/dec-2019.mdwn
+++ b/developer-weekend/dec-2019.mdwn
@@ -119,6 +119,8 @@ Daniel
so that persistent https data retains its chain for use.
* Did a bunch of toolchain updates
* Did a bunch of `rr` and fixed some leaks in `box_construct.c`
+* Did a bunch of `rr` and tracked down a breakage in libcss when faced with
+ an incomplete ruleset inside a media query block. (Michael helped)
Vince
-----
-----------------------------------------------------------------------
Summary of changes:
developer-weekend/dec-2019.mdwn | 2 ++
1 file changed, 2 insertions(+)
diff --git a/developer-weekend/dec-2019.mdwn b/developer-weekend/dec-2019.mdwn
index 1ee5b68..6ddf783 100644
--- a/developer-weekend/dec-2019.mdwn
+++ b/developer-weekend/dec-2019.mdwn
@@ -119,6 +119,8 @@ Daniel
so that persistent https data retains its chain for use.
* Did a bunch of toolchain updates
* Did a bunch of `rr` and fixed some leaks in `box_construct.c`
+* Did a bunch of `rr` and tracked down a breakage in libcss when faced with
+ an incomplete ruleset inside a media query block. (Michael helped)
Vince
-----
--
NetSurf Developer Wiki Backing Store
3 years, 1 month