fix frontends to cope with certificate chain update

This commit is contained in:
Vincent Sanders 2020-02-23 17:19:45 +00:00
parent 0c34d06494
commit 7039973a1f
6 changed files with 14 additions and 17 deletions

View File

@ -298,7 +298,7 @@ ami_crtvrfy_create_window(struct ami_crtvrfy_window *crtvrfy_win)
/* exported interface documented in amiga/ssl_cert.h */ /* exported interface documented in amiga/ssl_cert.h */
nserror ami_cert_verify(struct nsurl *url, nserror ami_cert_verify(struct nsurl *url,
const struct ssl_cert_info *certs, const struct cert_chain *chain,
unsigned long num, unsigned long num,
nserror (*cb)(bool proceed, void *pw), nserror (*cb)(bool proceed, void *pw),
void *cbpw) void *cbpw)
@ -346,8 +346,7 @@ nserror ami_cert_verify(struct nsurl *url,
} }
/* initialise certificate viewing interface */ /* initialise certificate viewing interface */
res = sslcert_viewer_create_session_data(num, url, cb, cbpw, certs, res = sslcert_viewer_create_session_data(url, cb, cbpw, chain, &ncwin->ssl_data);
&ncwin->ssl_data);
if (res != NSERROR_OK) { if (res != NSERROR_OK) {
ami_utf8_free(ncwin->core.wintitle); ami_utf8_free(ncwin->core.wintitle);
ami_utf8_free(ncwin->sslerr); ami_utf8_free(ncwin->sslerr);

View File

@ -762,8 +762,8 @@ static void gui_set_clipboard(const char *buffer, size_t length,
} }
static nserror static nserror
gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs, gui_cert_verify(nsurl *url, const struct cert_chain *chain,
unsigned long num, nserror (*cb)(bool proceed, void *pw), nserror (*cb)(bool proceed, void *pw),
void *cbpw) void *cbpw)
{ {
struct sslcert_session_data *data; struct sslcert_session_data *data;
@ -781,8 +781,7 @@ gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs,
cb(false, cbpw); cb(false, cbpw);
} else if(b == 3) { } else if(b == 3) {
// Inspect // Inspect
sslcert_viewer_create_session_data(num, url, cb, cbpw, certs, sslcert_viewer_create_session_data(url, cb, cbpw, chain, &data);
&data);
atari_sslcert_viewer_open(data); atari_sslcert_viewer_open(data);
} }
return NSERROR_OK; return NSERROR_OK;

View File

@ -40,8 +40,8 @@ static uint32_t cert_ctr = 0;
nserror nserror
gui_cert_verify(nsurl *url, gui_cert_verify(nsurl *url,
const struct ssl_cert_info *certs, const struct cert_chain *chain,
unsigned long num, nserror (*cb)(bool proceed, void *pw), nserror (*cb)(bool proceed, void *pw),
void *cbpw) void *cbpw)
{ {
struct monkey_cert *mcrt_ctx; struct monkey_cert *mcrt_ctx;

View File

@ -19,11 +19,11 @@
#ifndef NETSURF_MONKEY_CERT_H #ifndef NETSURF_MONKEY_CERT_H
#define NETSURF_MONKEY_CERT_H #define NETSURF_MONKEY_CERT_H
struct ssl_cert_info; struct cert_chain;
nserror gui_cert_verify(nsurl *url, const struct ssl_cert_info *certs, nserror gui_cert_verify(nsurl *url, const struct cert_chain *certs,
unsigned long num, nserror (*cb)(bool proceed, void *pw), nserror (*cb)(bool proceed, void *pw),
void *cbpw); void *cbpw);
void monkey_sslcert_handle_command(int argc, char **argv); void monkey_sslcert_handle_command(int argc, char **argv);

View File

@ -312,8 +312,7 @@ cert_mouse(struct ro_corewindow *ro_cw,
/* exported interface documented in riscos/sslcert.h */ /* exported interface documented in riscos/sslcert.h */
nserror nserror
gui_cert_verify(nsurl *url, gui_cert_verify(nsurl *url,
const struct ssl_cert_info *certs, const struct cert_chain *chain,
unsigned long num,
nserror (*cb)(bool proceed, void *pw), nserror (*cb)(bool proceed, void *pw),
void *cbpw) void *cbpw)
{ {
@ -327,7 +326,7 @@ gui_cert_verify(nsurl *url,
} }
/* initialise certificate viewing interface */ /* initialise certificate viewing interface */
res = sslcert_viewer_create_session_data(num, url, cb, cbpw, certs, res = sslcert_viewer_create_session_data(url, cb, cbpw, chain,
&ncwin->ssl_data); &ncwin->ssl_data);
if (res != NSERROR_OK) { if (res != NSERROR_OK) {
free(ncwin); free(ncwin);

View File

@ -41,7 +41,7 @@ void ro_gui_cert_initialise(void);
* \param cb Callback upon user decision. * \param cb Callback upon user decision.
* \param cbpw Context pointer passed to cb * \param cbpw Context pointer passed to cb
*/ */
nserror gui_cert_verify(struct nsurl *url, const struct ssl_cert_info *certs, unsigned long num, nserror (*cb)(bool proceed, void *pw), void *cbpw); nserror gui_cert_verify(struct nsurl *url, const struct cert_chain *chain, nserror (*cb)(bool proceed, void *pw), void *cbpw);
#endif #endif