Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/09accc91e95dd19db95d59837a7b264dcb4ceef1
...commit
http://git.netsurf-browser.org/netsurf.git/commit/09accc91e95dd19db95d59837a7b264dcb4ceef1
...tree
http://git.netsurf-browser.org/netsurf.git/tree/09accc91e95dd19db95d59837a7b264dcb4ceef1
The branch, master has been updated
via 09accc91e95dd19db95d59837a7b264dcb4ceef1 (commit)
from 181777791b1be77d9bd1457dc3c8789de5069a01 (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=09accc91e95dd19db95d59837a7b264dcb4ceef1
commit 09accc91e95dd19db95d59837a7b264dcb4ceef1
Author: Michael Drake <[email protected]>
Commit: Michael Drake <[email protected]>
Improve certificate page styling.
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 7ce8ab4..6eb882e 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdarg.h>
+#include "netsurf/inttypes.h"
#include "netsurf/plot_style.h"
#include "utils/log.h"
@@ -1172,7 +1173,7 @@ format_certificate_public_key(struct fetch_about_context
*ctx,
if (public_key->modulus != NULL) {
res = ssenddataf(ctx,
- "<tr><th>Modulus</th><td>%s</td></tr>\n",
+ "<tr><th>Modulus</th><td
class=\"data\">%s</td></tr>\n",
public_key->modulus);
if (res != NSERROR_OK) {
return res;
@@ -1224,7 +1225,7 @@ format_certificate_fingerprint(struct fetch_about_context
*ctx,
if (cert_info->sha256fingerprint != NULL) {
res = ssenddataf(ctx,
- "<tr><th>SHA-256</th><td>%s</td></tr>\n",
+ "<tr><th>SHA-256</th><td
class=\"data\">%s</td></tr>\n",
cert_info->sha256fingerprint);
if (res != NSERROR_OK) {
return res;
@@ -1233,7 +1234,7 @@ format_certificate_fingerprint(struct fetch_about_context
*ctx,
if (cert_info->sha1fingerprint != NULL) {
res = ssenddataf(ctx,
- "<tr><th>SHA-1</th><td>%s</td></tr>\n",
+ "<tr><th>SHA-1</th><td
class=\"data\">%s</td></tr>\n",
cert_info->sha1fingerprint);
if (res != NSERROR_OK) {
return res;
@@ -1247,13 +1248,14 @@ format_certificate_fingerprint(struct
fetch_about_context *ctx,
static nserror
format_certificate(struct fetch_about_context *ctx,
- struct ns_cert_info *cert_info)
+ struct ns_cert_info *cert_info,
+ size_t depth)
{
nserror res;
res = ssenddataf(ctx,
- "<h2 class=\"ns-border\">Certificate: %s</h2>\n",
- cert_info->subject_name.common_name);
+ "<h2 id=\"%"PRIsizet"\" class=\"ns-border\">%s</h2>\n",
+ depth, cert_info->subject_name.common_name);
if (res != NSERROR_OK) {
return res;
}
@@ -1396,14 +1398,40 @@ static bool fetch_about_certificate_handler(struct
fetch_about_context *ctx)
res = convert_chain_to_cert_info(chain, &cert_info);
if (res == NSERROR_OK) {
size_t depth;
+ res = ssenddataf(ctx, "<ul>\n");
+ if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
+ goto fetch_about_certificate_handler_aborted;
+ }
+
for (depth = 0; depth < chain->depth; depth++) {
- res = format_certificate(ctx, cert_info +
depth);
+ res = ssenddataf(ctx, "<li><a
href=\"#%"PRIsizet"\">%s</a></li>\n",
+ depth, (cert_info + depth)
+ ->subject_name
+ .common_name);
if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
+ goto
fetch_about_certificate_handler_aborted;
+ }
+
+ }
+
+ for (depth = 0; depth < chain->depth; depth++) {
+ res = format_certificate(ctx, cert_info + depth,
+ depth);
+ if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
goto
fetch_about_certificate_handler_aborted;
}
}
free_ns_cert_info(cert_info);
+
+ res = ssenddataf(ctx, "</ul>\n");
+ if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
+ goto fetch_about_certificate_handler_aborted;
+ }
} else {
res = ssenddataf(ctx,
"<p>Invalid certificate data</p>\n");
diff --git a/resources/internal.css b/resources/internal.css
index 3829b7b..a6b666b 100644
--- a/resources/internal.css
+++ b/resources/internal.css
@@ -196,18 +196,24 @@ body#dirlist span.size + span.size {
* certificate display style
*/
body#certificate table.info {
- width: 90%;
- margin: 1.2em auto 0;
+ width: 90%;
+ margin: 1.2em auto 0;
}
body#certificate table.info th {
width: 14em;
- text-align: right;
+ vertical-align: top;
+ text-align: right;
font-weight: bold;
font-family: sans-serif;
padding-right: 1em;
}
+body#certificate table.info td.data {
+ font-family: monospace;
+ font-size: 90%;
+}
+
/*
* configuration listing style
-----------------------------------------------------------------------
Summary of changes:
content/fetchers/about.c | 42 +++++++++++++++++++++++++++++++++++-------
resources/internal.css | 12 +++++++++---
2 files changed, 44 insertions(+), 10 deletions(-)
diff --git a/content/fetchers/about.c b/content/fetchers/about.c
index 7ce8ab4..6eb882e 100644
--- a/content/fetchers/about.c
+++ b/content/fetchers/about.c
@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdarg.h>
+#include "netsurf/inttypes.h"
#include "netsurf/plot_style.h"
#include "utils/log.h"
@@ -1172,7 +1173,7 @@ format_certificate_public_key(struct fetch_about_context
*ctx,
if (public_key->modulus != NULL) {
res = ssenddataf(ctx,
- "<tr><th>Modulus</th><td>%s</td></tr>\n",
+ "<tr><th>Modulus</th><td
class=\"data\">%s</td></tr>\n",
public_key->modulus);
if (res != NSERROR_OK) {
return res;
@@ -1224,7 +1225,7 @@ format_certificate_fingerprint(struct fetch_about_context
*ctx,
if (cert_info->sha256fingerprint != NULL) {
res = ssenddataf(ctx,
- "<tr><th>SHA-256</th><td>%s</td></tr>\n",
+ "<tr><th>SHA-256</th><td
class=\"data\">%s</td></tr>\n",
cert_info->sha256fingerprint);
if (res != NSERROR_OK) {
return res;
@@ -1233,7 +1234,7 @@ format_certificate_fingerprint(struct fetch_about_context
*ctx,
if (cert_info->sha1fingerprint != NULL) {
res = ssenddataf(ctx,
- "<tr><th>SHA-1</th><td>%s</td></tr>\n",
+ "<tr><th>SHA-1</th><td
class=\"data\">%s</td></tr>\n",
cert_info->sha1fingerprint);
if (res != NSERROR_OK) {
return res;
@@ -1247,13 +1248,14 @@ format_certificate_fingerprint(struct
fetch_about_context *ctx,
static nserror
format_certificate(struct fetch_about_context *ctx,
- struct ns_cert_info *cert_info)
+ struct ns_cert_info *cert_info,
+ size_t depth)
{
nserror res;
res = ssenddataf(ctx,
- "<h2 class=\"ns-border\">Certificate: %s</h2>\n",
- cert_info->subject_name.common_name);
+ "<h2 id=\"%"PRIsizet"\" class=\"ns-border\">%s</h2>\n",
+ depth, cert_info->subject_name.common_name);
if (res != NSERROR_OK) {
return res;
}
@@ -1396,14 +1398,40 @@ static bool fetch_about_certificate_handler(struct
fetch_about_context *ctx)
res = convert_chain_to_cert_info(chain, &cert_info);
if (res == NSERROR_OK) {
size_t depth;
+ res = ssenddataf(ctx, "<ul>\n");
+ if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
+ goto fetch_about_certificate_handler_aborted;
+ }
+
for (depth = 0; depth < chain->depth; depth++) {
- res = format_certificate(ctx, cert_info +
depth);
+ res = ssenddataf(ctx, "<li><a
href=\"#%"PRIsizet"\">%s</a></li>\n",
+ depth, (cert_info + depth)
+ ->subject_name
+ .common_name);
if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
+ goto
fetch_about_certificate_handler_aborted;
+ }
+
+ }
+
+ for (depth = 0; depth < chain->depth; depth++) {
+ res = format_certificate(ctx, cert_info + depth,
+ depth);
+ if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
goto
fetch_about_certificate_handler_aborted;
}
}
free_ns_cert_info(cert_info);
+
+ res = ssenddataf(ctx, "</ul>\n");
+ if (res != NSERROR_OK) {
+ free_ns_cert_info(cert_info);
+ goto fetch_about_certificate_handler_aborted;
+ }
} else {
res = ssenddataf(ctx,
"<p>Invalid certificate data</p>\n");
diff --git a/resources/internal.css b/resources/internal.css
index 3829b7b..a6b666b 100644
--- a/resources/internal.css
+++ b/resources/internal.css
@@ -196,18 +196,24 @@ body#dirlist span.size + span.size {
* certificate display style
*/
body#certificate table.info {
- width: 90%;
- margin: 1.2em auto 0;
+ width: 90%;
+ margin: 1.2em auto 0;
}
body#certificate table.info th {
width: 14em;
- text-align: right;
+ vertical-align: top;
+ text-align: right;
font-weight: bold;
font-family: sans-serif;
padding-right: 1em;
}
+body#certificate table.info td.data {
+ font-family: monospace;
+ font-size: 90%;
+}
+
/*
* configuration listing style
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]