Bug 1620224 - improve display for non-dNSName subjectAltNames. r=johannh,fluent-reviewers,flod

Handle rfc822Name and iPAddress subjectAltNames, and replace "[object
Object]" with an explicit "unsupported" string for otherName.

Differential Revision: https://phabricator.services.mozilla.com/D65749

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Julien Cristau 2020-03-09 11:54:27 +00:00
Родитель 1ec8fd96f5
Коммит ef4b89a74c
2 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -38,6 +38,7 @@ export class InfoItem extends HTMLElement {
// existing labels and avoid duplicates.
let stringMapping = {
signaturealgorithm: "signature-algorithm",
"rfc-822-name": "email-address",
};
let fluentID = stringMapping[labelId] || labelId;
@ -50,6 +51,10 @@ export class InfoItem extends HTMLElement {
this.handleTimeZone(info);
return;
}
if (labelId === "other-name") {
info.setAttribute("data-l10n-id", "certificate-viewer-unsupported");
return;
}
if (typeof this.item.info === "boolean") {
document.l10n.setAttributes(info, "certificate-viewer-boolean", {
boolean: this.item.info,

Просмотреть файл

@ -22,6 +22,8 @@ certificate-viewer-country = Country
certificate-viewer-curve = Curve
certificate-viewer-distribution-point = Distribution Point
certificate-viewer-dns-name = DNS Name
certificate-viewer-ip-address = IP Address
certificate-viewer-other-name = Other Name
certificate-viewer-exponent = Exponent
certificate-viewer-id = ID
certificate-viewer-key-exchange-group = Key Exchange Group
@ -44,6 +46,7 @@ certificate-viewer-purposes = Purposes
certificate-viewer-qualifier = Qualifier
certificate-viewer-qualifiers = Qualifiers
certificate-viewer-required = Required
certificate-viewer-unsupported = <unsupported>
# Inc. means Incorporated, e.g GitHub is incorporated in Delaware
certificate-viewer-inc-state-province = Inc. State/Province
certificate-viewer-state-province = State/Province