summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/fetchers/about.c10
-rw-r--r--desktop/browser_window.c17
-rw-r--r--resources/FatMessages5
3 files changed, 31 insertions, 1 deletions
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index d7c1f7e7e..532223fbb 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -2199,6 +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 struct fetch_multipart_data *curmd; /* mutipart data iterator */
/* extract parameters from multipart post data */
@@ -2211,6 +2212,8 @@ static bool fetch_about_query_privacy_handler(struct fetch_about_context *ctx)
}
} else if (strcmp(curmd->name, "reason") == 0) {
reason = curmd->value;
+ } else if (strcmp(curmd->name, "chainurl") == 0) {
+ chainurl = curmd->value;
}
curmd = curmd->next;
}
@@ -2258,7 +2261,12 @@ 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>", reason);
+ 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;
}
diff --git a/desktop/browser_window.c b/desktop/browser_window.c
index 60f8d8947..2dcd0791d 100644
--- a/desktop/browser_window.c
+++ b/desktop/browser_window.c
@@ -1125,6 +1125,7 @@ browser_window__handle_bad_certs(struct browser_window *bw,
/* Initially we don't know WHY the SSL cert was bad */
const char *reason = messages_get_sslcode(SSL_CERT_ERR_UNKNOWN);
size_t depth;
+ nsurl *chainurl = NULL;
memset(&params, 0, sizeof(params));
@@ -1157,6 +1158,20 @@ browser_window__handle_bad_certs(struct browser_window *bw,
goto out;
}
+ err = cert_chain_to_query(bw->loading_cert_chain, &chainurl);
+
+ if (err != NSERROR_OK) {
+ goto out;
+ }
+
+ err = fetch_multipart_data_new_kv(&params.post_multipart,
+ "chainurl",
+ nsurl_access(chainurl));
+
+ if (err != NSERROR_OK) {
+ goto out;
+ }
+
/* Now we issue the fetch */
bw->internal_nav = true;
err = browser_window__navigate_internal(bw, &params);
@@ -1166,6 +1181,8 @@ browser_window__handle_bad_certs(struct browser_window *bw,
out:
browser_window__free_fetch_parameters(&params);
+ if (chainurl != NULL)
+ nsurl_unref(chainurl);
return err;
}
diff --git a/resources/FatMessages b/resources/FatMessages
index 671ba2832..cbbead236 100644
--- a/resources/FatMessages
+++ b/resources/FatMessages
@@ -1078,6 +1078,11 @@ it.all.PrivacyTitle:Errore della privacy
nl.all.PrivacyTitle:Privacyfout
en.all.PrivacyDescription:A privacy error occurred while communicating with %s this may be a site configuration error or an attempt to steal private information (passwords, messages or credit cards)
it.all.PrivacyDescription:Si è verificato un errore della privacy durante la comunicazione con %s fai attenzione, questo potrebbe essere un errore di configurazione del sito oppure un tentativo di rubare informazioni private (password, messaggi o numeri di carte di credito)
+en.all.ViewCertificates:View certificate details
+de.all.ViewCertificates:Zertifikatdetails anzeigen
+fr.all.ViewCertificates:Afficher les détails du certificat
+it.all.ViewCertificates:Visualizza i dettagli del certificato
+nl.all.ViewCertificates:Bekijk certificaatdetails
en.all.Proceed:Proceed
de.all.Proceed:Vorgehen
fr.all.Proceed:Procéder