diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-23 09:38:15 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2020-05-23 09:38:51 +0100 |
commit | dd43748676ff80357e231fec7182b1969584f9a4 (patch) | |
tree | c4971259558963cbccda2b59df7ec05d4f424678 /content/fetchers | |
parent | a912d4db4ea87adbd7f27fa162068b235f8053a0 (diff) | |
download | netsurf-dd43748676ff80357e231fec7182b1969584f9a4.tar.gz netsurf-dd43748676ff80357e231fec7182b1969584f9a4.tar.bz2 |
fix: Make it OK if the chain isn't avilable during bad-ssl querying
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/fetchers')
-rw-r--r-- | content/fetchers/about.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c index 532223fbb..6bb71a964 100644 --- a/content/fetchers/about.c +++ b/content/fetchers/about.c @@ -2199,7 +2199,7 @@ static bool fetch_about_query_privacy_handler(struct fetch_about_context *ctx) const char *title; struct nsurl *siteurl = NULL; char *description = NULL; - const char *chainurl = ""; + const char *chainurl = NULL; const struct fetch_multipart_data *curmd; /* mutipart data iterator */ /* extract parameters from multipart post data */ @@ -2261,16 +2261,24 @@ static bool fetch_about_query_privacy_handler(struct fetch_about_context *ctx) goto fetch_about_query_ssl_handler_aborted; } } - res = ssenddataf(ctx, - "<div><p>%s</p></div>" - "<div><p><a href=\"%s\" target=\"_blank\">%s</a></p></div>", - reason, - chainurl, - messages_get("ViewCertificates")); + + if (chainurl == NULL) { + res = ssenddataf(ctx, + "<div><p>%s</p></div>" + "<div><p>%s</p></div>", + reason, + messages_get("ViewCertificatesNotPossible")); + } else { + res = ssenddataf(ctx, + "<div><p>%s</p></div>" + "<div><p><a href=\"%s\" target=\"_blank\">%s</a></p></div>", + reason, + chainurl, + messages_get("ViewCertificates")); + } if (res != NSERROR_OK) { goto fetch_about_query_ssl_handler_aborted; } - res = ssenddataf(ctx, "<div id=\"buttons\">" "<input type=\"submit\" id=\"back\" name=\"back\" " |