query/ssl: Include link to view certificate details
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
parent
c2f73310d0
commit
b28d3c2675
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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(¶ms, 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(¶ms.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, ¶ms);
|
||||
|
@ -1166,6 +1181,8 @@ browser_window__handle_bad_certs(struct browser_window *bw,
|
|||
|
||||
out:
|
||||
browser_window__free_fetch_parameters(¶ms);
|
||||
if (chainurl != NULL)
|
||||
nsurl_unref(chainurl);
|
||||
return err;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue