summaryrefslogtreecommitdiff
path: root/frontends
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-22 09:01:39 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-22 09:01:39 +0100
commite6c666d4f432d51ff449bbd4dfd137107c9e774c (patch)
tree9e66a539e1a0cd55d1146c4898f71aecfddabdf5 /frontends
parent10fc242aa94c8a9a440baccbf7170b36b4d54cb7 (diff)
downloadnetsurf-e6c666d4f432d51ff449bbd4dfd137107c9e774c.tar.gz
netsurf-e6c666d4f432d51ff449bbd4dfd137107c9e774c.tar.bz2
chore: Perform sslcert_viewer-ectomy
This removes the sslcert_viewer entirely from the code. Where possible I've also trimmed out of frontends any code I think should not be present. Frontends should check and remove any further references that I have failed to catch. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'frontends')
-rw-r--r--frontends/amiga/Makefile2
-rw-r--r--frontends/amiga/gui.c1
-rw-r--r--frontends/amiga/sslcert.c374
-rw-r--r--frontends/amiga/sslcert.h38
-rw-r--r--frontends/atari/Makefile1
-rw-r--r--frontends/atari/certview.c293
-rw-r--r--frontends/atari/certview.h51
-rw-r--r--frontends/atari/gui.c27
-rw-r--r--frontends/atari/verify_ssl.c273
-rw-r--r--frontends/atari/verify_ssl.h24
-rw-r--r--frontends/beos/gui.cpp1
-rw-r--r--frontends/gtk/res/netsurf.gresource.xml2
-rw-r--r--frontends/gtk/res/ssl.gtk2.ui202
-rw-r--r--frontends/gtk/res/ssl.gtk3.ui181
-rw-r--r--frontends/gtk/resources.c1
-rw-r--r--frontends/monkey/Makefile2
-rw-r--r--frontends/monkey/cert.c149
-rw-r--r--frontends/monkey/cert.h31
-rw-r--r--frontends/monkey/main.c7
-rw-r--r--frontends/monkey/output.c1
-rw-r--r--frontends/monkey/output.h1
-rw-r--r--frontends/riscos/Makefile2
-rw-r--r--frontends/riscos/dialog.c4
-rw-r--r--frontends/riscos/gui.c1
-rw-r--r--frontends/riscos/gui.h1
-rw-r--r--frontends/riscos/sslcert.c415
-rw-r--r--frontends/riscos/sslcert.h47
-rw-r--r--frontends/riscos/templates/de248
-rw-r--r--frontends/riscos/templates/en247
-rw-r--r--frontends/riscos/templates/fr250
-rw-r--r--frontends/riscos/templates/nl249
-rw-r--r--frontends/windows/Makefile2
-rw-r--r--frontends/windows/main.c2
-rw-r--r--frontends/windows/resourceid.h5
-rw-r--r--frontends/windows/ssl_cert.c469
-rw-r--r--frontends/windows/ssl_cert.h51
36 files changed, 4 insertions, 3651 deletions
diff --git a/frontends/amiga/Makefile b/frontends/amiga/Makefile
index ff4f85ba5..17af11efa 100644
--- a/frontends/amiga/Makefile
+++ b/frontends/amiga/Makefile
@@ -48,7 +48,7 @@ S_FRONTEND := gui.c history.c hotlist.c schedule.c file.c \
plotters.c object.c menu.c save_pdf.c arexx.c version.c \
cookies.c ctxmenu.c clipboard.c help.c font_scan.c \
launch.c search.c history_local.c download.c iff_dr2d.c \
- sslcert.c gui_options.c print.c theme.c drag.c icon.c libs.c \
+ gui_options.c print.c theme.c drag.c icon.c libs.c \
datatypes.c dt_picture.c dt_anim.c dt_sound.c plugin_hack.c \
stringview/stringview.c stringview/urlhistory.c rtg.c \
agclass/amigaguide_class.c os3support.c font_diskfont.c \
diff --git a/frontends/amiga/gui.c b/frontends/amiga/gui.c
index 6bb9ffbfb..bb7478c8e 100644
--- a/frontends/amiga/gui.c
+++ b/frontends/amiga/gui.c
@@ -160,7 +160,6 @@
#include "amiga/selectmenu.h"
#include "amiga/theme.h"
#include "amiga/utf8.h"
-#include "amiga/sslcert.h"
#define AMINS_SCROLLERPEN NUMDRIPENS
#define NSA_KBD_SCROLL_PX 10
diff --git a/frontends/amiga/sslcert.c b/frontends/amiga/sslcert.c
deleted file mode 100644
index 2d1c52e1f..000000000
--- a/frontends/amiga/sslcert.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright 2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
- *
- * 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 Amiga certificate viewing using core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-
-#include <proto/intuition.h>
-
-#include <classes/window.h>
-#include <gadgets/button.h>
-#include <gadgets/layout.h>
-#include <gadgets/scroller.h>
-#include <gadgets/space.h>
-#include <images/label.h>
-
-#include <intuition/icclass.h>
-#include <reaction/reaction_macros.h>
-
-#include "utils/log.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-#include "utils/messages.h"
-#include "utils/nsoption.h"
-
-#include "amiga/corewindow.h"
-#include "amiga/libs.h"
-#include "amiga/sslcert.h"
-#include "amiga/utf8.h"
-
-
-/**
- * Amiga certificate viewing window context
- */
-enum {
- GID_SSLCERT_ACCEPT = GID_CW_LAST,
- GID_SSLCERT_REJECT,
- GID_SSLCERT_LAST
-};
-
-#define GID_SSLCERT_SIZE GID_SSLCERT_LAST - GID_CW_LAST
-
-struct ami_crtvrfy_window {
- /** Amiga core window context */
- struct ami_corewindow core;
-
- /** Amiga GUI stuff */
- Object *sslcert_objects[GID_SSLCERT_LAST]; // technically wasting a few bytes here
-
- char *sslerr;
- char *sslaccept;
- char *sslreject;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-};
-
-/**
- * destroy a previously created certificate view
- */
-static nserror
-ami_crtvrfy_destroy(struct ami_crtvrfy_window *crtvrfy_win)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtvrfy_win->ssl_data);
- if (res == NSERROR_OK) {
- ami_utf8_free(crtvrfy_win->sslerr);
- ami_utf8_free(crtvrfy_win->sslaccept);
- ami_utf8_free(crtvrfy_win->sslreject);
- res = ami_corewindow_fini(&crtvrfy_win->core); /* closes the window for us */
- }
- return res;
-}
-
-static void
-ami_crtvrfy_accept(struct ami_corewindow *ami_cw)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_cw;
-
- sslcert_viewer_accept(crtvrfy_win->ssl_data);
-
- ami_crtvrfy_destroy(crtvrfy_win);
-}
-
-static void
-ami_crtvrfy_reject(struct ami_corewindow *ami_cw)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_cw;
-
- sslcert_viewer_reject(crtvrfy_win->ssl_data);
-
- ami_crtvrfy_destroy(crtvrfy_win);
-}
-
-/**
- * callback for unknown events on Amiga core window
- * eg. buttons in the ssl cert window
- * (result & WMHI_CLASSMASK) gives the class of event (eg. WMHI_GADGETUP)
- * (result & WMHI_GADGETMASK) gives the gadget ID (eg. GID_SSLCERT_ACCEPT)
- *
- * \param ami_cw The Amiga core window structure.
- * \param result event as returned by RA_HandleInput()
- * \return TRUE if window closed during event processing
- */
-static BOOL
-ami_crtvrfy_event(struct ami_corewindow *ami_cw, ULONG result)
-{
- if((result & WMHI_CLASSMASK) == WMHI_GADGETUP) {
- switch(result & WMHI_GADGETMASK) {
- case GID_SSLCERT_ACCEPT:
- ami_crtvrfy_accept(ami_cw);
- return TRUE;
- break;
-
- case GID_SSLCERT_REJECT:
- ami_crtvrfy_reject(ami_cw);
- return TRUE;
- break;
- }
- }
- return FALSE;
-}
-
-/**
- * callback for mouse action for certificate verify on core window
- *
- * \param ami_cw The Amiga 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 apropriate error code
- */
-static nserror
-ami_crtvrfy_mouse(struct ami_corewindow *ami_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_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 ami_cw The Amiga core window structure.
- * \param nskey The netsurf key code
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-ami_crtvrfy_key(struct ami_corewindow *ami_cw, uint32_t nskey)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_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 ami_cw The Amiga core window structure.
- * \param x the x coordinate to draw
- * \param y the y coordinate to draw
- * \param r The rectangle of the window that needs updating.
- * \param ctx The drawing context
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-ami_crtvrfy_draw(struct ami_corewindow *ami_cw, int x, int y, struct rect *r, struct redraw_context *ctx)
-{
- struct ami_crtvrfy_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct ami_crtvrfy_window *)ami_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data, x, y, r, ctx);
-
- return NSERROR_OK;
-}
-
-static nserror
-ami_crtvrfy_create_window(struct ami_crtvrfy_window *crtvrfy_win)
-{
- struct ami_corewindow *ami_cw = (struct ami_corewindow *)&crtvrfy_win->core;
- ULONG refresh_mode = WA_SmartRefresh;
- struct Screen *scrn = ami_gui_get_screen();
-
- if(nsoption_bool(window_simple_refresh) == true) {
- refresh_mode = WA_SimpleRefresh;
- }
-
- ami_cw->objects[GID_CW_WIN] = WindowObj,
- WA_ScreenTitle, ami_gui_get_screen_title(),
- WA_Title, ami_cw->wintitle,
- WA_Activate, TRUE,
- WA_DepthGadget, TRUE,
- WA_DragBar, TRUE,
- WA_CloseGadget, FALSE,
- WA_SizeGadget, TRUE,
- WA_SizeBBottom, TRUE,
- WA_Height, scrn->Height / 2,
- WA_PubScreen, scrn,
- WA_ReportMouse, TRUE,
- refresh_mode, TRUE,
- WA_IDCMP, IDCMP_MOUSEMOVE | IDCMP_MOUSEBUTTONS | IDCMP_NEWSIZE |
- IDCMP_RAWKEY | IDCMP_GADGETUP | IDCMP_IDCMPUPDATE |
- IDCMP_EXTENDEDMOUSE | IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
- WINDOW_IDCMPHook, &ami_cw->idcmp_hook,
- WINDOW_IDCMPHookBits, IDCMP_IDCMPUPDATE | IDCMP_EXTENDEDMOUSE |
- IDCMP_SIZEVERIFY | IDCMP_REFRESHWINDOW,
- WINDOW_SharedPort, ami_gui_get_shared_msgport(),
- WINDOW_UserData, crtvrfy_win,
- /* WINDOW_NewMenu, twin->menu, -> No menu for SSL Cert */
- WINDOW_IconifyGadget, FALSE,
- WINDOW_Position, WPOS_CENTERSCREEN,
- WINDOW_ParentGroup, ami_cw->objects[GID_CW_MAIN] = LayoutVObj,
- LAYOUT_AddImage, LabelObj,
- LABEL_Text, crtvrfy_win->sslerr,
- LabelEnd,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_HSCROLLLAYOUT] = LayoutVObj,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_VSCROLLLAYOUT] = LayoutHObj,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_DRAW] = SpaceObj,
- GA_ID, GID_CW_DRAW,
- SPACE_Transparent, TRUE,
- SPACE_BevelStyle, BVS_DISPLAY,
- GA_RelVerify, TRUE,
- SpaceEnd,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_VSCROLL] = ScrollerObj,
- GA_ID, GID_CW_VSCROLL,
- GA_RelVerify, TRUE,
- ICA_TARGET, ICTARGET_IDCMP,
- ScrollerEnd,
- LayoutEnd,
- LAYOUT_AddChild, ami_cw->objects[GID_CW_HSCROLL] = ScrollerObj,
- GA_ID, GID_CW_HSCROLL,
- GA_RelVerify, TRUE,
- ICA_TARGET, ICTARGET_IDCMP,
- SCROLLER_Orientation, SORIENT_HORIZ,
- ScrollerEnd,
- LayoutEnd,
- LAYOUT_AddChild, LayoutHObj,
- LAYOUT_AddChild, crtvrfy_win->sslcert_objects[GID_SSLCERT_ACCEPT] = ButtonObj,
- GA_ID, GID_SSLCERT_ACCEPT,
- GA_Text, crtvrfy_win->sslaccept,
- GA_RelVerify, TRUE,
- ButtonEnd,
- LAYOUT_AddChild, crtvrfy_win->sslcert_objects[GID_SSLCERT_REJECT] = ButtonObj,
- GA_ID, GID_SSLCERT_REJECT,
- GA_Text, crtvrfy_win->sslreject,
- GA_RelVerify, TRUE,
- ButtonEnd,
- EndGroup,
- CHILD_WeightedHeight, 0,
- EndGroup,
- EndWindow;
-
- if(ami_cw->objects[GID_CW_WIN] == NULL) {
- return NSERROR_NOMEM;
- }
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in amiga/ssl_cert.h */
-nserror ami_cert_verify(struct nsurl *url,
- const struct cert_chain *chain,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct ami_crtvrfy_window *ncwin;
- nserror res;
-
- ncwin = calloc(1, sizeof(struct ami_crtvrfy_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- ncwin->core.wintitle = ami_utf8_easy((char *)messages_get("SSLCerts"));
- ncwin->sslerr = ami_utf8_easy((char *)messages_get("SSLError"));
- ncwin->sslaccept = ami_utf8_easy((char *)messages_get("SSL_Certificate_Accept"));
- ncwin->sslreject = ami_utf8_easy((char *)messages_get("SSL_Certificate_Reject"));
-
- res = ami_crtvrfy_create_window(ncwin);
- if (res != NSERROR_OK) {
- NSLOG(netsurf, INFO, "SSL UI builder init failed");
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- free(ncwin);
- return res;
- }
-
- /* initialise Amiga core window */
- ncwin->core.draw = ami_crtvrfy_draw;
- ncwin->core.key = ami_crtvrfy_key;
- ncwin->core.mouse = ami_crtvrfy_mouse;
- ncwin->core.close = ami_crtvrfy_reject;
- ncwin->core.event = ami_crtvrfy_event;
-
- res = ami_corewindow_init(&ncwin->core);
- if (res != NSERROR_OK) {
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- DisposeObject(ncwin->core.objects[GID_CW_WIN]);
- free(ncwin);
- return res;
- }
-
- /* initialise certificate viewing interface */
- res = sslcert_viewer_create_session_data(url, cb, cbpw, chain, &ncwin->ssl_data);
- if (res != NSERROR_OK) {
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- DisposeObject(ncwin->core.objects[GID_CW_WIN]);
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- ami_utf8_free(ncwin->core.wintitle);
- ami_utf8_free(ncwin->sslerr);
- ami_utf8_free(ncwin->sslaccept);
- ami_utf8_free(ncwin->sslreject);
- DisposeObject(ncwin->core.objects[GID_CW_WIN]);
- free(ncwin);
- return res;
- }
-
- return NSERROR_OK;
-}
-
diff --git a/frontends/amiga/sslcert.h b/frontends/amiga/sslcert.h
deleted file mode 100644
index 114d557cf..000000000
--- a/frontends/amiga/sslcert.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2017 Chris Young <chris@unsatisfactorysoftware.co.uk>
- *
- * 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 AMIGA_SSLCERT_H
-#define AMIGA_SSLCERT_H
-struct nsurl;
-struct cert_chain;
-
-/**
- * Prompt the user to verify a certificate with issues.
- *
- * \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 ami_cert_verify(struct nsurl *url,
- const struct cert_chain *chain,
- nserror (*cb)(bool proceed, void *pw), void *cbpw);
-#endif
-
diff --git a/frontends/atari/Makefile b/frontends/atari/Makefile
index de4ca78b3..66bfd6868 100644
--- a/frontends/atari/Makefile
+++ b/frontends/atari/Makefile
@@ -85,7 +85,6 @@ S_FRONTEND := \
clipboard.c \
ctxmenu.c \
cookies.c \
- certview.c \
deskmenu.c \
download.c \
encoding.c \
diff --git a/frontends/atari/certview.c b/frontends/atari/certview.c
deleted file mode 100644
index 80d18a059..000000000
--- a/frontends/atari/certview.c
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.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/>.
- */
-
-#include <ctype.h>
-#include <string.h>
-#include <stdbool.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-
-#include "utils/nsoption.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-#include "utils/utils.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "atari/gui.h"
-#include "atari/misc.h"
-#include "atari/treeview.h"
-#include "atari/certview.h"
-#include "atari/findfile.h"
-#include "atari/gemtk/gemtk.h"
-#include "atari/res/netsurf.rsh"
-
-extern GRECT desk_area;
-
-
-/* Setup Atari Treeview Callbacks: */
-static nserror atari_sslcert_viewer_init_phase2(struct core_window *cw,
- struct core_window_callback_table * default_callbacks);
-static void atari_sslcert_viewer_finish(struct core_window *cw);
-static void atari_sslcert_viewer_keypress(struct core_window *cw,
- uint32_t ucs4);
-static void atari_sslcert_viewer_mouse_action(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y);
-static void atari_sslcert_viewer_draw(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx);
-static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8]);
-
-static struct atari_treeview_callbacks atari_sslcert_viewer_treeview_callbacks = {
- .init_phase2 = atari_sslcert_viewer_init_phase2,
- .finish = atari_sslcert_viewer_finish,
- .draw = atari_sslcert_viewer_draw,
- .keypress = atari_sslcert_viewer_keypress,
- .mouse_action = atari_sslcert_viewer_mouse_action,
- .gemtk_user_func = handle_event
-};
-
-/* static functions */
-static void atari_sslcert_viewer_destroy(struct atari_sslcert_viewer_s * cvwin);
-
-
-static nserror atari_sslcert_viewer_init_phase2(struct core_window *cw,
- struct core_window_callback_table *cb_t)
-{
- struct atari_sslcert_viewer_s *cvwin;
- struct sslcert_session_data *ssl_d;
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- assert(cvwin);
-
- ssl_d = cvwin->ssl_session_data;
-
- assert(ssl_d);
-
- NSLOG(netsurf, INFO, "cw %p", cw);
-
- return(sslcert_viewer_init(cb_t, cw, ssl_d));
-}
-
-static void atari_sslcert_viewer_finish(struct core_window *cw)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- /* This will also free the session data: */
- sslcert_viewer_fini(cvwin->ssl_session_data);
-
- NSLOG(netsurf, INFO, "cw %p", cw);
-}
-
-static void atari_sslcert_viewer_draw(struct core_window *cw, int x,
- int y, struct rect *clip,
- const struct redraw_context *ctx)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- assert(cvwin);
-
- sslcert_viewer_redraw(cvwin->ssl_session_data, x, y, clip, ctx);
-}
-
-static void atari_sslcert_viewer_keypress(struct core_window *cw, uint32_t ucs4)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- NSLOG(netsurf, INFO, "ucs4: %"PRIu32, ucs4);
- sslcert_viewer_keypress(cvwin->ssl_session_data, ucs4);
-}
-
-static void atari_sslcert_viewer_mouse_action(struct core_window *cw,
- browser_mouse_state mouse,
- int x, int y)
-{
- struct atari_sslcert_viewer_s *cvwin;
-
- assert(cw);
-
- cvwin = (struct atari_sslcert_viewer_s *)atari_treeview_get_user_data(cw);
-
- sslcert_viewer_mouse_action(cvwin->ssl_session_data, mouse, x, y);
-}
-
-
-static short handle_event(GUIWIN *win, EVMULT_OUT *ev_out, short msg[8])
-{
- struct core_window *tv=NULL;
- GRECT tb_area;
- GUIWIN * gemtk_win;
- struct atari_sslcert_viewer_s *cvwin = NULL;
- short retval = 0;
- OBJECT *toolbar;
-
- NSLOG(netsurf, INFO, "win %p", win);
-
- if(ev_out->emo_events & MU_MESAG){
- switch (msg[0]) {
-
- case WM_TOOLBAR:
- toolbar = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- NSLOG(netsurf, INFO, "CERTVIEWER WM_TOOLBAR");
- tv = (struct core_window*) gemtk_wm_get_user_data(win);
- assert(tv);
- cvwin = (struct atari_sslcert_viewer_s *)
- atari_treeview_get_user_data(tv);
- switch (msg[4]) {
-
- case TOOLBAR_SSL_CERT_TRUSTED:
-
- if (toolbar[msg[4]].ob_state & OS_SELECTED) {
-
- } else {
-
- }
- break;
- }
-
-
- gemtk_win = atari_treeview_get_gemtk_window(tv);
- assert(gemtk_win);
- //gemtk_obj_get_tree(TOOLBAR_HOTLIST)[msg[4]].ob_state &= ~OS_SELECTED;
- atari_treeview_get_grect(tv, TREEVIEW_AREA_TOOLBAR, &tb_area);
- evnt_timer(150);
- gemtk_wm_exec_redraw(gemtk_win, &tb_area);
- retval = 1;
- break;
-
- case WM_CLOSED:
- // TODO set perrmissions
- toolbar = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- tv = (struct core_window*) gemtk_wm_get_user_data(win);
- assert(tv);
- cvwin = (struct atari_sslcert_viewer_s *)
- atari_treeview_get_user_data(tv);
- if (toolbar[TOOLBAR_SSL_CERT_TRUSTED].ob_state & OS_SELECTED) {
- sslcert_viewer_accept(cvwin->ssl_session_data);
- } else {
- sslcert_viewer_reject(cvwin->ssl_session_data);
- }
- atari_sslcert_viewer_destroy(cvwin);
- retval = 1;
- break;
-
- default: break;
- }
- }
-
- return(retval);
-}
-
-static void atari_sslcert_viewer_init(struct atari_sslcert_viewer_s * cvwin,
- struct sslcert_session_data *ssl_d)
-{
- assert(cvwin->init == false);
- assert(cvwin->window == NULL);
- assert(cvwin->tv == NULL);
-
- int flags = ATARI_TREEVIEW_WIDGETS;
- short handle = -1;
- OBJECT * tree = gemtk_obj_get_tree(TOOLBAR_SSL_CERT);
- assert( tree );
-
- handle = wind_create(flags, 0, 0, desk_area.g_w, desk_area.g_h);
- cvwin->window = gemtk_wm_add(handle,
- GEMTK_WM_FLAG_DEFAULTS, NULL);
- if (cvwin->window == NULL ) {
- gemtk_msg_box_show(GEMTK_MSG_BOX_ALERT,
- "Failed to allocate Treeview:\nCertviewer");
- return;
- }
- wind_set_str(handle, WF_NAME, (char*)"SSL Certificate");
- gemtk_wm_set_toolbar(cvwin->window, tree, 0, 0);
- gemtk_wm_unlink(cvwin->window);
-
- cvwin->ssl_session_data = ssl_d;
- cvwin->tv = atari_treeview_create(cvwin->window,
- &atari_sslcert_viewer_treeview_callbacks,
- cvwin, flags);
-
- if (cvwin->tv == NULL) {
- /* handle it properly, clean up previous allocs */
- NSLOG(netsurf, INFO, "Failed to allocate treeview");
- return;
- }
-
- cvwin->init = true;
-}
-
-/*
- * documented in certview.h
- */
-void atari_sslcert_viewer_open(struct sslcert_session_data *ssl_d)
-{
- struct atari_sslcert_viewer_s * cvwin;
-
- cvwin = calloc(1, sizeof(struct atari_sslcert_viewer_s));
-
- assert(cvwin);
-
- atari_sslcert_viewer_init(cvwin, ssl_d);
-
- if (atari_treeview_is_open(cvwin->tv) == false) {
-
- GRECT pos;
- pos.g_x = desk_area.g_w - desk_area.g_w / 4;
- pos.g_y = desk_area.g_y;
- pos.g_w = desk_area.g_w / 4;
- pos.g_h = desk_area.g_h;
-
- atari_treeview_open(cvwin->tv, &pos);
- } else {
- wind_set(gemtk_wm_get_handle(cvwin->window), WF_TOP, 1, 0,
- 0, 0);
- }
-}
-
-
-static void atari_sslcert_viewer_destroy(struct atari_sslcert_viewer_s * cvwin)
-{
- assert(cvwin);
- assert(cvwin->init);
- assert(cvwin->window);
-
- NSLOG(netsurf, INFO, "cvwin %p", cvwin);
-
- if (atari_treeview_is_open(cvwin->tv))
- atari_treeview_close(cvwin->tv);
- wind_delete(gemtk_wm_get_handle(cvwin->window));
- gemtk_wm_remove(cvwin->window);
- cvwin->window = NULL;
- atari_treeview_delete(cvwin->tv);
- free(cvwin);
- NSLOG(netsurf, INFO, "done");
-}
diff --git a/frontends/atari/certview.h b/frontends/atari/certview.h
deleted file mode 100644
index ff15d8076..000000000
--- a/frontends/atari/certview.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2013 Ole Loots <ole@monochrom.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 CERTVIEW_H_INCLUDED
-#define CERTVIEW_H_INCLUDED
-
-#include <inttypes.h>
-#include <sys/types.h>
-#include <string.h>
-
-
-#include "assert.h"
-#include "utils/nsoption.h"
-#include "utils/log.h"
-#include "desktop/sslcert_viewer.h"
-
-struct core_window;
-
-struct atari_sslcert_viewer_s {
- GUIWIN * window;
- //struct atari_treeview_window *tv;/*< The hotlist treeview handle. */
- struct core_window *tv;
- struct sslcert_session_data *ssl_session_data;
- bool init;
-};
-
-/**
- * Initializes and opens an certificate inspector window
- * \param ssl_d ssl session data created by sslcert_viewer_create_session_data
- *
- * The window takes ownership of the session data and free's the memory on exit.
- */
-void atari_sslcert_viewer_open(struct sslcert_session_data *ssl_d);
-
-
-#endif // CERTVIEW_H_INCLUDED
diff --git a/frontends/atari/gui.c b/frontends/atari/gui.c
index bc4c0ffeb..a318f6c09 100644
--- a/frontends/atari/gui.c
+++ b/frontends/atari/gui.c
@@ -52,7 +52,6 @@
#include "atari/toolbar.h"
#include "atari/hotlist.h"
#include "atari/cookies.h"
-#include "atari/certview.h"
#include "atari/history.h"
#include "atari/encoding.h"
#include "atari/res/netsurf.rsh"
@@ -761,32 +760,6 @@ static void gui_set_clipboard(const char *buffer, size_t length,
}
}
-static nserror
-gui_cert_verify(nsurl *url, const struct cert_chain *chain,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct sslcert_session_data *data;
- NSLOG(netsurf, INFO, "url %s", nsurl_access(url));
-
- // TODO: localize string
- int b = form_alert(1, "[2][SSL Verify failed, continue?][Continue|Abort|Details...]");
- if(b == 1){
- // Accept
- urldb_set_cert_permissions(url, true);
- cb(true, cbpw);
- } else if(b == 2) {
- // Reject
- urldb_set_cert_permissions(url, false);
- cb(false, cbpw);
- } else if(b == 3) {
- // Inspect
- sslcert_viewer_create_session_data(url, cb, cbpw, chain, &data);
- atari_sslcert_viewer_open(data);
- }
- return NSERROR_OK;
-}
-
void gui_set_input_gui_window(struct gui_window *gw)
{
NSLOG(netsurf, INFO, "Setting input window from: %p to %p\n",
diff --git a/frontends/atari/verify_ssl.c b/frontends/atari/verify_ssl.c
deleted file mode 100644
index b099fe488..000000000
--- a/frontends/atari/verify_ssl.c
+++ /dev/null
@@ -1,273 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.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/>.
- */
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdbool.h>
-#include <windom.h>
-
-#include "utils/errors.h"
-#include "utils/utils.h"
-#include "utils/log.h"
-#include "utils/messages.h"
-
-#include "atari/res/netsurf.rsh"
-#include "atari/verify_ssl.h"
-
-/*
- todo: this file need to use the treeview api - complete rework,
- current implementation is not used in any way.
-*/
-
-extern void * h_gem_rsrc;
-extern short atari_plot_vdi_handle;
-
-
-#define CERT_INF_LINES 8
-
-static struct ssl_info_draw_param
-{
- struct ssl_cert_info * cert_infos_n;
- unsigned long num_certs;
- int current;
- int scrollx;
- int cols;
- int scrolly;
- int rows; /* assumed to be 8 */
- OBJECT * tree;
-} dp;
-
-
-static int cert_display_width( struct ssl_cert_info * cert_info )
-{
- int l1, l2;
- int add = 16; /* strlen("Issuer: "); */
-
- l1 = strlen(cert_info->issuer) + add;
- l2 = strlen(cert_info->subject) + add;
- return( MAX(l1, l2) );
-}
-
-
-static void __CDECL cert_info_draw( WINDOW * win, short buf[8], void * data)
-{
- struct ssl_info_draw_param * dp = (struct ssl_info_draw_param *)data;
- GRECT work;
- short pxy[4];
- int maxchars;
- short d, cbh, cbw;
- int i = 0;
- short x,y,w,h;
- int px_ypos;
- char * line = malloc(512);
- if( line == NULL )
- return;
-
- NSLOG(netsurf, INFO,
- "Cert info draw, win: %p, data: %p, scrollx: %d", win, data,
- dp->scrollx);
-
- WindGet( win, WF_WORKXYWH, &x, &y, &w, &h );
- /*using static values here, as RsrcUserDraw has mem leaks & a very small stack */
- pxy[0] = work.g_x = x + 8;
- pxy[1] = work.g_y = y + 80;
- pxy[2] = x + 8 + 272;
- pxy[3] = y + 80 + 176;
- work.g_w = 272;
- work.g_h = 176;
-
- maxchars = (work.g_w / 8)+1;
- vs_clip( atari_plot_vdi_handle, 1,(short*) &pxy );
- vswr_mode( atari_plot_vdi_handle, MD_REPLACE );
- vsf_interior( atari_plot_vdi_handle, 1 );
- vsf_color( atari_plot_vdi_handle, LWHITE );
- v_bar( atari_plot_vdi_handle, (short*)&pxy );
- vst_height( atari_plot_vdi_handle, 16, &d, &d, &cbw, &cbh );
- vst_alignment(atari_plot_vdi_handle, 0, 5, &d, &d );
- vst_color( atari_plot_vdi_handle, BLACK );
- vst_effects( atari_plot_vdi_handle, 0 );
- px_ypos = 0;
- for(i=0; i<CERT_INF_LINES; i++ ) {
- switch( i ) {
- case 0:
- sprintf(line, "Cert Version: %d", dp->cert_infos_n[dp->current].version );
- break;
-
- case 1:
- sprintf(line, "Invalid before: %s", &dp->cert_infos_n[dp->current].not_before );
- break;
-
- case 2:
- sprintf(line, "Invalid after: %s", &dp->cert_infos_n[dp->current].not_after );
- break;
-
- case 3:
- sprintf(line, "Signature type: %d", dp->cert_infos_n[dp->current].sig_type );
- break;
-
- case 4:
- sprintf(line, "Serial: %d", dp->cert_infos_n[dp->current].serial );
- break;
-
- case 5:
- sprintf(line, "Issuer: %s", &dp->cert_infos_n[dp->current].issuer );
- break;
-
- case 6:
- sprintf(line, "Subject: %s", &dp->cert_infos_n[dp->current].subject );
- break;
-
- case 7:
- sprintf(line, "Cert type: %d", dp->cert_infos_n[dp->current].cert_type );
- break;
-
- default:
- break;
- }
- if( (int)strlen(line) > dp->scrollx ) {
- if( dp->scrollx + maxchars < 511 && ( (signed int)strlen(line) - dp->scrollx) > maxchars )
- line[dp->scrollx + maxchars] = 0;
- v_gtext(atari_plot_vdi_handle, work.g_x + 1, work.g_y + px_ypos, &line[dp->scrollx]);
- }
- px_ypos += cbh;
- }
- vst_alignment(atari_plot_vdi_handle, 0, 0, &d, &d );
- vs_clip( atari_plot_vdi_handle, 0, (short*)&pxy );
- free( line );
-}
-
-
-static void do_popup( WINDOW *win, int index, int mode, void *data)
-{
- struct ssl_info_draw_param * dp = (struct ssl_info_draw_param *)data;
- char * items[dp->num_certs];
- short x, y;
- unsigned int i;
- NSLOG(netsurf, INFO, "do_popup: num certs: %d", dp->num_certs);
- for( i = 0; i<dp->num_certs; i++) {
- items[i] = malloc( 48 );
- strncpy(items[i], (char*)&dp->cert_infos_n[i].issuer, 46 );
- }
- objc_offset( FORM(win), index, &x, &y );
- dp->current = MenuPopUp( items, x, y,
- dp->num_certs, MIN( 3, dp->num_certs), 0,
- P_LIST + P_WNDW + P_CHCK );
- ObjcChange( OC_FORM, win, index, NORMAL, TRUE );
- dp->cols = cert_display_width( &dp->cert_infos_n[dp->current] );
- dp->rows = 8;
- dp->scrollx = 0;
- dp->scrolly = 0;
-
- /* Send (!) redraw ( OC_MSG ) */
- ObjcDrawParent( OC_FORM, FORM(win), VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- for( i = 0; i<dp->num_certs; i++) {
- free( items[i] );
- }
-}
-
-
-
-bool
-verify_ssl_form_do(const char * url,
- const struct ssl_cert_info * cert_infos_n,
- unsigned long num_certs)
-{
- OBJECT *tree;
- WINDOW * form;
-
- bool bres = false;
- bool cont = true;
- int res = 0;
-
- RsrcGaddr (h_gem_rsrc , R_TREE, VERIFY, &tree);
- ObjcString( tree, VERIFY_LBL_HOST, (char*)url );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_ACCEPT, 0, 0 );
- ObjcChange( OC_OBJC, tree, VERIFY_BT_REJECT, 0, 0 );
- form = FormWindBegin( tree, (char*)"SSL Verify failed" );
-
- dp.cert_infos_n = (struct ssl_cert_info *)cert_infos_n;
- dp.num_certs = num_certs;
- dp.scrollx = 0;
- dp.scrolly = 0;
- dp.current = 0;
- dp.cols = cert_display_width( &dp.cert_infos_n[dp.current] );
- dp.rows = 8;
- dp.tree = tree;
- EvntDataAdd( form, WM_REDRAW, cert_info_draw, (void*)&dp, EV_BOT );
- /* this results in some extended objects which can not be freed: :( */
- /* RsrcUserDraw( OC_FORM, tree, VERIFY_BOX_DETAILS, cert_info_draw,(void*)&dp ) ; */
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- /*
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- ObjcAttachFormFunc( form, VERIFY_BT_NEXT_CERT, do_popup, &dp );
- */
- while( cont ) {
- res = FormWindDo( MU_MESAG );
- cont = false;
- switch( res ){
- case VERIFY_BT_ACCEPT:
- bres = true;
- break;
-
- case VERIFY_BT_NEXT_CERT:
- /* select box clicked or dragged... */
- cont = true;
- break;
-
- case VERIFY_BT_REJECT:
- bres = false;
- break;
-
- case VERIFY_BT_SCROLL_D:
- cont = true;
- dp.scrolly += 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- case VERIFY_BT_SCROLL_U:
- cont = true;
- dp.scrolly -= 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- case VERIFY_BT_SCROLL_R:
- NSLOG(netsurf, INFO, "scroll r!");
- cont = true;
- dp.scrollx += 1;
- if( dp.scrollx > (dp.cols - (272 / 8 )) )
- dp.scrollx -= 1;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG);
- break;
-
- case VERIFY_BT_SCROLL_L:
- cont = true;
- dp.scrollx -= 1;
- if( dp.scrollx < 0 )
- dp.scrollx = 0;
- ObjcDrawParent( OC_FORM, form, VERIFY_BOX_DETAILS, 1, 7 | OC_MSG );
- break;
-
- default:
- break;
- }
- }
- FormWindEnd( );
- return( bres );
-}
diff --git a/frontends/atari/verify_ssl.h b/frontends/atari/verify_ssl.h
deleted file mode 100644
index b69bc9cfb..000000000
--- a/frontends/atari/verify_ssl.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * Copyright 2010 Ole Loots <ole@monochrom.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 NS_VERIFY_SSL_H_INCLUDED
-#define NS_VERIFY_SSL_H_INCLUDED
-
-bool verify_ssl_form_do( const char * url, const struct ssl_cert_info * cert_infos_n , unsigned long num_certs );
-
-#endif
diff --git a/frontends/beos/gui.cpp b/frontends/beos/gui.cpp
index b49bc80c6..74a536522 100644
--- a/frontends/beos/gui.cpp
+++ b/frontends/beos/gui.cpp
@@ -995,7 +995,6 @@ static struct gui_misc_table beos_misc_table = {
beos_schedule,
gui_quit,
gui_launch_url,
- NULL, //cert_verify
NULL, //401login
NULL, // pdf_password (if we have Haru support)
};
diff --git a/frontends/gtk/res/netsurf.gresource.xml b/frontends/gtk/res/netsurf.gresource.xml
index a41ca6ce5..17d2c081d 100644
--- a/frontends/gtk/res/netsurf.gresource.xml
+++ b/frontends/gtk/res/netsurf.gresource.xml
@@ -11,8 +11,6 @@
<file>cookies.gtk3.ui</file>
<file>hotlist.gtk2.ui</file>
<file>netsurf.gtk3.ui</file>
- <file>ssl.gtk2.ui</file>
- <file>ssl.gtk3.ui</file>
<file>pageinfo.gtk3.ui</file>
<file>toolbar.gtk3.ui</file>
<file>downloads.gtk2.ui</file>
diff --git a/frontends/gtk/res/ssl.gtk2.ui b/frontends/gtk/res/ssl.gtk2.ui
deleted file mode 100644
index 90f449ddd..000000000
--- a/frontends/gtk/res/ssl.gtk2.ui
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="wndSSLProblem">
- <property name="border_width">1</property>
- <property name="title" translatable="yes">SSL certificate problem</property>
- <property name="modal">True</property>
- <property name="default_width">500</property>
- <property name="default_height">250</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <child>
- <object class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <child>
- <object class="GtkImage" id="image6">
- <property name="visible">True</property>
- <property name="yalign">0</property>
- <property name="icon_size">6</property>
- <property name="icon_name">gtk-dialog-warning</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox13">
- <property name="visible">True</property>
- <child>
- <object class="GtkLabel" id="label62">
- <property name="visible">True</property>
- <property name="label" translatable="yes">NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below.</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame13">
- <property name="visible">True</property>
- <property name="border_width">5</property>
- <property name="label_xalign">0</property>
- <child>
- <object class="GtkAlignment" id="alignment17">
- <property name="visible">True</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkScrolledWindow" id="SSLScrolled">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <child>
- <object class="GtkViewport" id="SSLViewport">
- <property name="visible">True</property>
- <property name="resize_mode">GTK_RESIZE_QUEUE</property>
- <child>
- <object class="GtkDrawingArea" id="SSLDrawingArea">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label63">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Certificate chain&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="sslreject">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment16">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox14">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="stock">gtk-cancel</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label61">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reject</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="sslaccept">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <child>
- <object class="GtkAlignment" id="alignment15">
- <property name="visible">True</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <child>
- <object class="GtkHBox" id="hbox13">
- <property name="visible">True</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-apply</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label60">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Accept</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">sslreject</action-widget>
- <action-widget response="-5">sslaccept</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/frontends/gtk/res/ssl.gtk3.ui b/frontends/gtk/res/ssl.gtk3.ui
deleted file mode 100644
index dace2a49e..000000000
--- a/frontends/gtk/res/ssl.gtk3.ui
+++ /dev/null
@@ -1,181 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
- <!-- interface-requires gtk+ 3.0 -->
- <object class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-apply</property>
- </object>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="stock">gtk-cancel</property>
- </object>
- <object class="GtkDialog" id="wndSSLProblem">
- <property name="can_focus">False</property>
- <property name="border_width">5</property>
- <property name="default_width">440</property>
- <property name="default_height">260</property>
- <property name="destroy_with_parent">True</property>
- <property name="type_hint">dialog</property>
- <child internal-child="vbox">
- <object class="GtkBox" id="dialog-vbox1">
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="spacing">2</property>
- <child internal-child="action_area">
- <object class="GtkButtonBox" id="dialog-action_area1">
- <property name="can_focus">False</property>
- <property name="layout_style">end</property>
- <child>
- <object class="GtkButton" id="sslreject">
- <property name="label" translatable="yes">_Reject</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image3</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="sslaccept">
- <property name="label" translatable="yes">_Accept</property>
- <property name="use_action_appearance">False</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="image">image2</property>
- <property name="use_underline">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">end</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkBox" id="box1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <child>
- <object class="GtkBox" id="box2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="margin_right">8</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon-size">6</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below.</property>
- <property name="wrap">True</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">none</property>
- <child>
- <object class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="left_padding">12</property>
- <child>
- <object class="GtkScrolledWindow" id="SSLScrolled">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="shadow_type">in</property>
- <child>
- <object class="GtkViewport" id="SSLViewport">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <child>
- <object class="GtkDrawingArea" id="SSLDrawingArea">
- <property name="visible">True</property>
- <property name="app_paintable">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_EXPOSURE_MASK | GDK_POINTER_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_LEAVE_NOTIFY_MASK | GDK_STRUCTURE_MASK</property>
- <property name="valign">start</property>
- <property name="hexpand">True</property>
- <property name="vexpand">True</property>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="label" translatable="yes">&lt;b&gt;Certificate Chain&lt;/b&gt;</property>
- <property name="use_markup">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">1</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-6">sslreject</action-widget>
- <action-widget response="-5">sslaccept</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/frontends/gtk/resources.c b/frontends/gtk/resources.c
index 18f0e374f..432ddb8b5 100644
--- a/frontends/gtk/resources.c
+++ b/frontends/gtk/resources.c
@@ -77,7 +77,6 @@ static struct nsgtk_resource_s ui_resource[] = {
RES_ENTRY("netsurf"),
RES_ENTRY("tabcontents"),
RES_ENTRY("password"),
- RES_ENTRY("ssl"),
RES_ENTRY("toolbar"),
RES_ENTRY("downloads"),
RES_ENTRY("globalhistory"),
diff --git a/frontends/monkey/Makefile b/frontends/monkey/Makefile
index 85bc9b5ae..d2dae3e16 100644
--- a/frontends/monkey/Makefile
+++ b/frontends/monkey/Makefile
@@ -51,7 +51,7 @@ endif
# S_MONKEY are sources purely for the MONKEY build
S_FRONTEND := main.c output.c filetype.c schedule.c bitmap.c plot.c browser.c \
- download.c 401login.c cert.c layout.c dispatch.c fetch.c
+ download.c 401login.c layout.c dispatch.c fetch.c
# This is the final source build list
diff --git a/frontends/monkey/cert.c b/frontends/monkey/cert.c
deleted file mode 100644
index 3ec2fbee0..000000000
--- a/frontends/monkey/cert.c
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * Copyright 2011 Daniel Silverstone <dsilvers@digital-scurf.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/>.
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include "utils/ring.h"
-#include "utils/nsurl.h"
-#include "content/urldb.h"
-
-#include "monkey/output.h"
-#include "monkey/cert.h"
-
-struct monkey_cert {
- struct monkey_cert *r_next, *r_prev;
- uint32_t num;
- nserror (*cb)(bool,void*);
- void *cbpw;
- nsurl *url;
-};
-
-static struct monkey_cert *cert_ring = NULL;
-static uint32_t cert_ctr = 0;
-
-nserror
-gui_cert_verify(nsurl *url,
- const struct cert_chain *chain,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct monkey_cert *mcrt_ctx;
-
- mcrt_ctx = calloc(sizeof(*mcrt_ctx), 1);
- if (mcrt_ctx == NULL) {
- return NSERROR_NOMEM;
- }
-
- mcrt_ctx->cb = cb;
- mcrt_ctx->cbpw = cbpw;
- mcrt_ctx->num = cert_ctr++;
- mcrt_ctx->url = nsurl_ref(url);
-
- RING_INSERT(cert_ring, mcrt_ctx);
-
- moutf(MOUT_SSLCERT, "VERIFY CWIN %u URL %s",
- mcrt_ctx->num, nsurl_access(url));
-
- return NSERROR_OK;
-}
-
-
-static struct monkey_cert *
-monkey_find_sslcert_by_num(uint32_t sslcert_num)
-{
- struct monkey_cert *ret = NULL;
-
- RING_ITERATE_START(struct monkey_cert, cert_ring, c_ring) {
- if (c_ring->num == sslcert_num) {
- ret = c_ring;
- RING_ITERATE_STOP(cert_ring, c_ring);
- }
- } RING_ITERATE_END(cert_ring, c_ring);
-
- return ret;
-}
-
-static void free_sslcert_context(struct monkey_cert *mcrt_ctx) {
- moutf(MOUT_SSLCERT, "DESTROY CWIN %u", mcrt_ctx->num);
- RING_REMOVE(cert_ring, mcrt_ctx);
- if (mcrt_ctx->url) {
- nsurl_unref(mcrt_ctx->url);
- }
- free(mcrt_ctx);
-}
-
-static void
-monkey_sslcert_handle_go(int argc, char **argv)
-{
- struct monkey_cert *mcrt_ctx;
-
- if (argc != 3) {
- moutf(MOUT_ERROR, "SSLCERT GO ARGS BAD");
- return;
- }
-
- mcrt_ctx = monkey_find_sslcert_by_num(atoi(argv[2]));
- if (mcrt_ctx == NULL) {
- moutf(MOUT_ERROR, "SSLCERT NUM BAD");
- return;
- }
-
- urldb_set_cert_permissions(mcrt_ctx->url, true);
-
- mcrt_ctx->cb(true, mcrt_ctx->cbpw);
-
- free_sslcert_context(mcrt_ctx);
-}
-
-static void
-monkey_sslcert_handle_destroy(int argc, char **argv)
-{
- struct monkey_cert *mcrt_ctx;
-
- if (argc != 3) {
- moutf(MOUT_ERROR, "SSLCERT DESTROY ARGS BAD");
- return;
- }
-
- mcrt_ctx = monkey_find_sslcert_by_num(atoi(argv[2]));
- if (mcrt_ctx == NULL) {
- moutf(MOUT_ERROR, "SSLCERT NUM BAD");
- return;
- }
-
- mcrt_ctx->cb(false, mcrt_ctx->cbpw);
-
- free_sslcert_context(mcrt_ctx);
-}
-
-void
-monkey_sslcert_handle_command(int argc, char **argv)
-{
- if (argc == 1)
- return;
-
- if (strcmp(argv[1], "DESTROY") == 0) {
- monkey_sslcert_handle_destroy(argc, argv);
- } else if (strcmp(argv[1], "GO") == 0) {
- monkey_sslcert_handle_go(argc, argv);
- } else {
- moutf(MOUT_ERROR, "SSLCERT COMMAND UNKNOWN %s", argv[1]);
- }
-}
diff --git a/frontends/monkey/cert.h b/frontends/monkey/cert.h
deleted file mode 100644
index ff499ed16..000000000
--- a/frontends/monkey/cert.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright 2012 Vincent Sanders <vince@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_MONKEY_CERT_H
-#define NETSURF_MONKEY_CERT_H
-
-struct cert_chain;
-
-nserror gui_cert_verify(nsurl *url, const struct cert_chain *certs,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw);
-
-
-void monkey_sslcert_handle_command(int argc, char **argv);
-
-#endif
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
index 3fd06960a..6ff480cbc 100644
--- a/frontends/monkey/main.c
+++ b/frontends/monkey/main.c
@@ -43,7 +43,6 @@
#include "monkey/output.h"
#include "monkey/dispatch.h"
#include "monkey/browser.h"
-#include "monkey/cert.h"
#include "monkey/401login.h"
#include "monkey/filetype.h"
#include "monkey/fetch.h"
@@ -250,7 +249,6 @@ static struct gui_misc_table monkey_misc_table = {
.quit = monkey_quit,
.launch_url = gui_launch_url,
- .cert_verify = gui_cert_verify,
.login = gui_401login_open,
};
@@ -464,11 +462,6 @@ main(int argc, char **argv)
die("login handler failed to register");
}
- ret = monkey_register_handler("SSLCERT", monkey_sslcert_handle_command);
- if (ret != NSERROR_OK) {
- die("sslcert handler failed to register");
- }
-
moutf(MOUT_GENERIC, "STARTED");
monkey_run();
diff --git a/frontends/monkey/output.c b/frontends/monkey/output.c
index a3390ea35..d7eb7cdb6 100644
--- a/frontends/monkey/output.c
+++ b/frontends/monkey/output.c
@@ -31,7 +31,6 @@ static const char *type_text[]={
"GENERIC",
"WINDOW",
"LOGIN",
- "SSLCERT",
"DOWNLOAD",
"PLOT",
};
diff --git a/frontends/monkey/output.h b/frontends/monkey/output.h
index 5e77ab3ac..8e6a0abd6 100644
--- a/frontends/monkey/output.h
+++ b/frontends/monkey/output.h
@@ -26,7 +26,6 @@ enum monkey_output_type {
MOUT_GENERIC,
MOUT_WINDOW,
MOUT_LOGIN,
- MOUT_SSLCERT,
MOUT_DOWNLOAD,
MOUT_PLOT,
};
diff --git a/frontends/riscos/Makefile b/frontends/riscos/Makefile
index c6b551f11..0638fc943 100644
--- a/frontends/riscos/Makefile
+++ b/frontends/riscos/Makefile
@@ -53,7 +53,7 @@ S_FRONTEND := assert.c bitmap.c buffer.c configure.c gui.c \
search.c searchweb.c textarea.c textselection.c theme.c \
theme_install.c toolbar.c url_suggest.c wimp.c wimp_event.c \
ucstables.c uri.c url_complete.c url_protocol.c window.c \
- corewindow.c cookies.c sslcert.c hotlist.c \
+ corewindow.c cookies.c hotlist.c \
local_history.c global_history.c \
$(addprefix content-handlers/,artworks.c awrender.s draw.c \
sprite.c) \
diff --git a/frontends/riscos/dialog.c b/frontends/riscos/dialog.c
index f0bcb5940..df5770c34 100644
--- a/frontends/riscos/dialog.c
+++ b/frontends/riscos/dialog.c
@@ -51,7 +51,6 @@
#include "riscos/hotlist.h"
#include "riscos/menus.h"
#include "riscos/save.h"
-#include "riscos/sslcert.h"
#include "riscos/toolbar.h"
#include "riscos/url_complete.h"
#include "riscos/url_suggest.h"
@@ -178,9 +177,6 @@ void ro_gui_dialog_init(void)
* associated dialogues to be set up first.
*/
- /* certificate verification window */
- ro_gui_cert_initialise();
-
/* hotlist window */
ro_gui_hotlist_initialise();
diff --git a/frontends/riscos/gui.c b/frontends/riscos/gui.c
index ff13a58aa..458f49108 100644
--- a/frontends/riscos/gui.c
+++ b/frontends/riscos/gui.c
@@ -73,7 +73,6 @@
#include "riscos/query.h"
#include "riscos/window.h"
#include "riscos/iconbar.h"
-#include "riscos/sslcert.h"
#include "riscos/local_history.h"
#include "riscos/global_history.h"
#include "riscos/cookies.h"
diff --git a/frontends/riscos/gui.h b/frontends/riscos/gui.h
index a7b632334..831c57dc7 100644
--- a/frontends/riscos/gui.h
+++ b/frontends/riscos/gui.h
@@ -44,7 +44,6 @@ struct tree;
struct node;
struct history;
struct css_style;
-struct ssl_cert_info;
struct nsurl;
struct hlcache_handle;
diff --git a/frontends/riscos/sslcert.c b/frontends/riscos/sslcert.c
deleted file mode 100644
index 815f7e910..000000000
--- a/frontends/riscos/sslcert.c
+++ /dev/null
@@ -1,415 +0,0 @@
-/*
- * Copyright 2006 John M Bell <jmb202@ecs.soton.ac.uk>
- * Copyright 2016 Vincent Sanders <vince@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 RISC OS certificate verification UI.
- */
-
-#include <oslib/wimp.h>
-
-#include "utils/log.h"
-#include "utils/nsurl.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "riscos/dialog.h"
-#include "riscos/wimp.h"
-#include "riscos/wimp_event.h"
-#include "riscos/wimputils.h"
-#include "riscos/gui.h"
-#include "riscos/toolbar.h"
-#include "riscos/corewindow.h"
-#include "riscos/sslcert.h"
-
-/* widget ID */
-#define ICON_SSL_PANE 1
-#define ICON_SSL_REJECT 3
-#define ICON_SSL_ACCEPT 4
-
-/**
- * RISC OS certificate viewer context.
- */
-struct ro_cert_window {
- struct ro_corewindow core;
-
- /** certificate view window handle */
- wimp_w wh;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-
-};
-
-/** riscos dialog template for certificate viewer window. */
-static wimp_window *dialog_cert_template;
-
-/** riscos template for certificate tree pane. */
-static wimp_window *cert_tree_template;
-
-
-/**
- * Handle closing of the RISC OS certificate verification dialog
- *
- * Deleting wimp windows, freeing up the core window and ssl data block.
- *
- * \param certw The context associated with the dialogue.
- */
-static void ro_gui_cert_release_window(struct ro_cert_window *certw)
-{
- os_error *error;
-
- ro_gui_wimp_event_finalise(certw->wh);
-
- sslcert_viewer_fini(certw->ssl_data);
-
- ro_corewindow_fini(&certw->core);
-
- error = xwimp_delete_window(certw->wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x:%s",
- error->errnum, error->errmess);
- }
-
- error = xwimp_delete_window(certw->core.wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_delete_window: 0x%x:%s",
- error->errnum, error->errmess);
- }
-
- free(certw);
-}
-
-/**
- * Handle acceptance of certificate via event callback.
- *
- * \param pointer The wimp pointer event.
- */
-static void ro_gui_cert_accept(wimp_pointer *pointer)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_gui_wimp_event_get_user_data(pointer->w);
-
- sslcert_viewer_accept(certw->ssl_data);
- ro_gui_dialog_close(certw->wh);
- ro_gui_cert_release_window(certw);
-}
-
-
-/**
- * Handle rejection of certificate via event callback.
- *
- * \param pointer The wimp pointer block.
- */
-static void ro_gui_cert_reject(wimp_pointer *pointer)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_gui_wimp_event_get_user_data(pointer->w);
-
- sslcert_viewer_reject(certw->ssl_data);
- ro_gui_dialog_close(certw->wh);
- ro_gui_cert_release_window(certw);
-}
-
-
-/**
- * Callback to handle the closure of the SSL dialogue by other means.
- *
- * \param w The window handle being closed.
- */
-static void ro_gui_cert_close_window(wimp_w w)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_gui_wimp_event_get_user_data(w);
-
- ro_gui_cert_release_window(certw);
-}
-
-
-/**
- * Attach tree window as a pane to ssl window.
- *
- * Nest the tree window inside the pane window. To do this, we:
- * - Get the current pane extent,
- * - Get the parent window position and the location of the pane-
- * locating icon inside it,
- * - Set the visible area of the pane to suit,
- * - Check that the pane extents are OK for this visible area, and
- * increase them if necessary,
- * - Before finally opening the pane as a nested part of the parent.
- *
- */
-static nserror cert_attach_pane(wimp_w parent, wimp_w pane)
-{
- os_error *error;
- wimp_window_state wstate;
- wimp_window_info winfo;
- wimp_icon_state istate;
- bool set_extent;
-
- winfo.w = pane;
- error = xwimp_get_window_info_header_only(&winfo);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_window_info: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- wstate.w = parent;
- error = xwimp_get_window_state(&wstate);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_window_state: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- istate.w = parent;
- istate.i = ICON_SSL_PANE;
- error = xwimp_get_icon_state(&istate);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_get_icon_state: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- wstate.w = pane;
- wstate.visible.x1 = wstate.visible.x0 + istate.icon.extent.x1 - 20 - ro_get_vscroll_width(pane);
- wstate.visible.x0 += istate.icon.extent.x0 + 20;
- wstate.visible.y0 = wstate.visible.y1 + istate.icon.extent.y0 + 20 + ro_get_hscroll_height(pane);
- wstate.visible.y1 += istate.icon.extent.y1 - 32;
-
- set_extent = false;
-
- if ((winfo.extent.x1 - winfo.extent.x0) <
- (wstate.visible.x1 - wstate.visible.x0)) {
- winfo.extent.x0 = 0;
- winfo.extent.x1 = wstate.visible.x1 - wstate.visible.x0;
- set_extent = true;
- }
- if ((winfo.extent.y1 - winfo.extent.y0) <
- (wstate.visible.y1 - wstate.visible.y0)) {
- winfo.extent.y1 = 0;
- winfo.extent.x1 = wstate.visible.y0 - wstate.visible.y1;
- set_extent = true;
- }
-
- if (set_extent) {
- error = xwimp_set_extent(pane, &(winfo.extent));
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_set_extent: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
- }
-
- error = xwimp_open_window_nested(
- PTR_WIMP_OPEN(&wstate),
- parent,
- wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_XORIGIN_SHIFT |
- wimp_CHILD_LINKS_PARENT_VISIBLE_TOP_OR_RIGHT << wimp_CHILD_YORIGIN_SHIFT |
- wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_LS_EDGE_SHIFT |
- wimp_CHILD_LINKS_PARENT_VISIBLE_BOTTOM_OR_LEFT << wimp_CHILD_RS_EDGE_SHIFT);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_open_window_nested: 0x%x: %s",
- error->errnum, error->errmess);
- return NSERROR_INIT_FAILED;
- }
-
- return NSERROR_OK;
-}
-
-
-/**
- * Callback to draw on drawable area of ro certificate viewer window.
- *
- * \param ro_cw The riscos core window structure.
- * \param originx The risc os plotter x origin.
- * \param originy The risc os plotter y origin.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise apropriate error code
- */
-static nserror
-cert_draw(struct ro_corewindow *ro_cw, int originx, int originy, struct rect *r)
-{
- struct ro_cert_window *certw;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &ro_plotters
- };
-
- certw = (struct ro_cert_window *)ro_cw;
-
- ro_plot_origin_x = originx;
- ro_plot_origin_y = originy;
- no_font_blending = true;
- sslcert_viewer_redraw(certw->ssl_data, 0, 0, r, &ctx);
- no_font_blending = false;
-
- return NSERROR_OK;
-}
-
-
-/**
- * callback for keypress on ro certificate viewer window
- *
- * \param ro_cw The ro core window structure.
- * \param nskey The netsurf key code.
- * \return NSERROR_OK if key processed,
- * NSERROR_NOT_IMPLEMENTED if key not processed
- * otherwise apropriate error code
- */
-static nserror cert_key(struct ro_corewindow *ro_cw, uint32_t nskey)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_cw;
-
- if (sslcert_viewer_keypress(certw->ssl_data, nskey)) {
- return NSERROR_OK;
- }
- return NSERROR_NOT_IMPLEMENTED;
-}
-
-
-/**
- * callback for mouse event on ro certificate viewer window
- *
- * \param ro_cw The ro core window structure.
- * \param mouse_state mouse state
- * \param x location of event
- * \param y location of event
- * \return NSERROR_OK on sucess otherwise apropriate error code.
- */
-static nserror
-cert_mouse(struct ro_corewindow *ro_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct ro_cert_window *certw;
- certw = (struct ro_cert_window *)ro_cw;
-
- sslcert_viewer_mouse_action(certw->ssl_data, mouse_state, x, y);
-
- return NSERROR_OK;
-}
-
-/* exported interface documented in riscos/sslcert.h */
-nserror
-gui_cert_verify(nsurl *url,
- const struct cert_chain *chain,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- os_error *error;
- struct ro_cert_window *ncwin; /* new certificate window */
- nserror res;
-
- ncwin = malloc(sizeof(struct ro_cert_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- /* initialise certificate viewing interface */
- res = sslcert_viewer_create_session_data(url, cb, cbpw, chain,
- &ncwin->ssl_data);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- /* Create the SSL window */
- error = xwimp_create_window(dialog_cert_template, &ncwin->wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
- error->errnum, error->errmess);
- free(ncwin);
- return NSERROR_INIT_FAILED;
- }
-
- /* create ssl viewer pane window */
- error = xwimp_create_window(cert_tree_template, &ncwin->core.wh);
- if (error) {
- NSLOG(netsurf, INFO, "xwimp_create_window: 0x%x: %s",
- error->errnum, error->errmess);
- free(ncwin);
- return NSERROR_INIT_FAILED;
- }
-
- /* setup callbacks */
- ncwin->core.draw = cert_draw;
- ncwin->core.key = cert_key;
- ncwin->core.mouse = cert_mouse;
-
- /* initialise core window */
- res = ro_corewindow_init(&ncwin->core, NULL, NULL, 0, NULL);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- /* Set up the certificate window event handling.
- *
- * (The action buttons are registered as button events, not OK and
- * Cancel, as both need to carry out actions.)
- */
- ro_gui_wimp_event_set_user_data(ncwin->wh, ncwin);
- ro_gui_wimp_event_register_close_window(ncwin->wh,
- ro_gui_cert_close_window);
- ro_gui_wimp_event_register_button(ncwin->wh,
- ICON_SSL_REJECT,
- ro_gui_cert_reject);
- ro_gui_wimp_event_register_button(ncwin->wh,
- ICON_SSL_ACCEPT,
- ro_gui_cert_accept);
-
- ro_gui_dialog_open_persistent(NULL, ncwin->wh, false);
-
- res = cert_attach_pane(ncwin->wh, ncwin->core.wh);
- if (res != NSERROR_OK) {
- ro_gui_cert_release_window(ncwin);
- }
-
- return res;
-}
-
-
-/* exported interface documented in riscos/sslcert.h */
-void ro_gui_cert_initialise(void)
-{
- /* Load template for the SSL certificate window */
- dialog_cert_template = ro_gui_dialog_load_template("sslcert");
-
- /* load template for ssl treeview pane and adjust the window flags. */
- cert_tree_template = ro_gui_dialog_load_template("tree");
-
- cert_tree_template->flags &= ~(wimp_WINDOW_MOVEABLE |
- wimp_WINDOW_BACK_ICON |
- wimp_WINDOW_CLOSE_ICON |
- wimp_WINDOW_TITLE_ICON |
- wimp_WINDOW_SIZE_ICON |
- wimp_WINDOW_TOGGLE_ICON);
-}
diff --git a/frontends/riscos/sslcert.h b/frontends/riscos/sslcert.h
deleted file mode 100644
index 613db1a47..000000000
--- a/frontends/riscos/sslcert.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright 2006 Richard Wilson <info@tinct.net>
- * Copyright 2010 Stephen Fryatt <stevef@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
- * RISC OS SSL certificate viewer interface.
- */
-
-#ifndef NETSURF_RISCOS_SSLCERT_H
-#define NETSURF_RISCOS_SSLCERT_H
-
-struct node;
-
-/**
- * Load and initialise the certificate window template.
- */
-void ro_gui_cert_initialise(void);
-
-/**
- * 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
- */
-nserror gui_cert_verify(struct nsurl *url, const struct cert_chain *chain, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-#endif
-
diff --git a/frontends/riscos/templates/de b/frontends/riscos/templates/de
index ef67b2cbf..954853cba 100644
--- a/frontends/riscos/templates/de
+++ b/frontends/riscos/templates/de
@@ -3281,254 +3281,6 @@ wimp_window {
}
wimp_window {
- template_name:"ssldisplay"
- visible:212,142,1172,682
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_FULL_SIZE | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,960,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:960
- ymin:76
- text.text:"SSL Zertifikat"
- text.size:16
- text.validation:""
- wimp_icon {
- extent:432,-168,928,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:16,-520,944,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:24,-108,148,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Version"
- }
- wimp_icon {
- extent:152,-108,264,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:260,-104,432,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"gültig von"
- }
- wimp_icon {
- extent:432,-108,928,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:68,-168,148,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Typ"
- }
- wimp_icon {
- extent:152,-168,264,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:244,-164,432,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"gültig bis"
- }
- wimp_icon {
- extent:32,-52,380,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate details "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:40,-228,148,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Serial"
- }
- wimp_icon {
- extent:152,-228,928,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:40,-288,148,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Issuer"
- }
- wimp_icon {
- extent:152,-376,928,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:24,-432,148,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Subject"
- }
- wimp_icon {
- extent:152,-504,928,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
- template_name:"sslcert"
- visible:348,306,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_FULL_SIZE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-592,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:592
- text.text:"SSL Zertifizierungsproblem"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-108,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf konnte ein SSL Zertifikat nicht prüfen. Bitte die Details unten beachten."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-484,772,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-164,380,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate chain "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-564,568,-512
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Ablehnen"
- text.size:*
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-572,772,-504
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Annehmen"
- text.size:12
- text.validation:"R6,3"
- }
-}
-
-wimp_window {
template_name:"con_content"
visible:1404,424,2044,924
xscroll:0
diff --git a/frontends/riscos/templates/en b/frontends/riscos/templates/en
index 8db0f948f..e17827959 100644
--- a/frontends/riscos/templates/en
+++ b/frontends/riscos/templates/en
@@ -2801,178 +2801,6 @@ wimp_window {
}
wimp_window {
- template_name:"ssldisplay"
- visible:862,768,1822,1308
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,960,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:960
- ymin:76
- text.text:"SSL certificate"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-520,944,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-52,380,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate details "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:24,-108,148,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Version"
- }
- wimp_icon {
- extent:152,-108,264,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:284,-104,456,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Valid from"
- }
- wimp_icon {
- extent:460,-108,928,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:68,-168,148,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Type"
- }
- wimp_icon {
- extent:152,-168,264,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:268,-164,456,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Valid until"
- }
- wimp_icon {
- extent:460,-168,928,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:40,-228,148,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Serial"
- }
- wimp_icon {
- extent:152,-228,928,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:40,-288,148,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Issuer"
- }
- wimp_icon {
- extent:152,-376,928,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:24,-432,148,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Subject"
- }
- wimp_icon {
- extent:152,-504,928,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
template_name:"con_secure"
visible:1590,788,2182,1152
xscroll:0
@@ -3592,78 +3420,3 @@ wimp_window {
}
}
-wimp_window {
- template_name:"sslcert"
- visible:348,306,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-592,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:592
- text.text:"SSL certificate problem"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-108,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf failed to verify the authenticity of an SSL certificate. Please verify the details presented below."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-484,772,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-164,380,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificate chain "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-564,568,-512
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Reject"
- text.size:*
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-572,772,-504
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Accept"
- text.size:8
- text.validation:"R6,3"
- }
-}
diff --git a/frontends/riscos/templates/fr b/frontends/riscos/templates/fr
index 9ca0d7cb7..22a577d10 100644
--- a/frontends/riscos/templates/fr
+++ b/frontends/riscos/templates/fr
@@ -3438,253 +3438,3 @@ wimp_window {
}
}
-
-wimp_window {
- template_name:"ssldisplay"
- visible:282,178,1242,718
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,960,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:960
- ymin:76
- text.text:"Certificat SSL"
- text.size:16
- text.validation:""
- wimp_icon {
- extent:16,-520,944,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-52,412,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Détails de certificat "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:68,-108,192,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Version"
- }
- wimp_icon {
- extent:200,-108,312,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:384,-104,524,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Valide de"
- }
- wimp_icon {
- extent:524,-108,928,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:112,-168,192,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Type"
- }
- wimp_icon {
- extent:200,-168,312,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:328,-164,524,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Valide jusqu'à"
- text.size:*
- text.validation:""
- }
- wimp_icon {
- extent:524,-168,928,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:84,-228,192,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Série"
- }
- wimp_icon {
- extent:200,-228,928,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2"
- }
- wimp_icon {
- extent:32,-288,200,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Fournisseur"
- }
- wimp_icon {
- extent:200,-376,928,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:68,-432,192,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Sujet"
- }
- wimp_icon {
- extent:200,-504,928,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
- template_name:"sslcert"
- visible:348,306,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-592,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:592
- text.text:"Problème de certificat SSL"
- text.size:*
- text.validation:""
- wimp_icon {
- extent:16,-108,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf n'a pas pu vérifier l'authenticité d'un certificat SSL. Vérifiez SVP les détails présentés ci-dessous."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-484,772,-136
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:*
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-164,380,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:"Chaîne de certificat "
- text_and_sprite.size:*
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-564,568,-512
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Rejeter"
- text.size:*
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-572,772,-504
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Accepter"
- text.size:*
- text.validation:"R6,3"
- }
-}
diff --git a/frontends/riscos/templates/nl b/frontends/riscos/templates/nl
index a3426a1d2..0fa95b5ff 100644
--- a/frontends/riscos/templates/nl
+++ b/frontends/riscos/templates/nl
@@ -2847,180 +2847,6 @@ wimp_window {
}
wimp_window {
- template_name:"ssldisplay"
- visible:862,768,1870,1308
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_CLOSE_ICON | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-540,1008,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:1008
- ymin:76
- text.text:"SSL-certificaat"
- text.size:16
- text.validation:""
- wimp_icon {
- extent:16,-520,992,-24
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-52,380,-8
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificaatedetails "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:72,-108,196,-64
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Versie"
- }
- wimp_icon {
- extent:200,-108,312,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:320,-104,528,-60
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Geldig vanaf"
- text.size:13
- text.validation:""
- }
- wimp_icon {
- extent:532,-108,976,-56
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:116,-168,196,-124
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Type"
- }
- wimp_icon {
- extent:200,-168,312,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:340,-164,528,-120
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Geldig tot"
- }
- wimp_icon {
- extent:532,-168,976,-116
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:68,-228,196,-184
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Serienr"
- }
- wimp_icon {
- extent:200,-228,976,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2"
- }
- wimp_icon {
- extent:56,-288,196,-244
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Uitgever"
- }
- wimp_icon {
- extent:200,-376,976,-236
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:24,-432,196,-388
- icon_flags:wimp_ICON_TEXT | wimp_ICON_VCENTRED | wimp_ICON_RJUSTIFIED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_only:"Onderwerp"
- }
- wimp_icon {
- extent:200,-504,976,-384
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R2;L"
- }
-}
-
-wimp_window {
template_name:"con_secure"
visible:1590,788,2206,1152
xscroll:0
@@ -3640,78 +3466,3 @@ wimp_window {
}
}
-wimp_window {
- template_name:"sslcert"
- visible:348,250,1136,898
- xscroll:0
- yscroll:0
- next:wimp_TOP
- window_flags:wimp_WINDOW_MOVEABLE | wimp_WINDOW_AUTO_REDRAW | wimp_WINDOW_BOUNDED_ONCE | wimp_WINDOW_TITLE_ICON | wimp_WINDOW_NEW_FORMAT
- title_fg:wimp_COLOUR_BLACK
- title_bg:wimp_COLOUR_LIGHT_GREY
- work_fg:wimp_COLOUR_BLACK
- work_bg:wimp_COLOUR_VERY_LIGHT_GREY
- scroll_outer:wimp_COLOUR_MID_LIGHT_GREY
- scroll_inner:wimp_COLOUR_VERY_LIGHT_GREY
- highlight_bg:wimp_COLOUR_CREAM
- extra_flags:
- extent:0,-648,788,0
- title_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | 0x27000000
- work_flags:
- sprite_area:&1
- xmin:788
- ymin:648
- text.text:"SSL-certificaatprobleem"
- text.size:24
- text.validation:""
- wimp_icon {
- extent:16,-148,772,-16
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"NetSurf kan de rechtmatigheid van een SSL-certificaat niet verifiëren. Verifieer de details hieronder."
- text.size:150
- text.validation:"R2;L"
- }
- wimp_icon {
- extent:16,-548,772,-176
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:""
- text.size:1
- text.validation:"R4"
- }
- wimp_icon {
- extent:32,-204,380,-160
- icon_flags:wimp_ICON_TEXT | wimp_ICON_SPRITE | wimp_ICON_VCENTRED | wimp_ICON_INDIRECTED
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text_and_sprite.text:" Certificaatketen "
- text_and_sprite.size:22
- text_and_sprite.validation:""
- }
- wimp_icon {
- extent:404,-624,568,-572
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Verwerp"
- text.size:8
- text.validation:"R5,3"
- }
- wimp_icon {
- extent:588,-632,772,-564
- icon_flags:wimp_ICON_TEXT | wimp_ICON_BORDER | wimp_ICON_HCENTRED | wimp_ICON_VCENTRED | wimp_ICON_FILLED | wimp_ICON_INDIRECTED | wimp_BUTTON_CLICK
- icon_esg:0
- icon_fg:wimp_COLOUR_BLACK
- icon_bg:wimp_COLOUR_VERY_LIGHT_GREY
- text.text:"Accepteer"
- text.size:10
- text.validation:"R6,3"
- }
-}
diff --git a/frontends/windows/Makefile b/frontends/windows/Makefile
index ceb430867..80a947867 100644
--- a/frontends/windows/Makefile
+++ b/frontends/windows/Makefile
@@ -55,7 +55,7 @@ S_RESOURCES := windows_resource.o
S_FRONTEND := main.c window.c gui.c clipboard.c drawable.c plot.c findfile.c \
font.c bitmap.c about.c prefs.c download.c fetch.c file.c \
local_history.c schedule.c windbg.c pointers.c \
- corewindow.c hotlist.c cookies.c global_history.c ssl_cert.c
+ corewindow.c hotlist.c cookies.c global_history.c
# This is the final source build list
# Note this is deliberately *not* expanded here as common and image
diff --git a/frontends/windows/main.c b/frontends/windows/main.c
index eb0a8661e..24362df09 100644
--- a/frontends/windows/main.c
+++ b/frontends/windows/main.c
@@ -45,7 +45,6 @@
#include "windows/file.h"
#include "windows/drawable.h"
#include "windows/corewindow.h"
-#include "windows/ssl_cert.h"
#include "windows/download.h"
#include "windows/local_history.h"
#include "windows/window.h"
@@ -463,7 +462,6 @@ WinMain(HINSTANCE hInstance, HINSTANCE hLastInstance, LPSTR lpcli, int ncmd)
ret = nsws_create_main_class(hInstance);
ret = nsws_create_drawable_class(hInstance);
ret = nsw32_create_corewindow_class(hInstance);
- ret = nsws_create_cert_verify_class(hInstance);
nsoption_set_bool(target_blank, false);
diff --git a/frontends/windows/resourceid.h b/frontends/windows/resourceid.h
index 2933b1513..db275913b 100644
--- a/frontends/windows/resourceid.h
+++ b/frontends/windows/resourceid.h
@@ -89,11 +89,6 @@
#define IDC_PREFS_FONTDEF 1220
#define IDC_PREFS_NOANIMATION 1227
-#define IDD_SSLCERT 1600
-#define IDC_SSLCERT_IMG1 1601
-#define IDC_SSLCERT_BTN_ACCEPT 1602
-#define IDC_SSLCERT_BTN_REJECT 1603
-
#define IDD_LOGIN 1700
#define IDC_LOGIN_USERNAME 1701
#define IDC_LOGIN_PASSWORD 1702
diff --git a/frontends/windows/ssl_cert.c b/frontends/windows/ssl_cert.c
deleted file mode 100644
index 1e7887138..000000000
--- a/frontends/windows/ssl_cert.c
+++ /dev/null
@@ -1,469 +0,0 @@
-/*
- * Copyright 2016 Vincent Sanders <vince@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 win32 certificate viewing using nsw32 core windows.
- */
-
-#include <stdint.h>
-#include <stdlib.h>
-#include <windows.h>
-
-#include "utils/log.h"
-#include "utils/nsoption.h"
-#include "netsurf/keypress.h"
-#include "netsurf/plotters.h"
-#include "desktop/sslcert_viewer.h"
-
-#include "windows/windbg.h"
-#include "windows/plot.h"
-#include "windows/corewindow.h"
-#include "windows/gui.h"
-#include "windows/resourceid.h"
-#include "windows/ssl_cert.h"
-
-/* spacing and sizes for dialog elements from
- * https://msdn.microsoft.com/en-us/library/windows/desktop/dn742486(v=vs.85).aspx#sizingandspacing
- */
-/** dialog margin */
-#define DLG_MRGN 11
-/** warning icon height */
-#define WRN_ICO_H 32
-/** comand button width */
-#define CMD_BTN_W 75
-/** command button height */
-#define CMD_BTN_H 23
-
-static const char windowclassname_sslcert[] = "nswssslcertwindow";
-
-/** win32 ssl certificate view context */
-struct nsw32_sslcert_window {
- struct nsw32_corewindow core;
-
- /** SSL certificate viewer context data */
- struct sslcert_session_data *ssl_data;
-
- /** dialog window handle */
- HWND hWnd;
-
- /** accept button handle */
- HWND hAccept;
-
- /** reject button handle */
- HWND hReject;
-
- /** warning text handle */
- HWND hTxt;
-};
-
-
-/**
- * callback for keypress on ssl certificate window
- *
- * \param nsw32_cw The nsw32 core window structure.
- * \param nskey The netsurf key code
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_key(struct nsw32_corewindow *nsw32_cw, uint32_t nskey)
-{
- struct nsw32_sslcert_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsw32_sslcert_window *)nsw32_cw;
-
- if (sslcert_viewer_keypress(crtvrfy_win->ssl_data, nskey)) {
- return NSERROR_OK;
- }
- return NSERROR_NOT_IMPLEMENTED;
-}
-
-
-/**
- * callback for mouse action on ssl certificate window
- *
- * \param nsw32_cw The nsw32 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
-nsw32_sslcert_viewer_mouse(struct nsw32_corewindow *nsw32_cw,
- browser_mouse_state mouse_state,
- int x, int y)
-{
- struct nsw32_sslcert_window *crtvrfy_win;
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsw32_sslcert_window *)nsw32_cw;
-
- sslcert_viewer_mouse_action(crtvrfy_win->ssl_data, mouse_state, x, y);
-
- return NSERROR_OK;
-}
-
-
-/**
- * callback on draw event for ssl certificate window
- *
- * \param nsw32_cw The nsw32 core window structure.
- * \param scrollx The horizontal scroll offset.
- * \param scrolly The vertical scroll offset.
- * \param r The rectangle of the window that needs updating.
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_draw(struct nsw32_corewindow *nsw32_cw,
- int scrollx,
- int scrolly,
- struct rect *r)
-{
- struct nsw32_sslcert_window *crtvrfy_win;
- struct redraw_context ctx = {
- .interactive = true,
- .background_images = true,
- .plot = &win_plotters
- };
-
- /* technically degenerate container of */
- crtvrfy_win = (struct nsw32_sslcert_window *)nsw32_cw;
-
- sslcert_viewer_redraw(crtvrfy_win->ssl_data,
- -scrollx, -scrolly,
- r, &ctx);
-
- return NSERROR_OK;
-}
-
-
-/**
- * callback on close event for ssl certificate window
- *
- * \param nsw32_cw The nsw32 core window structure.
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror
-nsw32_sslcert_viewer_close(struct nsw32_corewindow *nsw32_cw)
-{
- DestroyWindow(nsw32_cw->hWnd);
-
- return NSERROR_OK;
-}
-
-
-/* exported interface documented in nsw32/ssl_cert.h */
-nserror nsw32_cert_verify(struct nsurl *url,
- const struct cert_chain *chain,
- nserror (*cb)(bool proceed, void *pw),
- void *cbpw)
-{
- struct nsw32_sslcert_window *ncwin;
- nserror res;
-
- ncwin = malloc(sizeof(struct nsw32_sslcert_window));
- if (ncwin == NULL) {
- return NSERROR_NOMEM;
- }
-
- /* initialise certificate viewing interface */
- res = sslcert_viewer_create_session_data(url, cb, cbpw, chain, &ncwin->ssl_data);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- NSLOG(netsurf, INFO, "creating hInstance %p SSL window", hinst);
- ncwin->hWnd = CreateWindowEx(0,
- windowclassname_sslcert,
- "SSL Certificate viewer",
- WS_OVERLAPPEDWINDOW |
- WS_CLIPSIBLINGS |
- WS_CLIPCHILDREN |
- CS_DBLCLKS,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- 500,
- 400,
- NULL,
- NULL,
- hinst,
- NULL);
- if (ncwin->hWnd == NULL) {
- NSLOG(netsurf, INFO, "Window create failed");
- return NSERROR_NOMEM;
- }
-
- ncwin->core.title = NULL;
- ncwin->core.draw = nsw32_sslcert_viewer_draw;
- ncwin->core.key = nsw32_sslcert_viewer_key;
- ncwin->core.mouse = nsw32_sslcert_viewer_mouse;
- ncwin->core.close = nsw32_sslcert_viewer_close;
-
- res = nsw32_corewindow_init(hinst, ncwin->hWnd, &ncwin->core);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- res = sslcert_viewer_init(ncwin->core.cb_table,
- (struct core_window *)ncwin,
- ncwin->ssl_data);
- if (res != NSERROR_OK) {
- free(ncwin);
- return res;
- }
-
- ncwin->hAccept = CreateWindowEx(0,
- "BUTTON",
- "Accept",
- WS_TABSTOP|WS_VISIBLE|
- WS_CHILD|BS_DEFPUSHBUTTON,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CMD_BTN_W,
- CMD_BTN_H,
- ncwin->hWnd,
- (HMENU)IDC_SSLCERT_BTN_ACCEPT,
- hinst,
- NULL);
- HGDIOBJ hfDefault=GetStockObject(DEFAULT_GUI_FONT);
- SendMessage(ncwin->hAccept, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE,0));
- ncwin->hReject = CreateWindowEx(0,
- "BUTTON",
- "Reject",
- WS_TABSTOP|WS_VISIBLE|
- WS_CHILD|BS_DEFPUSHBUTTON,
- CW_USEDEFAULT,
- CW_USEDEFAULT,
- CMD_BTN_W,
- CMD_BTN_H,
- ncwin->hWnd,
- (HMENU)IDC_SSLCERT_BTN_REJECT,
- hinst,
- NULL);
- SendMessage(ncwin->hReject, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE,0));
-
- CreateWindowEx(0,
- "STATIC",
- IDI_WARNING,
- WS_VISIBLE | WS_CHILD | SS_ICON,
- DLG_MRGN,
- DLG_MRGN,
- CMD_BTN_W,
- CMD_BTN_H,
- ncwin->hWnd,
- NULL,
- NULL,
- NULL);
- ncwin->hTxt = CreateWindowEx(0,
- "STATIC",
- "NetSurf failed to verify the authenticity of an SSL certificate. Verify the certificate details",
- WS_VISIBLE | WS_CHILD | SS_LEFT,
- DLG_MRGN + WRN_ICO_H + DLG_MRGN,
- DLG_MRGN + 5,
- 400,
- WRN_ICO_H - 5,
- ncwin->hWnd,
- NULL,
- NULL,
- NULL);
- SendMessage(ncwin->hTxt, WM_SETFONT, (WPARAM)hfDefault, MAKELPARAM(FALSE,0));
-
- SetProp(ncwin->hWnd, TEXT("CertWnd"), (HANDLE)ncwin);
-
- ShowWindow(ncwin->hWnd, SW_SHOWNORMAL);
-
- return NSERROR_OK;
-}
-
-
-/**
- * position and size ssl cert window widgets.
- *
- * \param hwnd The win32 handle of the window
- * \param certwin The certificate viewer context
- */
-static void
-nsw32_window_ssl_cert_size(HWND hwnd, struct nsw32_sslcert_window *certwin)
-{
- RECT rc;
- GetClientRect(hwnd, &rc);
- /* position certificate drawable */
- MoveWindow(certwin->core.hWnd,
- DLG_MRGN,
- DLG_MRGN + WRN_ICO_H + DLG_MRGN,
- rc.right - (DLG_MRGN + DLG_MRGN),
- rc.bottom - (DLG_MRGN + WRN_ICO_H + DLG_MRGN + DLG_MRGN + CMD_BTN_H + DLG_MRGN),
- TRUE);
- /* position accept button */
- MoveWindow(certwin->hAccept,
- rc.right - (DLG_MRGN + CMD_BTN_W),
- rc.bottom - (DLG_MRGN + CMD_BTN_H),
- CMD_BTN_W,
- CMD_BTN_H,
- TRUE);
- /* position reject button */
- MoveWindow(certwin->hReject,
- rc.right - (DLG_MRGN + CMD_BTN_W + 7 + CMD_BTN_W),
- rc.bottom - (DLG_MRGN + CMD_BTN_H),
- CMD_BTN_W,
- CMD_BTN_H,
- TRUE);
- /* position text */
- MoveWindow(certwin->hTxt,
- DLG_MRGN + WRN_ICO_H + DLG_MRGN,
- DLG_MRGN + 5,
- rc.right - (DLG_MRGN + WRN_ICO_H + DLG_MRGN + DLG_MRGN),
- WRN_ICO_H - 5,
- TRUE);
-}
-
-
-/**
- * Destroy a certificate viewing window
- *
- * \param crtwin The certificate viewer context
- * \return NSERROR_OK on success otherwise appropriate error code
- */
-static nserror nsw32_crtvrfy_destroy(struct nsw32_sslcert_window *crtwin)
-{
- nserror res;
-
- res = sslcert_viewer_fini(crtwin->ssl_data);
- if (res == NSERROR_OK) {
- res = nsw32_corewindow_fini(&crtwin->core);
- DestroyWindow(crtwin->hWnd);
- free(crtwin);
- }
- return res;
-}
-
-
-/**
- * handle command message on ssl certificate viewing window.
- *
- * \param hwnd The win32 window handle.
- * \param crtwin certificate window context.
- * \param notification_code notifiction code
- * \param identifier notification identifier
- * \param ctrl_window The win32 control window handle
- * \return appropriate response for command
- */
-static LRESULT
-nsw32_window_ssl_cert_command(HWND hwnd,
- struct nsw32_sslcert_window *crtwin,
- int notification_code,
- int identifier,
- HWND ctrl_window)
-{
- NSLOG(netsurf, INFO,
- "notification_code %x identifier %x ctrl_window %p",
- notification_code,
- identifier,
- ctrl_window);
-
- switch(identifier) {
- case IDC_SSLCERT_BTN_ACCEPT:
- sslcert_viewer_accept(crtwin->ssl_data);
- nsw32_crtvrfy_destroy(crtwin);
- break;
-
- case IDC_SSLCERT_BTN_REJECT:
- sslcert_viewer_reject(crtwin->ssl_data);
- nsw32_crtvrfy_destroy(crtwin);
- break;
-
- default:
- return 1; /* unhandled */
- }
- return 0; /* control message handled */
-}
-
-
-/**
- * callback for SSL certificate window win32 events
- *
- * \param hwnd The win32 window handle
- * \param msg The win32 message identifier
- * \param wparam The w win32 parameter
- * \param lparam The l win32 parameter
- */
-static LRESULT CALLBACK
-nsw32_window_ssl_cert_event_callback(HWND hwnd,
- UINT msg,
- WPARAM wparam,
- LPARAM lparam)
-{
- struct nsw32_sslcert_window *crtwin;
- crtwin = GetProp(hwnd, TEXT("CertWnd"));
- if (crtwin != NULL) {
- switch (msg) {
- case WM_SIZE:
- nsw32_window_ssl_cert_size(hwnd, crtwin);
- break;
-
- case WM_COMMAND:
- if (nsw32_window_ssl_cert_command(hwnd,
- crtwin,
- HIWORD(wparam),
- LOWORD(wparam),
- (HWND)lparam) == 0) {
- return 0;
- }
- break;
-
- case WM_CLOSE:
- sslcert_viewer_reject(crtwin->ssl_data);
- nsw32_crtvrfy_destroy(crtwin);
- return 0;
- }
- }
-
- return DefWindowProc(hwnd, msg, wparam, lparam);
-}
-
-
-/* exported interface documented in nsw32/ssl_cert.h */
-nserror nsws_create_cert_verify_class(HINSTANCE hInstance)
-{
- nserror ret = NSERROR_OK;
- WNDCLASSEX wc;
-
- /* drawable area */
- wc.cbSize = sizeof(WNDCLASSEX);
- wc.style = 0;
- wc.lpfnWndProc = nsw32_window_ssl_cert_event_callback;
- wc.cbClsExtra = 0;
- wc.cbWndExtra = 0;
- wc.hInstance = hInstance;
- wc.hIcon = NULL;
- wc.hCursor = NULL;
- wc.hbrBackground = (HBRUSH)(COLOR_MENU + 1);
- wc.lpszMenuName = NULL;
- wc.lpszClassName = windowclassname_sslcert;
- wc.hIconSm = NULL;
-
- if (RegisterClassEx(&wc) == 0) {
- win_perror("CertVerifyClass");
- ret = NSERROR_INIT_FAILED;
- }
-
- return ret;
-}
diff --git a/frontends/windows/ssl_cert.h b/frontends/windows/ssl_cert.h
deleted file mode 100644
index eebfb0665..000000000
--- a/frontends/windows/ssl_cert.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright 2016 Vincent Sanders <vince@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
- * Interface to win32 certificate viewing using nsw32 core windows.
- */
-
-#ifndef NETSURF_WINDOWS_SSL_CERT_H
-#define NETSURF_WINDOWS_SSL_CERT_H 1
-
-struct nsurl;
-struct cert_chain;
-
-/**
- * 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 nsw32_cert_verify(struct nsurl *url, const struct cert_chain *certs, nserror (*cb)(bool proceed, void *pw), void *cbpw);
-
-/**
- * Create the ssl viewer window class.
- *
- * \param hinstance The application instance
- * \return NSERROR_OK on success or NSERROR_INIT_FAILED if the class
- * creation failed.
- */
-nserror nsws_create_cert_verify_class(HINSTANCE hinstance);
-
-#endif