From d4d3e5ee1c9edb67844b693be0202ee5968d61c3 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 23 Feb 2006 15:06:54 +0000 Subject: [project @ 2006-02-23 15:06:53 by jmb] Handle invalid SSL certificates better - UI still needs work. Modify fetch callback data parameter type to remove compiler warnings. Constify things. Lose global ssl_verify_certificates option. Fix issue when closing a dialog without input focus. svn path=/import/netsurf/; revision=2092 --- content/fetch.h | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'content/fetch.h') diff --git a/content/fetch.h b/content/fetch.h index 633a87131..5dd2d80cb 100644 --- a/content/fetch.h +++ b/content/fetch.h @@ -25,7 +25,10 @@ typedef enum { FETCH_REDIRECT, FETCH_NOTMODIFIED, #ifdef WITH_AUTH - FETCH_AUTH + FETCH_AUTH, +#endif +#ifdef WITH_SSL + FETCH_CERT_ERR, #endif } fetch_msg; @@ -46,12 +49,25 @@ struct cache_data { time_t last_modified; /**< Last-Modified: response header */ }; +#ifdef WITH_SSL +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 */ + long serial; /**< Serial number */ + char issuer[256]; /**< Issuer details */ + char subject[256]; /**< Subject details */ + int cert_type; /**< Certificate type */ +}; +#endif + extern bool fetch_active; extern CURLM *fetch_curl_multi; void fetch_init(void); struct fetch * fetch_start(char *url, char *referer, - void (*callback)(fetch_msg msg, void *p, const char *data, + void (*callback)(fetch_msg msg, void *p, const void *data, unsigned long size), void *p, bool only_2xx, char *post_urlenc, struct form_successful_control *post_multipart, @@ -63,7 +79,7 @@ const char *fetch_filetype(const char *unix_path); char *fetch_mimetype(const char *ro_path); bool fetch_can_fetch(const char *url); void fetch_change_callback(struct fetch *fetch, - void (*callback)(fetch_msg msg, void *p, const char *data, + void (*callback)(fetch_msg msg, void *p, const void *data, unsigned long size), void *p); -- cgit v1.2.3