NetSurf
|
Implementation of gtk certificate viewing using gtk core windows. More...
#include <stdint.h>
#include <stdlib.h>
#include <gtk/gtk.h>
#include "utils/log.h"
#include "netsurf/keypress.h"
#include "netsurf/plotters.h"
#include "desktop/sslcert_viewer.h"
#include "gtk/plotters.h"
#include "gtk/scaffolding.h"
#include "gtk/resources.h"
#include "gtk/ssl_cert.h"
#include "gtk/corewindow.h"
Go to the source code of this file.
Data Structures | |
struct | nsgtk_crtvrfy_window |
GTK certificate viewing window context. More... | |
Functions | |
static nserror | nsgtk_crtvrfy_destroy (struct nsgtk_crtvrfy_window *crtvrfy_win) |
destroy a previously created certificate view More... | |
static void | nsgtk_crtvrfy_accept (GtkButton *w, gpointer data) |
static void | nsgtk_crtvrfy_reject (GtkWidget *w, gpointer data) |
static gboolean | nsgtk_crtvrfy_delete_event (GtkWidget *w, GdkEvent *event, gpointer data) |
static nserror | nsgtk_crtvrfy_mouse (struct nsgtk_corewindow *nsgtk_cw, browser_mouse_state mouse_state, int x, int y) |
callback for mouse action for certificate verify on core window More... | |
static nserror | nsgtk_crtvrfy_key (struct nsgtk_corewindow *nsgtk_cw, uint32_t nskey) |
callback for keypress for certificate verify on core window More... | |
static nserror | nsgtk_crtvrfy_draw (struct nsgtk_corewindow *nsgtk_cw, struct rect *r) |
callback on draw event for certificate verify on core window More... | |
nserror | gtk_cert_verify (struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror(*cb)(bool proceed, void *pw), void *cbpw) |
Prompt the user to verify a certificate with issuse. More... | |
Implementation of gtk certificate viewing using gtk core windows.
Definition in file ssl_cert.c.
nserror gtk_cert_verify | ( | struct nsurl * | url, |
const struct ssl_cert_info * | certs, | ||
unsigned long | num, | ||
nserror(*)(bool proceed, void *pw) | cb, | ||
void * | cbpw | ||
) |
Prompt the user to verify a certificate with issuse.
url | The URL being verified. |
certs | The certificate to be verified |
num | The number of certificates to be verified. |
cb | Callback upon user decision. |
cbpw | Context pointer passed to cb |
Definition at line 170 of file ssl_cert.c.
References nsgtk_crtvrfy_window::builder, nsgtk_corewindow::cb_table, nsgtk_crtvrfy_window::core, nsgtk_crtvrfy_window::dlg, nsgtk_corewindow::draw, nsgtk_corewindow::drawing_area, nsgtk_corewindow::key, nsgtk_corewindow::mouse, NSERROR_NOMEM, NSERROR_OK, nsgtk_builder_new_from_resname(), nsgtk_corewindow_init(), nsgtk_crtvrfy_accept(), nsgtk_crtvrfy_delete_event(), nsgtk_crtvrfy_draw(), nsgtk_crtvrfy_key(), nsgtk_crtvrfy_mouse(), nsgtk_crtvrfy_reject(), nsgtk_current_scaffolding(), nsgtk_scaffolding_window(), NSLOG, nsgtk_corewindow::scrolled, nsgtk_crtvrfy_window::ssl_data, sslcert_viewer_create_session_data(), and sslcert_viewer_init().
|
static |
Definition at line 72 of file ssl_cert.c.
References nsgtk_crtvrfy_destroy(), nsgtk_crtvrfy_window::ssl_data, and sslcert_viewer_accept().
Referenced by gtk_cert_verify().
|
static |
Definition at line 94 of file ssl_cert.c.
References nsgtk_crtvrfy_reject().
Referenced by gtk_cert_verify().
|
static |
destroy a previously created certificate view
Definition at line 57 of file ssl_cert.c.
References nsgtk_crtvrfy_window::builder, nsgtk_crtvrfy_window::core, nsgtk_crtvrfy_window::dlg, NSERROR_OK, nsgtk_corewindow_fini(), nsgtk_crtvrfy_window::ssl_data, and sslcert_viewer_fini().
Referenced by nsgtk_crtvrfy_accept(), and nsgtk_crtvrfy_reject().
|
static |
callback on draw event for certificate verify on core window
nsgtk_cw | The nsgtk core window structure. |
r | The rectangle of the window that needs updating. |
Definition at line 152 of file ssl_cert.c.
References redraw_context::interactive, NSERROR_OK, nsgtk_plotters, nsgtk_crtvrfy_window::ssl_data, and sslcert_viewer_redraw().
Referenced by gtk_cert_verify().
|
static |
callback for keypress for certificate verify on core window
nsgtk_cw | The nsgtk core window structure. |
nskey | The netsurf key code |
Definition at line 131 of file ssl_cert.c.
References NSERROR_NOT_IMPLEMENTED, NSERROR_OK, nsgtk_crtvrfy_window::ssl_data, and sslcert_viewer_keypress().
Referenced by gtk_cert_verify().
|
static |
callback for mouse action for certificate verify on core window
nsgtk_cw | The nsgtk core window structure. |
mouse_state | netsurf mouse state on event |
x | location of event |
y | location of event |
Definition at line 110 of file ssl_cert.c.
References NSERROR_OK, nsgtk_crtvrfy_window::ssl_data, and sslcert_viewer_mouse_action().
Referenced by gtk_cert_verify().
|
static |
Definition at line 83 of file ssl_cert.c.
References nsgtk_crtvrfy_destroy(), nsgtk_crtvrfy_window::ssl_data, and sslcert_viewer_reject().
Referenced by gtk_cert_verify(), and nsgtk_crtvrfy_delete_event().