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>
This commit is contained in:
parent
10fc242aa9
commit
e6c666d4f4
|
@ -2,7 +2,7 @@
|
|||
|
||||
S_DESKTOP := cookie_manager.c knockout.c hotlist.c mouse.c \
|
||||
plot_style.c print.c search.c searchweb.c scrollbar.c \
|
||||
sslcert_viewer.c textarea.c version.c system_colour.c \
|
||||
textarea.c version.c system_colour.c \
|
||||
local_history.c global_history.c treeview.c page-info.c
|
||||
|
||||
S_DESKTOP := $(addprefix desktop/,$(S_DESKTOP))
|
||||
|
|
|
@ -1164,14 +1164,6 @@ browser_window__handle_bad_certs(struct browser_window *bw,
|
|||
goto out;
|
||||
}
|
||||
|
||||
err = guit->misc->cert_verify(url,
|
||||
bw->loading_cert_chain,
|
||||
browser_window__handle_ssl_query_response,
|
||||
bw);
|
||||
|
||||
if (err == NSERROR_NOT_IMPLEMENTED) {
|
||||
err = NSERROR_OK;
|
||||
}
|
||||
out:
|
||||
browser_window__free_fetch_parameters(¶ms);
|
||||
return err;
|
||||
|
|
|
@ -638,14 +638,6 @@ static nserror gui_default_launch_url(struct nsurl *url)
|
|||
}
|
||||
|
||||
|
||||
static nserror gui_default_cert_verify(nsurl *url,
|
||||
const struct cert_chain *chain,
|
||||
nserror (*cb)(bool proceed, void *pw),
|
||||
void *cbpw)
|
||||
{
|
||||
return NSERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
static nserror gui_default_401login_open(
|
||||
nsurl *url, const char *realm,
|
||||
const char *username, const char *password,
|
||||
|
@ -685,9 +677,6 @@ static nserror verify_misc_register(struct gui_misc_table *gmt)
|
|||
if (gmt->launch_url == NULL) {
|
||||
gmt->launch_url = gui_default_launch_url;
|
||||
}
|
||||
if (gmt->cert_verify == NULL) {
|
||||
gmt->cert_verify = gui_default_cert_verify;
|
||||
}
|
||||
if (gmt->login == NULL) {
|
||||
gmt->login = gui_default_401login_open;
|
||||
}
|
||||
|
|
|
@ -1,730 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
|
||||
* Copyright 2013 Michael Drake <tlsa@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
|
||||
* SSL Certificate verification UI implementation
|
||||
*/
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "content/fetch.h"
|
||||
#include "content/urldb.h"
|
||||
#include "content/hlcache.h"
|
||||
#include "desktop/sslcert_viewer.h"
|
||||
#include "desktop/treeview.h"
|
||||
#include "utils/messages.h"
|
||||
#include "utils/log.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
/**
|
||||
* ssl certificate viewer data fields
|
||||
*/
|
||||
enum sslcert_viewer_field {
|
||||
SSLCERT_V_SUBJECT,
|
||||
SSLCERT_V_SERIAL,
|
||||
SSLCERT_V_TYPE,
|
||||
SSLCERT_V_VALID_UNTIL,
|
||||
SSLCERT_V_VALID_FROM,
|
||||
SSLCERT_V_VERSION,
|
||||
SSLCERT_V_ISSUER,
|
||||
SSLCERT_V_CERTIFICATES,
|
||||
SSLCERT_V_N_FIELDS
|
||||
};
|
||||
|
||||
typedef nserror (*response_cb)(bool proceed, void *pw);
|
||||
|
||||
/**
|
||||
* ssl certificate information for certificate error message
|
||||
*/
|
||||
struct ssl_cert_info {
|
||||
long version; /**< Certificate version */
|
||||
char not_before[32]; /**< Valid from date */
|
||||
char not_after[32]; /**< Valid to date */
|
||||
int sig_type; /**< Signature type */
|
||||
char serialnum[64]; /**< Serial number */
|
||||
char issuer[256]; /**< Issuer details */
|
||||
char subject[256]; /**< Subject details */
|
||||
int cert_type; /**< Certificate type */
|
||||
ssl_cert_err err; /**< Whatever is wrong with this certificate */
|
||||
};
|
||||
|
||||
/**
|
||||
* ssl certificate verification context.
|
||||
*/
|
||||
struct sslcert_session_data {
|
||||
struct ssl_cert_info *certs; /**< Certificates */
|
||||
unsigned long num; /**< Number of certificates in chain */
|
||||
nsurl *url; /**< The url of the certificate */
|
||||
response_cb cb; /**< Cert accept/reject callback */
|
||||
void *cbpw; /**< Context passed to callback */
|
||||
|
||||
treeview *tree; /**< The treeview object */
|
||||
struct treeview_field_desc fields[SSLCERT_V_N_FIELDS];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* ssl certificate tree entry
|
||||
*/
|
||||
struct sslcert_entry {
|
||||
treeview_node *entry;
|
||||
char version[24];
|
||||
char type[24];
|
||||
struct treeview_field_data data[SSLCERT_V_N_FIELDS - 1];
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Free a ssl certificate viewer entry's treeview field data.
|
||||
*
|
||||
* \param e Entry to free data from
|
||||
*/
|
||||
static void sslcert_viewer_free_treeview_field_data(struct sslcert_entry *e)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Build a sslcert viewer treeview field from given text
|
||||
*
|
||||
* \param field SSL certificate treeview field to build
|
||||
* \param data SSL certificate entry field data to set
|
||||
* \param value Text to set in field, ownership yielded
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
static inline nserror
|
||||
sslcert_viewer_field_builder(enum sslcert_viewer_field field,
|
||||
struct treeview_field_data *data,
|
||||
const char *value,
|
||||
struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
data->field = ssl_d->fields[field].field;
|
||||
data->value = value;
|
||||
data->value_len = (value != NULL) ? strlen(value) : 0;
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set a sslcert viewer entry's data from the certificate.
|
||||
*
|
||||
* \param e Entry to set up
|
||||
* \param cert Data associated with entry's certificate
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
static nserror
|
||||
sslcert_viewer_set_treeview_field_data(struct sslcert_entry *e,
|
||||
const struct ssl_cert_info *cert,
|
||||
struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
unsigned int written;
|
||||
|
||||
assert(e != NULL);
|
||||
assert(cert != NULL);
|
||||
assert(ssl_d != NULL);
|
||||
|
||||
/* Set the fields up */
|
||||
sslcert_viewer_field_builder(SSLCERT_V_SUBJECT,
|
||||
&e->data[SSLCERT_V_SUBJECT],
|
||||
cert->subject, ssl_d);
|
||||
|
||||
sslcert_viewer_field_builder(SSLCERT_V_SERIAL,
|
||||
&e->data[SSLCERT_V_SERIAL],
|
||||
cert->serialnum, ssl_d);
|
||||
|
||||
written = snprintf(e->type, sizeof(e->type), "%i", cert->cert_type);
|
||||
assert(written < sizeof(e->type));
|
||||
sslcert_viewer_field_builder(SSLCERT_V_TYPE,
|
||||
&e->data[SSLCERT_V_TYPE],
|
||||
e->type, ssl_d);
|
||||
|
||||
sslcert_viewer_field_builder(SSLCERT_V_VALID_UNTIL,
|
||||
&e->data[SSLCERT_V_VALID_UNTIL],
|
||||
cert->not_after, ssl_d);
|
||||
|
||||
sslcert_viewer_field_builder(SSLCERT_V_VALID_FROM,
|
||||
&e->data[SSLCERT_V_VALID_FROM],
|
||||
cert->not_before, ssl_d);
|
||||
|
||||
written = snprintf(e->version, sizeof(e->version),
|
||||
"%li", cert->version);
|
||||
assert(written < sizeof(e->version));
|
||||
sslcert_viewer_field_builder(SSLCERT_V_VERSION,
|
||||
&e->data[SSLCERT_V_VERSION],
|
||||
e->version, ssl_d);
|
||||
|
||||
sslcert_viewer_field_builder(SSLCERT_V_ISSUER,
|
||||
&e->data[SSLCERT_V_ISSUER],
|
||||
cert->issuer, ssl_d);
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Create a treeview node for a certificate
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \param n Number of SSL certificate in chain, to make node for
|
||||
* \return NSERROR_OK on success otherwise error code.
|
||||
*/
|
||||
static nserror
|
||||
sslcert_viewer_create_node(struct sslcert_session_data *ssl_d, int n)
|
||||
{
|
||||
struct sslcert_entry *e;
|
||||
const struct ssl_cert_info *cert = &(ssl_d->certs[n]);
|
||||
nserror err;
|
||||
|
||||
/* Create new certificate viewer entry */
|
||||
e = malloc(sizeof(struct sslcert_entry));
|
||||
if (e == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
||||
err = sslcert_viewer_set_treeview_field_data(e, cert, ssl_d);
|
||||
if (err != NSERROR_OK) {
|
||||
free(e);
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Create the new treeview node */
|
||||
err = treeview_create_node_entry(ssl_d->tree, &(e->entry),
|
||||
NULL, TREE_REL_FIRST_CHILD,
|
||||
e->data, e, TREE_OPTION_NONE);
|
||||
if (err != NSERROR_OK) {
|
||||
sslcert_viewer_free_treeview_field_data(e);
|
||||
free(e);
|
||||
return err;
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialise the treeview entry fields
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success otherwise error code.
|
||||
*/
|
||||
static nserror sslcert_init_entry_fields(struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
int i;
|
||||
const char *label;
|
||||
|
||||
for (i = 0; i < SSLCERT_V_N_FIELDS; i++)
|
||||
ssl_d->fields[i].field = NULL;
|
||||
|
||||
ssl_d->fields[SSLCERT_V_SUBJECT].flags = TREE_FLAG_DEFAULT;
|
||||
label = "TreeviewLabelSubject";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_SUBJECT].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_SERIAL].flags = TREE_FLAG_SHOW_NAME;
|
||||
label = "TreeviewLabelSerial";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_SERIAL].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_TYPE].flags = TREE_FLAG_SHOW_NAME;
|
||||
label = "TreeviewLabelType";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_TYPE].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_VALID_UNTIL].flags = TREE_FLAG_SHOW_NAME;
|
||||
label = "TreeviewLabelValidUntil";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_VALID_UNTIL].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_VALID_FROM].flags = TREE_FLAG_SHOW_NAME;
|
||||
label = "TreeviewLabelValidFrom";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_VALID_FROM].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_VERSION].flags = TREE_FLAG_SHOW_NAME;
|
||||
label = "TreeviewLabelVersion";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_VERSION].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_ISSUER].flags = TREE_FLAG_SHOW_NAME;
|
||||
label = "TreeviewLabelIssuer";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_ISSUER].field) !=
|
||||
lwc_error_ok) {
|
||||
goto error;
|
||||
}
|
||||
|
||||
ssl_d->fields[SSLCERT_V_CERTIFICATES].flags = TREE_FLAG_DEFAULT;
|
||||
label = "TreeviewLabelCertificates";
|
||||
label = messages_get(label);
|
||||
if (lwc_intern_string(label, strlen(label),
|
||||
&ssl_d->fields[SSLCERT_V_CERTIFICATES].field) !=
|
||||
lwc_error_ok) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
|
||||
error:
|
||||
for (i = 0; i < SSLCERT_V_N_FIELDS; i++)
|
||||
if (ssl_d->fields[i].field != NULL)
|
||||
lwc_string_unref(ssl_d->fields[i].field);
|
||||
|
||||
return NSERROR_UNKNOWN;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete ssl certificate viewer entries
|
||||
*
|
||||
* \param e Entry to delete.
|
||||
*/
|
||||
static void sslcert_viewer_delete_entry(struct sslcert_entry *e)
|
||||
{
|
||||
sslcert_viewer_free_treeview_field_data(e);
|
||||
free(e);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* folder operation callback
|
||||
*
|
||||
* \param msg treeview message
|
||||
* \param data message context
|
||||
* \return NSERROR_OK on success
|
||||
*/
|
||||
static nserror
|
||||
sslcert_viewer_tree_node_folder_cb(struct treeview_node_msg msg, void *data)
|
||||
{
|
||||
switch (msg.msg) {
|
||||
case TREE_MSG_NODE_DELETE:
|
||||
case TREE_MSG_NODE_EDIT:
|
||||
case TREE_MSG_NODE_LAUNCH:
|
||||
break;
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* node entry callback
|
||||
*
|
||||
* \param msg treeview message
|
||||
* \param data message context
|
||||
* \return NSERROR_OK on success
|
||||
*/
|
||||
static nserror
|
||||
sslcert_viewer_tree_node_entry_cb(struct treeview_node_msg msg, void *data)
|
||||
{
|
||||
struct sslcert_entry *e = data;
|
||||
|
||||
switch (msg.msg) {
|
||||
case TREE_MSG_NODE_DELETE:
|
||||
e->entry = NULL;
|
||||
sslcert_viewer_delete_entry(e);
|
||||
break;
|
||||
|
||||
case TREE_MSG_NODE_EDIT:
|
||||
case TREE_MSG_NODE_LAUNCH:
|
||||
break;
|
||||
}
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ssl certificate treeview callbacks
|
||||
*/
|
||||
struct treeview_callback_table sslv_tree_cb_t = {
|
||||
.folder = sslcert_viewer_tree_node_folder_cb,
|
||||
.entry = sslcert_viewer_tree_node_entry_cb
|
||||
};
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
nserror
|
||||
sslcert_viewer_init(struct core_window_callback_table *cw_t,
|
||||
void *core_window_handle,
|
||||
struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
nserror err;
|
||||
int cert_loop;
|
||||
|
||||
assert(ssl_d != NULL);
|
||||
|
||||
err = treeview_init();
|
||||
if (err != NSERROR_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
NSLOG(netsurf, INFO, "Building certificate viewer");
|
||||
|
||||
/* Init. certificate chain treeview entry fields */
|
||||
err = sslcert_init_entry_fields(ssl_d);
|
||||
if (err != NSERROR_OK) {
|
||||
ssl_d->tree = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Create the certificate treeview */
|
||||
err = treeview_create(&ssl_d->tree, &sslv_tree_cb_t,
|
||||
SSLCERT_V_N_FIELDS, ssl_d->fields,
|
||||
cw_t, core_window_handle, TREEVIEW_READ_ONLY);
|
||||
if (err != NSERROR_OK) {
|
||||
ssl_d->tree = NULL;
|
||||
return err;
|
||||
}
|
||||
|
||||
/* Build treeview nodes from certificate chain */
|
||||
for (cert_loop = ssl_d->num - 1; cert_loop >= 0; cert_loop--) {
|
||||
err = sslcert_viewer_create_node(ssl_d, cert_loop);
|
||||
if (err != NSERROR_OK) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
NSLOG(netsurf, INFO, "Built certificate viewer");
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Free SSL certificate session data
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
*/
|
||||
static void sslcert_cleanup_session(struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
assert(ssl_d != NULL);
|
||||
|
||||
if (ssl_d->url) {
|
||||
nsurl_unref(ssl_d->url);
|
||||
ssl_d->url = NULL;
|
||||
}
|
||||
|
||||
if (ssl_d->certs) {
|
||||
free(ssl_d->certs);
|
||||
ssl_d->certs = NULL;
|
||||
}
|
||||
|
||||
free(ssl_d);
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
nserror sslcert_viewer_fini(struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
int i;
|
||||
nserror err;
|
||||
|
||||
NSLOG(netsurf, INFO, "Finalising ssl certificate viewer");
|
||||
|
||||
/* Destroy the treeview */
|
||||
err = treeview_destroy(ssl_d->tree);
|
||||
|
||||
/* Free treeview entry fields */
|
||||
for (i = 0; i < SSLCERT_V_N_FIELDS; i++)
|
||||
if (ssl_d->fields[i].field != NULL)
|
||||
lwc_string_unref(ssl_d->fields[i].field);
|
||||
|
||||
/* Destroy the sslcert_session_data */
|
||||
sslcert_cleanup_session(ssl_d);
|
||||
|
||||
err = treeview_fini();
|
||||
if (err != NSERROR_OK) {
|
||||
return err;
|
||||
}
|
||||
|
||||
NSLOG(netsurf, INFO, "Finalised ssl certificate viewer");
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef WITH_OPENSSL
|
||||
|
||||
#include <openssl/ssl.h>
|
||||
#include <openssl/x509v3.h>
|
||||
|
||||
static nserror
|
||||
der_to_certinfo(const uint8_t *der,
|
||||
size_t der_length,
|
||||
struct ssl_cert_info *info)
|
||||
{
|
||||
BIO *mem;
|
||||
BUF_MEM *buf;
|
||||
const ASN1_INTEGER *asn1_num;
|
||||
BIGNUM *bignum;
|
||||
X509 *cert; /**< Pointer to certificate */
|
||||
|
||||
if (der == NULL) {
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
cert = d2i_X509(NULL, &der, der_length);
|
||||
if (cert == NULL) {
|
||||
return NSERROR_INVALID;
|
||||
}
|
||||
|
||||
/* get certificate version */
|
||||
info->version = X509_get_version(cert);
|
||||
|
||||
/* not before date */
|
||||
mem = BIO_new(BIO_s_mem());
|
||||
ASN1_TIME_print(mem, X509_get_notBefore(cert));
|
||||
BIO_get_mem_ptr(mem, &buf);
|
||||
(void) BIO_set_close(mem, BIO_NOCLOSE);
|
||||
BIO_free(mem);
|
||||
memcpy(info->not_before,
|
||||
buf->data,
|
||||
min(sizeof(info->not_before) - 1, (unsigned)buf->length));
|
||||
info->not_before[min(sizeof(info->not_before) - 1, (unsigned)buf->length)] = 0;
|
||||
BUF_MEM_free(buf);
|
||||
|
||||
/* not after date */
|
||||
mem = BIO_new(BIO_s_mem());
|
||||
ASN1_TIME_print(mem,
|
||||
X509_get_notAfter(cert));
|
||||
BIO_get_mem_ptr(mem, &buf);
|
||||
(void) BIO_set_close(mem, BIO_NOCLOSE);
|
||||
BIO_free(mem);
|
||||
memcpy(info->not_after,
|
||||
buf->data,
|
||||
min(sizeof(info->not_after) - 1, (unsigned)buf->length));
|
||||
info->not_after[min(sizeof(info->not_after) - 1, (unsigned)buf->length)] = 0;
|
||||
BUF_MEM_free(buf);
|
||||
|
||||
/* signature type */
|
||||
info->sig_type = X509_get_signature_type(cert);
|
||||
|
||||
/* serial number */
|
||||
asn1_num = X509_get_serialNumber(cert);
|
||||
if (asn1_num != NULL) {
|
||||
bignum = ASN1_INTEGER_to_BN(asn1_num, NULL);
|
||||
if (bignum != NULL) {
|
||||
char *tmp = BN_bn2hex(bignum);
|
||||
if (tmp != NULL) {
|
||||
strncpy(info->serialnum,
|
||||
tmp,
|
||||
sizeof(info->serialnum));
|
||||
info->serialnum[sizeof(info->serialnum)-1] = '\0';
|
||||
OPENSSL_free(tmp);
|
||||
}
|
||||
BN_free(bignum);
|
||||
bignum = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
/* issuer name */
|
||||
mem = BIO_new(BIO_s_mem());
|
||||
X509_NAME_print_ex(mem,
|
||||
X509_get_issuer_name(cert),
|
||||
0, XN_FLAG_SEP_CPLUS_SPC |
|
||||
XN_FLAG_DN_REV | XN_FLAG_FN_NONE);
|
||||
BIO_get_mem_ptr(mem, &buf);
|
||||
(void) BIO_set_close(mem, BIO_NOCLOSE);
|
||||
BIO_free(mem);
|
||||
memcpy(info->issuer,
|
||||
buf->data,
|
||||
min(sizeof(info->issuer) - 1, (unsigned) buf->length));
|
||||
info->issuer[min(sizeof(info->issuer) - 1, (unsigned) buf->length)] = 0;
|
||||
BUF_MEM_free(buf);
|
||||
|
||||
/* subject */
|
||||
mem = BIO_new(BIO_s_mem());
|
||||
X509_NAME_print_ex(mem,
|
||||
X509_get_subject_name(cert),
|
||||
0,
|
||||
XN_FLAG_SEP_CPLUS_SPC |
|
||||
XN_FLAG_DN_REV |
|
||||
XN_FLAG_FN_NONE);
|
||||
BIO_get_mem_ptr(mem, &buf);
|
||||
(void) BIO_set_close(mem, BIO_NOCLOSE);
|
||||
BIO_free(mem);
|
||||
memcpy(info->subject,
|
||||
buf->data,
|
||||
min(sizeof(info->subject) - 1, (unsigned)buf->length));
|
||||
info->subject[min(sizeof(info->subject) - 1, (unsigned) buf->length)] = 0;
|
||||
BUF_MEM_free(buf);
|
||||
|
||||
/* type of certificate */
|
||||
info->cert_type = X509_certificate_type(cert, X509_get_pubkey(cert));
|
||||
|
||||
X509_free(cert);
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
#else
|
||||
static nserror
|
||||
der_to_certinfo(uint8_t *der, size_t der_length, struct ssl_cert_info *info)
|
||||
{
|
||||
return NSERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* copy certificate data */
|
||||
static nserror
|
||||
convert_chain_to_cert_info(const struct cert_chain *chain,
|
||||
struct ssl_cert_info **cert_info_out)
|
||||
{
|
||||
struct ssl_cert_info *certs;
|
||||
size_t depth;
|
||||
nserror res;
|
||||
|
||||
certs = calloc(chain->depth, sizeof(struct ssl_cert_info));
|
||||
if (certs == NULL) {
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
|
||||
for (depth = 0; depth < chain->depth;depth++) {
|
||||
res = der_to_certinfo(chain->certs[depth].der,
|
||||
chain->certs[depth].der_length,
|
||||
certs + depth);
|
||||
if (res != NSERROR_OK) {
|
||||
free(certs);
|
||||
return res;
|
||||
}
|
||||
certs[depth].err = chain->certs[depth].err;
|
||||
}
|
||||
|
||||
*cert_info_out = certs;
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
nserror
|
||||
sslcert_viewer_create_session_data(struct nsurl *url,
|
||||
nserror (*cb)(bool proceed, void *pw),
|
||||
void *cbpw,
|
||||
const struct cert_chain *chain,
|
||||
struct sslcert_session_data **ssl_d)
|
||||
{
|
||||
struct sslcert_session_data *data;
|
||||
nserror res;
|
||||
assert(url != NULL);
|
||||
assert(chain != NULL);
|
||||
|
||||
data = malloc(sizeof(struct sslcert_session_data));
|
||||
if (data == NULL) {
|
||||
*ssl_d = NULL;
|
||||
return NSERROR_NOMEM;
|
||||
}
|
||||
res = convert_chain_to_cert_info(chain, &data->certs);
|
||||
if (res != NSERROR_OK) {
|
||||
free(data);
|
||||
*ssl_d = NULL;
|
||||
return res;
|
||||
}
|
||||
|
||||
data->url = nsurl_ref(url);
|
||||
data->num = chain->depth;
|
||||
data->cb = cb;
|
||||
data->cbpw = cbpw;
|
||||
|
||||
data->tree = NULL;
|
||||
|
||||
*ssl_d = data;
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
nserror sslcert_viewer_reject(struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
assert(ssl_d != NULL);
|
||||
|
||||
ssl_d->cb(false, ssl_d->cbpw);
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
nserror sslcert_viewer_accept(struct sslcert_session_data *ssl_d)
|
||||
{
|
||||
assert(ssl_d != NULL);
|
||||
|
||||
urldb_set_cert_permissions(ssl_d->url, true);
|
||||
|
||||
ssl_d->cb(true, ssl_d->cbpw);
|
||||
|
||||
return NSERROR_OK;
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
void
|
||||
sslcert_viewer_redraw(struct sslcert_session_data *ssl_d,
|
||||
int x, int y,
|
||||
struct rect *clip,
|
||||
const struct redraw_context *ctx)
|
||||
{
|
||||
assert(ssl_d != NULL &&
|
||||
"sslcert_viewer_redraw() given bad session data");
|
||||
|
||||
treeview_redraw(ssl_d->tree, x, y, clip, ctx);
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
void
|
||||
sslcert_viewer_mouse_action(struct sslcert_session_data *ssl_d,
|
||||
browser_mouse_state mouse,
|
||||
int x, int y)
|
||||
{
|
||||
treeview_mouse_action(ssl_d->tree, mouse, x, y);
|
||||
}
|
||||
|
||||
|
||||
/* Exported interface, documented in sslcert_viewer.h */
|
||||
bool sslcert_viewer_keypress(struct sslcert_session_data *ssl_d, uint32_t key)
|
||||
{
|
||||
return treeview_keypress(ssl_d->tree, key);
|
||||
}
|
|
@ -1,138 +0,0 @@
|
|||
/*
|
||||
* Copyright 2009 Paul Blokus <paul_pl@users.sourceforge.net>
|
||||
* Copyright 2013 Michael Drake <tlsa@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
|
||||
* SSL Certificate verification UI interface
|
||||
*/
|
||||
|
||||
#ifndef NETSURF_DESKTOP_SSLCERT_VIEWER_H
|
||||
#define NETSURF_DESKTOP_SSLCERT_VIEWER_H
|
||||
|
||||
#include "netsurf/mouse.h"
|
||||
|
||||
struct sslcert_session_data;
|
||||
struct redraw_context;
|
||||
struct core_window_callback_table;
|
||||
struct rect;
|
||||
struct nsurl;
|
||||
struct cert_chain;
|
||||
|
||||
/**
|
||||
* Create ssl certificate viewer session data.
|
||||
*
|
||||
* \param url Address of the page we're inspecting certificates of
|
||||
* \param cb Low level cache callback
|
||||
* \param cbpw Low level cache private data
|
||||
* \param chain The SSL certificate chain
|
||||
* \param ssl_d Updated to SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*
|
||||
* Pass the session data to sslcert_viewer_init.
|
||||
* sslcert_viewer_fini destroys the session data.
|
||||
*/
|
||||
nserror sslcert_viewer_create_session_data(
|
||||
struct nsurl *url,
|
||||
nserror (*cb)(bool proceed, void *pw),
|
||||
void *cbpw,
|
||||
const struct cert_chain *chain,
|
||||
struct sslcert_session_data **ssl_d);
|
||||
|
||||
|
||||
/**
|
||||
* Initialise a ssl certificate viewer from session data.
|
||||
*
|
||||
* This iterates through the certificates, building a treeview.
|
||||
*
|
||||
* \param cw_t Callback table for cert viewer's core_window
|
||||
* \param core_window_handle The core_window in which the cert viewer is shown
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
nserror sslcert_viewer_init(struct core_window_callback_table *cw_t,
|
||||
void *core_window_handle,
|
||||
struct sslcert_session_data *ssl_d);
|
||||
|
||||
|
||||
/**
|
||||
* Finalise a ssl certificate viewer.
|
||||
*
|
||||
* This destroys the certificate treeview and the certificate viewer module's
|
||||
* session data.
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
nserror sslcert_viewer_fini(struct sslcert_session_data *ssl_d);
|
||||
|
||||
|
||||
/**
|
||||
* Reject a certificate chain.
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
nserror sslcert_viewer_reject(struct sslcert_session_data *ssl_d);
|
||||
|
||||
|
||||
/**
|
||||
* Accept a certificate chain.
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \return NSERROR_OK on success, appropriate error otherwise
|
||||
*/
|
||||
nserror sslcert_viewer_accept(struct sslcert_session_data *ssl_d);
|
||||
|
||||
|
||||
/**
|
||||
* Redraw the ssl certificate viewer.
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \param x X coordinate to render treeview at
|
||||
* \param y Y coordinate to render treeview at
|
||||
* \param clip Current clip rectangle (wrt tree origin)
|
||||
* \param ctx Current redraw context
|
||||
*/
|
||||
void sslcert_viewer_redraw(struct sslcert_session_data *ssl_d,
|
||||
int x, int y, struct rect *clip,
|
||||
const struct redraw_context *ctx);
|
||||
|
||||
|
||||
/**
|
||||
* Handles all kinds of mouse action
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \param mouse The current mouse state
|
||||
* \param x X coordinate
|
||||
* \param y Y coordinate
|
||||
*/
|
||||
void sslcert_viewer_mouse_action(struct sslcert_session_data *ssl_d,
|
||||
browser_mouse_state mouse, int x, int y);
|
||||
|
||||
|
||||
/**
|
||||
* Key press handling.
|
||||
*
|
||||
* \param ssl_d SSL certificate session data
|
||||
* \param key The ucs4 character codepoint
|
||||
* \return true if the keypress is dealt with, false otherwise.
|
||||
*/
|
||||
bool sslcert_viewer_keypress(struct sslcert_session_data *ssl_d, uint32_t key);
|
||||
|
||||
#endif
|
|
@ -10,7 +10,7 @@ The currently available user interfaces are:
|
|||
- Cookies
|
||||
- Global history
|
||||
- Hotlist
|
||||
- SSL certificate view
|
||||
- SSL certificate view (obsolete, but used as an example here)
|
||||
- local history
|
||||
|
||||
Although not currently included in future additional user interfaces
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -85,7 +85,6 @@ S_FRONTEND := \
|
|||
clipboard.c \
|
||||
ctxmenu.c \
|
||||
cookies.c \
|
||||
certview.c \
|
||||
deskmenu.c \
|
||||
download.c \
|
||||
encoding.c \
|
||||
|
|
|
@ -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");
|
||||
}
|
|
@ -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
|
|
@ -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",
|
||||
|
|
|
@ -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 );
|
||||
}
|
|
@ -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
|
|
@ -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)
|
||||
};
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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"><b>Certificate chain</b></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>
|
|
@ -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"><b>Certificate Chain</b></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>
|
|
@ -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"),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
}
|
|
@ -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
|
|
@ -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();
|
||||
|
|
|
@ -31,7 +31,6 @@ static const char *type_text[]={
|
|||
"GENERIC",
|
||||
"WINDOW",
|
||||
"LOGIN",
|
||||
"SSLCERT",
|
||||
"DOWNLOAD",
|
||||
"PLOT",
|
||||
};
|
||||
|
|
|
@ -26,7 +26,6 @@ enum monkey_output_type {
|
|||
MOUT_GENERIC,
|
||||
MOUT_WINDOW,
|
||||
MOUT_LOGIN,
|
||||
MOUT_SSLCERT,
|
||||
MOUT_DOWNLOAD,
|
||||
MOUT_PLOT,
|
||||
};
|
||||
|
|
|
@ -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) \
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -44,7 +44,6 @@ struct tree;
|
|||
struct node;
|
||||
struct history;
|
||||
struct css_style;
|
||||
struct ssl_cert_info;
|
||||
struct nsurl;
|
||||
struct hlcache_handle;
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
|
@ -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
|
||||
|
|
@ -3280,254 +3280,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
|
||||
|
|
|
@ -2800,178 +2800,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
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2846,180 +2846,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
|
||||
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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
|
|
@ -70,21 +70,6 @@ struct gui_misc_table {
|
|||
*/
|
||||
nserror (*launch_url)(struct nsurl *url);
|
||||
|
||||
/**
|
||||
* 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 on sucess else error and cb never called
|
||||
*/
|
||||
nserror (*cert_verify)(struct nsurl *url,
|
||||
const struct cert_chain *chain,
|
||||
nserror (*cb)(bool proceed, void *pw),
|
||||
void *cbpw);
|
||||
|
||||
/**
|
||||
* Retrieve username/password for a given url+realm if there is one
|
||||
* stored in a frontend-specific way (e.g. gnome-keyring)
|
||||
|
|
Loading…
Reference in New Issue