Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/b28d3c267510d2e80e4730f71ff1fa5f61795499
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/b28d3c267510d2e80e4730f71ff1fa5f61795499
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/b28d3c267510d2e80e4730f71ff1fa5f61795499

The branch, master has been updated
       via  b28d3c267510d2e80e4730f71ff1fa5f61795499 (commit)
      from  c2f73310d011a7e6b02f6dbedf96826c21a1b88f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=b28d3c267510d2e80e4730f71ff1fa5f61795499
commit b28d3c267510d2e80e4730f71ff1fa5f61795499
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>

    query/ssl: Include link to view certificate details
    
    Signed-off-by: Daniel Silverstone <[email protected]>

diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index d7c1f7e..532223f 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 60f8d89..2dcd079 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 671ba28..cbbead2 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


-----------------------------------------------------------------------

Summary of changes:
 content/fetchers/about.c |   10 +++++++++-
 desktop/browser_window.c |   17 +++++++++++++++++
 resources/FatMessages    |    5 +++++
 3 files changed, 31 insertions(+), 1 deletion(-)

diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index d7c1f7e..532223f 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 60f8d89..2dcd079 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 671ba28..cbbead2 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


-- 
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to