@peculiar/fortify-webcomponents
Version:
Web-components for creating CSR or Certificate and viewing certificates list using Fortify
1,114 lines (1,071 loc) • 66.1 kB
JavaScript
/*!
* © Peculiar Ventures https://peculiarventures.com/ - BSD 3-Clause License
*/
import { O as OctetString, bq as ByteStream, br as SignedCertificateTimestamp, A as AsnData, b0 as Extension$1, B as AsnParser, bs as CabforganizationIdentifier, bt as NonStandardKeyDescription, bu as BaseCRLNumber, bv as CRLNumber, bw as SubjectInfoAccessSyntax, bx as TNAuthorizationList, by as LogotypeExtn, bz as BiometricSyntax, bA as EntrustVersionInfo, bB as PrivateKeyUsagePeriod, bC as ArchiveRevInfo, bD as Timestamp, bE as LeiRole, bF as LeiChoice, bG as CaVersion, bH as NetscapeCertType, bI as NetscapeComment, bJ as EnrollCertTypeChoice, bK as CertificateTemplate, bp as QCStatements, aN as SubjectKeyIdentifier, bL as SubjectDirectoryAttributes, aR as SubjectAlternativeName, bM as PolicyMappings, bN as PolicyConstraints, bO as NameConstraints, aM as KeyUsage, bP as IssueAlternativeName, I as InvalidityDate, bQ as InhibitAnyPolicy, aL as ExtendedKeyUsage, p as CRLReason, bR as IssuingDistributionPoint, aV as CRLDistributionPoints, ax as CertificatePolicies, q as CertificateIssuer, aK as BasicConstraints, aO as AuthorityKeyIdentifier, aW as AuthorityInfoAccessSyntax, b as buildExports, bS as id_cabforganizationIdentifier, bT as id_ce_keyDescription, bU as id_ce_deltaCRLIndicator, bV as id_ce_cRLNumber, bW as id_pe_subjectInfoAccess, bX as id_pe_TNAuthList, bY as id_pe_biometricInfo, bZ as id_entrust_entrustVersInfo, b_ as id_ce_privateKeyUsagePeriod, b$ as id_adbe_archiveRevInfo, c0 as id_adbe_timestamp, c1 as id_role, c2 as id_lei, c3 as id_caVersion, c4 as id_netscapeCertType, c5 as id_netscapeComment, c6 as id_enrollCertType, c7 as id_certificateTemplate, bo as id_pe_qcStatements, af as id_ce_subjectKeyIdentifier, c8 as id_ce_subjectDirectoryAttributes, ah as id_ce_subjectAltName, c9 as id_ce_policyMappings, ca as id_ce_policyConstraints, cb as id_ce_nameConstraints, ae as id_ce_keyUsage, ak as id_ce_issuerAltName, cc as id_ce_invalidityDate, cd as id_ce_inhibitAnyPolicy, ad as id_ce_extKeyUsage, ce as id_ce_cRLReasons, cf as id_ce_issuingDistributionPoint, ai as id_ce_cRLDistributionPoints, ab as id_ce_certificatePolicies, cg as id_ce_certificateIssuer, ac as id_ce_basicConstraints, ag as id_ce_authorityKeyIdentifier, aj as id_pe_authorityInfoAccess, P as PemConverter, ch as cryptoProvider, l as l10n, o as dateShort, a9 as Name$1, x as OIDs, b3 as OtherName, ci as DisplayText, cj as UserNotice, ck as EDIPartyName, aa as __decorate, cl as AsnProp, cm as AsnPropTypes, cn as AsnType, co as AsnTypeTypes, cp as AsnArray, cq as id_qcs_pkixQCSyntax_v2, cr as SemanticsInformation, cs as AsnIntegerArrayBufferConverter, ct as AttestationApplicationId, cu as RootOfTrust, cv as IntegerSet } from './ssh_certificate.js';
import { h } from '@stencil/core/internal/client';
import { R as RowTitle, a as RowValue, T as TableRowTable, g as getStringByOID, L as Link, D as DownloadIcon } from './download.js';
import { B as Button } from './button.js';
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function camelCaseToWords(value) {
const result = value.replace(/([A-Z])/g, ' $1');
return result.charAt(0).toUpperCase() + result.slice(1);
}
const id_certificateTransparency = "1.3.6.1.4.1.11129.2.4.2";
class CertificateTransparency extends OctetString {
constructor() {
super(...arguments);
this.items = [];
}
fromASN(asn) {
super.fromASN(asn);
const stream = new ByteStream(this.buffer);
const len = stream.readNumber(2);
this.items = [];
while (stream.position < len) {
this.items.push(new SignedCertificateTimestamp(stream));
}
return this;
}
toJSON() {
return this.items.map((o) => o.toJSON());
}
}
const id_pe_logotype = "1.3.6.1.5.5.7.1.12";
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const extensionParsers = {
[id_pe_authorityInfoAccess]: AuthorityInfoAccessSyntax,
[id_ce_authorityKeyIdentifier]: AuthorityKeyIdentifier,
[id_ce_basicConstraints]: BasicConstraints,
[id_ce_certificateIssuer]: CertificateIssuer,
[id_ce_certificatePolicies]: CertificatePolicies,
[id_ce_cRLDistributionPoints]: CRLDistributionPoints,
'2.5.29.46': CRLDistributionPoints,
[id_ce_issuingDistributionPoint]: IssuingDistributionPoint,
[id_ce_cRLReasons]: CRLReason,
[id_ce_extKeyUsage]: ExtendedKeyUsage,
[id_ce_inhibitAnyPolicy]: InhibitAnyPolicy,
[id_ce_invalidityDate]: InvalidityDate,
[id_ce_issuerAltName]: IssueAlternativeName,
[id_ce_keyUsage]: KeyUsage,
[id_ce_nameConstraints]: NameConstraints,
[id_ce_policyConstraints]: PolicyConstraints,
[id_ce_policyMappings]: PolicyMappings,
[id_ce_subjectAltName]: SubjectAlternativeName,
[id_ce_subjectDirectoryAttributes]: SubjectDirectoryAttributes,
[id_ce_subjectKeyIdentifier]: SubjectKeyIdentifier,
[id_pe_qcStatements]: QCStatements,
[id_certificateTemplate]: CertificateTemplate,
[id_enrollCertType]: EnrollCertTypeChoice,
[id_netscapeComment]: NetscapeComment,
[id_netscapeCertType]: NetscapeCertType,
[id_caVersion]: CaVersion,
[id_certificateTransparency]: CertificateTransparency,
[id_lei]: LeiChoice,
[id_role]: LeiRole,
[id_adbe_timestamp]: Timestamp,
[id_adbe_archiveRevInfo]: ArchiveRevInfo,
[id_ce_privateKeyUsagePeriod]: PrivateKeyUsagePeriod,
[id_entrust_entrustVersInfo]: EntrustVersionInfo,
'2.16.724.1.2.2.4.1': BiometricSyntax,
[id_pe_biometricInfo]: BiometricSyntax,
[id_pe_logotype]: LogotypeExtn,
[id_pe_TNAuthList]: TNAuthorizationList,
[id_pe_subjectInfoAccess]: SubjectInfoAccessSyntax,
[id_ce_cRLNumber]: CRLNumber,
[id_ce_deltaCRLIndicator]: BaseCRLNumber,
[id_ce_keyDescription]: NonStandardKeyDescription,
[id_cabforganizationIdentifier]: CabforganizationIdentifier,
};
class Extension extends AsnData {
getAsnExtnValue() {
return this.asn.extnValue.buffer;
}
constructor(raw) {
super(raw, Extension$1);
const asnExtnValue = this.getAsnExtnValue();
try {
const target = extensionParsers[this.asn.extnID];
if (target) {
this.value = AsnParser.parse(asnExtnValue, target);
}
else {
console.warn(`Didn't detect parser for "${this.asn.extnID}" extension.`);
this.value = buildExports.Convert.ToHex(asnExtnValue);
}
}
catch (error) {
console.error(`Error parse "${this.asn.extnID}" extension:`, error.message);
this.value = buildExports.Convert.ToHex(asnExtnValue);
}
}
}
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const certificateRawToBuffer = (raw) => {
if (PemConverter.isPem(raw)) {
return PemConverter.decode(raw)[0];
}
if (buildExports.Convert.isHex(raw)) {
return buildExports.Convert.FromHex(raw);
}
if (buildExports.Convert.isBase64(raw)) {
return buildExports.Convert.FromBase64(raw);
}
if (buildExports.Convert.isBase64Url(raw)) {
return buildExports.Convert.FromBase64Url(raw);
}
return buildExports.Convert.FromBinary(raw);
};
const getCertificateThumbprint = async (algorithm, data) => {
const crypto = cryptoProvider.get();
if (crypto.subtle) {
return crypto.subtle.digest(algorithm, data);
}
return undefined;
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const getLEILink = (lei) => `https://search.gleif.org/#/record/${lei}`;
const getDNSNameLink = (dnsName) => `https://search.censys.io/search?resource=hosts&q=dns.names%3A${dnsName}`;
const getIPAddressLink = (ipAddress) => `https://search.censys.io/search?resource=hosts&q=ip%3A${ipAddress}`;
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const BasicInformation = (props) => {
const { serialNumber, version, validity, notBefore, notAfter, lastUpdate, nextUpdate, type, } = props;
return [
h(RowTitle, { value: l10n.getString('basicInformation') }),
h(RowValue, { name: l10n.getString('type'), value: type }),
h(RowValue, { name: l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
h(RowValue, { name: l10n.getString('version'), value: version }),
h(RowValue, { name: l10n.getString('validity'), value: validity }),
h(RowValue, { name: l10n.getString('issued'), value: notBefore ? dateShort(notBefore) : undefined }),
h(RowValue, { name: l10n.getString('expired'), value: notAfter ? dateShort(notAfter) : undefined }),
h(RowValue, { name: l10n.getString('lastUpdate'), value: lastUpdate ? dateShort(lastUpdate) : undefined }),
h(RowValue, { name: l10n.getString('nextUpdate'), value: nextUpdate ? dateShort(nextUpdate) : undefined }),
];
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const Signature = (props) => {
const { signature } = props;
if (!signature) {
return null;
}
function renderSignatureDetails(data) {
return [
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(data.algorithm) }),
h(RowValue, { name: l10n.getString('value'), value: buildExports.Convert.ToHex(data.value), monospace: true, collapse: true }),
];
}
return [
h(RowTitle, { value: l10n.getString('signature') }),
renderSignatureDetails(signature),
(signature.params && signature.params.length && signature.params.map((param) => (h(TableRowTable, null, renderSignatureDetails(param))))),
];
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const Thumbprints = (props) => {
const { thumbprints } = props;
if (!thumbprints) {
return null;
}
const keys = Object.keys(thumbprints);
if (!keys.length) {
return null;
}
return [
h(RowTitle, { value: l10n.getString('fingerprints') }),
keys.map((name) => (h(RowValue, { name: name, value: thumbprints[name], monospace: true }))),
];
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const BasicExtension = (props, children) => {
const { extension } = props;
return ([
h(RowValue, { name: "Name", value: getStringByOID(extension.asn.extnID) }),
h(RowValue, { name: "Critical", value: extension.asn.critical ? l10n.getString('yes') : l10n.getString('no') }),
children,
h("tr", null, h("td", { colSpan: 2, class: "divider" }, h("span", null))),
]);
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const KeyUsageExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Usage", value: extension.value.toJSON().join(', ') })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const BasicConstraintsExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Certificate Authority", value: extension.value.cA ? l10n.getString('yes') : l10n.getString('no') }), h(RowValue, { name: "Path Length Constraint", value: extension.value.pathLenConstraint })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const ExtendedKeyUsageExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
h(RowValue, { name: "Purposes", value: "" }),
extension.value.map((usage) => (h(TableRowTable, null, h(RowValue, { name: "Purpose", value: getStringByOID(usage) })))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const SubjectKeyIdentifierExtension = (props) => {
const { extension, getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink, } = props;
const keyId = buildExports.Convert.ToHex(extension.value.buffer);
const childrenLink = getSubjectKeyIdChildrenLink(keyId);
const siblingsLink = getSubjectKeyIdSiblingsLink(keyId);
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
childrenLink && (h("span", null, "\u00A0[", h(Link, { href: childrenLink }, "children"), "]")),
siblingsLink && (h("span", null, "\u00A0[", h(Link, { href: siblingsLink }, "siblings"), "]")),
] })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const AuthorityKeyIdentifierExtension = (props) => {
const { extension, getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink, } = props;
const keyId = buildExports.Convert.ToHex(extension.value.keyIdentifier.buffer);
const parentLink = getAuthKeyIdParentLink(keyId);
const siblingsLink = getAuthKeyIdSiblingsLink(keyId);
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
parentLink && (h("span", null, "\u00A0[", h(Link, { href: parentLink }, "parents"), "]")),
siblingsLink && (h("span", null, "\u00A0[", h(Link, { href: siblingsLink }, "siblings"), "]")),
] })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const names = {
otherName: 'Other Name',
rfc822Name: 'RFC 822 Name',
dNSName: 'DNS Name',
x400Address: 'X400 Address',
directoryName: 'Directory Name',
ediPartyName: 'Edi Party Name ',
uniformResourceIdentifier: 'URI',
iPAddress: 'IP Address',
registeredID: 'Registered ID',
};
const GeneralNamePart = (props) => {
const { generalName, getDNSNameLink, getIPAddressLink, } = props;
if (!generalName) {
return null;
}
return Object.keys(generalName).map((name) => {
const value = generalName[name];
if (value instanceof Name$1) {
return [
h(RowValue, { name: names[name] || name, value: "" }),
h(TableRowTable, null, value.map((relativeDistinguishedName) => (relativeDistinguishedName.map((attributeTypeAndValue) => (h(RowValue, { name: OIDs[attributeTypeAndValue.type] || attributeTypeAndValue.type, value: attributeTypeAndValue.value.toString() })))))),
];
}
if (value instanceof OtherName) {
try {
const text = AsnParser.parse(value.value, DisplayText);
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: text.toString() }));
}
catch (_a) {
//
}
try {
const text = AsnParser.parse(value.value, UserNotice);
if (text.explicitText) {
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: text.explicitText.toString() }));
}
}
catch (_b) {
//
}
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: buildExports.Convert.ToHex(value.value), monospace: true }));
}
if (buildExports.BufferSourceConverter.isBufferSource(value)) {
return (h(RowValue, { name: names[name] || name, value: buildExports.Convert.ToString(value) }));
}
if (value instanceof EDIPartyName) {
return (h(RowValue, { name: names[name] || name, value: value.partyName.toString() }));
}
if (name === 'dNSName') {
return (h(RowValue, { name: names[name] || name, value: value, href: getDNSNameLink(value) }));
}
if (name === 'iPAddress') {
return (h(RowValue, { name: names[name] || name, value: value, href: getIPAddressLink(value) }));
}
return (h(RowValue, { name: names[name] || name, value: value }));
});
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const CRLDistributionPointsExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, extension.value.map((point) => {
var _a, _b;
return ([
(_a = point.distributionPoint) === null || _a === void 0 ? void 0 : _a.fullName.map((gn) => (h(GeneralNamePart, Object.assign({ generalName: gn }, props)))),
(_b = point.cRLIssuer) === null || _b === void 0 ? void 0 : _b.map((gn) => (h(GeneralNamePart, Object.assign({ generalName: gn }, props)))),
]);
})));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const InfoAccessSyntaxExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
h(RowValue, { name: "Descriptions", value: "" }),
extension.value.map((description) => (h(TableRowTable, null, h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }), h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props))))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const SubjectAlternativeNameExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, extension.value.map((gn) => (h(GeneralNamePart, Object.assign({ generalName: gn }, props))))));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const CertificatePoliciesExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
h(RowValue, { name: "Policies", value: "" }),
extension.value.map((policy) => (h(TableRowTable, null, h(RowValue, { name: "Policy ID", value: getStringByOID(policy.policyIdentifier) }), policy.policyQualifiers && Boolean(policy.policyQualifiers.length) && ([
h(RowValue, { name: "Qualifiers", value: "" }),
policy.policyQualifiers.map((qualifierInfo) => {
const data = [
h(RowValue, { name: "Qualifier ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
];
if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
const value = AsnParser.parse(qualifierInfo.qualifier, DisplayText);
data.push(h(RowValue, { name: "Value", value: value.toString() }));
}
if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
const value = AsnParser.parse(qualifierInfo.qualifier, UserNotice);
if (value.explicitText) {
data.push(h(RowValue, { name: "Value", value: value.explicitText.toString() }));
}
}
return (h(TableRowTable, null, data));
}),
])))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var logs = {
'9606c02c690033aa1d145f59c6e2648d0549f0df96aab8db915a70d8ecf390a5': 'Akamai CT',
'39376f545f7b4607f59742d768cd5d2437bf3473b6534a4834bcf72e681c83c9': 'Alpha CT',
a577ac9ced7548dd8f025b67a241089df86e0f476ec203c2ecbedb185f282638: 'CNNIC CT',
cdb5179b7fc1c046feea31136a3f8f002e6182faf8896fecc8b2f5b5ab604900: 'Certly.IO',
'1fbc36e002ede97f40199e86b3573b8a4217d80187746ad0da03a06054d20df4': 'Cloudflare “Nimbus2017”',
db74afeecb29ecb1feca3e716d2ce5b9aabb36f7847183c75d9d4f37b61fbf64: 'Cloudflare “Nimbus2018”',
'747eda8331ad331091219cce254f4270c2bffd5e422008c6373579e6107bcc56': 'Cloudflare “Nimbus2019”',
'5ea773f9df56c0e7b536487dd049e0327a919a0c84a112128418759681714558': 'Cloudflare “Nimbus2020”',
'4494652eb0eeceafc44007d8a8fe28c0dae682bed8cb31b53fd33396b5b681a8': 'Cloudflare “Nimbus2021”',
'41c8cab1df22464a10c6a13a0942875e4e318b1b03ebeb4bc768f090629606f6': 'Cloudflare “Nimbus2022”',
'7a328c54d8b72db620ea38e0521ee98416703213854d3bd22bc13a57a352eb52': 'Cloudflare “Nimbus2023”',
'6ff141b5647e4222f7ef052cefae7c21fd608e27d2af5a6e9f4b8a37d6633ee5': 'DigiCert Nessie2018',
fe446108b1d01ab78a62ccfeab6ab2b2babff3abdad80a4d8b30df2d0008830c: 'DigiCert Nessie2019',
c652a0ec48ceb3fcab170992c43a87413309e80065a26252401ba3362a17c565: 'DigiCert Nessie2020',
eec095ee8d72640f92e3c3b91bc712a3696a097b4b6a1a1438e647b2cbedc5f9: 'DigiCert Nessie2021',
'51a3b0f5fd01799c566db837788f0ca47acc1b27cbf79e88429a0dfed48b05e5': 'DigiCert Nessie2022',
b3737707e18450f86386d605a9dc11094a792db1670c0b87dcf0030e7936a59a: 'DigiCert Nessie2023',
'5614069a2fd7c2ecd3f5e1bd44b23ec74676b9bc99115cc0ef949855d689d0dd': 'DigiCert Server',
'8775bfe7597cf88c43995fbdf36eff568d475636ff4ab560c1b4eaff5ea0830f': 'DigiCert Server 2',
c1164ae0a772d2d4392dc80ac10770d4f0c49bde991a4840c1fa075164f63360: 'DigiCert Yeti2018',
e2694bae26e8e94009e8861bb63b83d43ee7fe7488fba48f2893019dddf1dbfe: 'DigiCert Yeti2019',
f095a459f200d18240102d2f93888ead4bfe1d47e399e1d034a6b0a8aa8eb273: 'DigiCert Yeti2020',
'5cdc4392fee6ab4544b15e9ad456e61037fbd5fa47dca17394b25ee6f6c70eca': 'DigiCert Yeti2021',
'2245450759552456963fa12ff1f76d86e0232663adc04b7f5dc6835c6ee20f02': 'DigiCert Yeti2022',
'35cf191bbfb16c57bf0fad4c6d42cbbbb627202651ea3fe12aefa803c33bd64c': 'DigiCert Yeti2023',
'717ea7420975be84a2723553f1777c26dd51af4e102144094d9019b462fb6668': 'GDCA 1',
'14308d90ccd030135005c01ca526d81e84e87624e39b6248e08f724aea3bb42a': 'GDCA 2',
c9cf890a21109c666cc17a3ed065c930d0e0135a9feba85af14210b8072421aa: 'GDCA CT #1',
'924a30f909336ff435d6993a10ac75a2c641728e7fc2d659ae6188ffad40ce01': 'GDCA CT #2',
fad4c97cc49ee2f8ac85c5ea5cea09d0220dbbf4e49c6b50662ff868f86b8c28: 'Google “Argon2017”',
a4501269055a15545e6211ab37bc103f62ae5576a45e4b1714453e1b22106a25: 'Google “Argon2018”',
'63f2dbcde83bcc2ccf0b728427576b33a48d61778fbd75a638b1c768544bd88d': 'Google “Argon2019”',
b21e05cc8ba2cd8a204e8766f92bb98a2520676bdafa70e7b249532def8b905e: 'Google “Argon2020”',
f65c942fd1773022145418083094568ee34d131933bfdf0c2f200bcc4ef164e3: 'Google “Argon2021”',
'2979bef09e393921f056739f63a577e5be577d9c600af8f94d5d265c255dc784': 'Google “Argon2022”',
e83ed0da3ef5063532e75728bc896bc903d3cbd1116beceb69e1777d6d06bd6e: 'Google “Argon2023”',
'68f698f81f6482be3a8ceeb9281d4cfc71515d6793d444d10a67acbb4f4ffbc4': 'Google “Aviator”',
c3bf03a7e1ca8841c607bae3ff4270fca5ec45b186ebbe4e2cf3fc778630f5f6: 'Google “Crucible”',
'1d024b8eb1498b344dfd87ea3efc0996f7506f235d1d497061a4773c439c25fb': 'Google “Daedalus”',
'293c519654c83965baaa50fc5807d4b76fbf587a2972dca4c30cf4e54547f478': 'Google “Icarus”',
a4b90990b418581487bb13a2cc67700a3c359804f91bdfb8e377cd0ec80ddc10: 'Google “Pilot”',
ee4bbdb775ce60bae142691fabe19e66a30f7e5fb072d88300c47b897aa8fdcb: 'Google “Rocketeer”',
bbd9dfbc1f8a71b593942397aa927b473857950aab52e81a909664368e1ed185: 'Google “Skydiver”',
'52eb4b225ec896974850675f23e43bc1d021e3214ce52ecd5fa87c203cdfca03': 'Google “Solera2018”',
'0b760e9a8b9a682f88985b15e947501a56446bba8830785c3842994386450c00': 'Google “Solera2019”',
'1fc72ce5a1b799f400c359bff96ca3913548e8644220610952e9ba1774f7bac7': 'Google “Solera2020”',
a3c99845e80ab7ce00157b3742df0207dd272b2b602ecf98ee2c12db9c5ae7e7: 'Google “Solera2021”',
'697aafca1a6b536fae21205046debad7e0eaea13d2432e6e9d8fb379f2b9aaf3': 'Google “Solera2022”',
a899d8780c9290aaf462f31880ccfbd52451e970d0fbf591ef75b0d99b645681: 'Google “Submariner”',
b0cc83e5a5f97d6baf7c09cc284904872ac7e88b132c6350b7c6fd26e16c6c77: 'Google “Testtube”',
b10cd559a6d67846811f7df9a51532739ac48d703bea0323da5d38755bc0ad4e: 'Google “Xenon2018”',
'084114980071532c16190460bcfc47fdc2653afa292c72b37ff863ae29ccc9f0': 'Google “Xenon2019”',
'07b75c1be57d68fff1b0c61d2315c7bae6577c5794b76aeebc613a1a69d3a21c': 'Google “Xenon2020”',
'7d3ef2f88fff88556824c2c0ca9e5289792bc50e78097f2e6a9768997e22f0d7': 'Google “Xenon2021”',
'46a555eb75fa912030b5a28969f4f37d112c4174befd49b885abf2fc70fe6d47': 'Google “Xenon2022”',
'7461b4a09cfb3d41d75159575b2e7649a445a8d27709b0cc564a6482b7eb41a3': 'Izenpe',
'8941449c70742e06b9fc9ce7b116ba0024aa36d59af44f0204404f00f7ea8566': 'Izenpe “Argi”',
'296afa2d568bca0d2ea844956ae9721fc35fa355ecda99693aafd458a71aefdd': 'Let“s Encrypt ”Clicky”',
'537b69a3564335a9c04904e39593b2c298eb8d7a6e83023635c627248cd6b440': 'Nordu “flimsy”',
aae70b7f3cb8d566c86c2f16979c9f445f69ab0eb4535589b2f77a030104f3cd: 'Nordu “plausible”',
e0127629e90496564e3d0147984498aa48f8adb16600eb7902a1ef9909906273: 'PuChuangSiDa CT',
cf55e28923497c340d5206d05353aeb25834b52f1f8dc9526809f212efdd7ca6: 'SHECA CT 1',
'32dc59c2d4c41968d56e14bc61ac8f0e45db39faf3c155aa4252f5001fa0c623': 'SHECA CT 2',
db76fdadac65e7d09508886e2159bd8b90352f5fead3e3dc5e22eb350acc7b98: 'Sectigo (Comodo) “Dodo” CT',
'6f5376ac31f03119d89900a45115ff77151c11d902c10029068db2089a37d913': 'Sectigo (Comodo) “Mammoth” CT',
'5581d4c2169036014aea0b9b573c53f0c0e43878702508172fa3aa1d0713d30c': 'Sectigo (Comodo) “Sabre” CT',
'34bb6ad6c3df9c03eea8a499ff7891486c9d5e5cac92d01f7bfd1bce19db48ef': 'StartCom',
ddeb1d2b7a0d4fa6208b81ad8168707e2e8e9d01d55c888d3d11c4cdb6ecbecc: 'Symantec',
a7ce4a4e6207e0addee5fdaa4b1f86768767b5d002a55d47310e7e670a95eab2: 'Symantec Deneb',
'15970488d7b997a05beb52512adee8d2e8b4a3165264121a9fabfbd5f85ad93f': 'Symantec “Sirius”',
bc78e1dfc5f63c684649334da10fa15f0979692009c081b4f3f6917f3ed9b8a5: 'Symantec “Vega”',
b0b784bc81c0ddc47544e883f05985bb9077d134d8ab88b2b2e533980b8e508b: 'Up In The Air “Behind the Sofa”',
ac3b9aed7fa9674757159e6d7d575672f9d98100941e9bdeffeca1313b75782d: 'Venafi',
'03019df3fd85a69a8ebd1facc6da9ba73e469774fe77f579fc5a08b8328c1d6b': 'Venafi Gen2 CT',
'41b2dc2e89e63ce4af1ba7bb29bf68c6dee6f9f1cc047e30dffae3b3ba259263': 'WoSign',
'63d0006026dde10bb0601f452446965ee2b6ea2cd4fbc95ac866a550af9075b7': 'WoSign 2',
'9e4ff73dc3ce220b69217c899e468076abf8d78636d5ccfc85a31a75628ba88b': 'WoSign CT #1',
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const CertificateTransparencyExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.items.length) && ([
h(RowValue, { name: "Signed Certificate Timestamps", value: "" }),
extension.value.toJSON().map((signedCertificateTimestamp) => (h(TableRowTable, null, h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }), h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }), h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }), h(RowValue, { name: "Timestamp", value: dateShort(signedCertificateTimestamp.timestamp) }), h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }), h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true }), h(RowValue, { name: "Extensions", value: signedCertificateTimestamp.extensions || undefined, monospace: true })))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const NameConstraintsExtension = (props) => {
var _a, _b;
const { extension } = props;
return (h(BasicExtension, { extension: extension }, (_a = extension.value.excludedSubtrees) === null || _a === void 0 ? void 0 :
_a.map((generalSubtree) => (h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props)))), (_b = extension.value.permittedSubtrees) === null || _b === void 0 ? void 0 :
_b.map((generalSubtree) => (h(GeneralNamePart, Object.assign({ generalName: generalSubtree.base }, props))))));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const CertificateTemplateExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Template ID", value: extension.value.templateID }), h(RowValue, { name: "Template Major Version", value: extension.value.templateMajorVersion }), h(RowValue, { name: "Template Minor Version", value: extension.value.templateMinorVersion })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const EnrollCertTypeChoiceExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Name", value: extension.value.toString() })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const CaVersionExtension = (props) => {
const { extension } = props;
const version = extension.value.getVersion();
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Certificate Index", value: version.certificateIndex }), h(RowValue, { name: "Key Index", value: version.keyIndex })));
};
var PdsLocations_1, QcEuPDS_1, QcType_1, QcCClegislation_1;
let Iso4217CurrencyCode = class Iso4217CurrencyCode {
constructor(value) {
if (typeof value === "string") {
this.alphabetic = value;
}
else if (typeof value === "number") {
this.numeric = value;
}
}
};
__decorate([
AsnProp({ type: AsnPropTypes.PrintableString })
], Iso4217CurrencyCode.prototype, "alphabetic", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.PrintableString })
], Iso4217CurrencyCode.prototype, "numeric", void 0);
Iso4217CurrencyCode = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], Iso4217CurrencyCode);
class MonetaryValue {
constructor(params = {}) {
this.currency = new Iso4217CurrencyCode();
this.amount = 0;
this.exponent = 0;
Object.assign(this, params);
}
}
__decorate([
AsnProp({ type: Iso4217CurrencyCode })
], MonetaryValue.prototype, "currency", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], MonetaryValue.prototype, "amount", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], MonetaryValue.prototype, "exponent", void 0);
let QcEuLimitValue = class QcEuLimitValue extends MonetaryValue {
};
QcEuLimitValue = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], QcEuLimitValue);
let QcEuRetentionPeriod = class QcEuRetentionPeriod {
constructor(value = 0) {
this.value = value;
}
};
__decorate([
AsnProp({ type: AsnPropTypes.Integer })
], QcEuRetentionPeriod.prototype, "value", void 0);
QcEuRetentionPeriod = __decorate([
AsnType({ type: AsnTypeTypes.Choice })
], QcEuRetentionPeriod);
let PdsLocation = class PdsLocation {
constructor(params = {}) {
this.url = "";
this.language = "";
Object.assign(this, params);
}
};
__decorate([
AsnProp({ type: AsnPropTypes.IA5String })
], PdsLocation.prototype, "url", void 0);
__decorate([
AsnProp({ type: AsnPropTypes.PrintableString })
], PdsLocation.prototype, "language", void 0);
PdsLocation = __decorate([
AsnType({ type: AsnTypeTypes.Sequence })
], PdsLocation);
let PdsLocations = PdsLocations_1 = class PdsLocations extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, PdsLocations_1.prototype);
}
};
PdsLocations = PdsLocations_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: PdsLocation })
], PdsLocations);
let QcEuPDS = QcEuPDS_1 = class QcEuPDS extends PdsLocations {
constructor(items) {
super(items);
Object.setPrototypeOf(this, QcEuPDS_1.prototype);
}
};
QcEuPDS = QcEuPDS_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: PdsLocation })
], QcEuPDS);
let QcType = QcType_1 = class QcType extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, QcType_1.prototype);
}
};
QcType = QcType_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: AsnPropTypes.ObjectIdentifier })
], QcType);
let QcCClegislation = QcCClegislation_1 = class QcCClegislation extends AsnArray {
constructor(items) {
super(items);
Object.setPrototypeOf(this, QcCClegislation_1.prototype);
}
};
QcCClegislation = QcCClegislation_1 = __decorate([
AsnType({ type: AsnTypeTypes.Sequence, itemType: AsnPropTypes.PrintableString })
], QcCClegislation);
const id_etsi_qcs = "0.4.0.1862.1";
const id_etsi_qcs_qcRetentionPeriod = `${id_etsi_qcs}.3`;
const id_etsi_qcs_qcPDS = `${id_etsi_qcs}.5`;
const id_etsi_qcs_qcType = `${id_etsi_qcs}.6`;
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const QCStatementsExtension = (props) => {
const { extension } = props;
function renderStatementInfo(statementId, statementInfo) {
if (!statementInfo || !statementInfo.byteLength) {
return null;
}
if (statementId === id_qcs_pkixQCSyntax_v2) {
const semanticsInformation = AsnParser.parse(statementInfo, SemanticsInformation);
return (h(RowValue, { name: "Semantics Identifier", value: getStringByOID(semanticsInformation.semanticsIdentifier) }));
}
if (statementId === id_etsi_qcs_qcType) {
const qcTypes = AsnParser.parse(statementInfo, QcType);
return (h(RowValue, { name: "QC Types", value: qcTypes.map((type) => getStringByOID(type)).join(', ') }));
}
if (statementId === id_etsi_qcs_qcRetentionPeriod) {
const retentionPeriod = AsnParser.parse(statementInfo, QcEuRetentionPeriod);
return (h(RowValue, { name: "Retention Period", value: `${retentionPeriod.value} years` }));
}
if (statementId === id_etsi_qcs_qcPDS) {
const pdsLocations = AsnParser.parse(statementInfo, PdsLocations);
return ([
h(RowValue, { name: "PDS Locations", value: "" }),
pdsLocations.map((location) => (h(TableRowTable, null, h(RowValue, { name: "URL", value: location.url }), h(RowValue, { name: "Language", value: location.language })))),
]);
}
return (h(RowValue, { name: "Info", value: buildExports.Convert.ToHex(statementInfo), monospace: true }));
}
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
h(RowValue, { name: "Statements", value: "" }),
extension.value.map((statement) => (h(TableRowTable, null, h(RowValue, { name: "Statement ID", value: getStringByOID(statement.statementId) }), renderStatementInfo(statement.statementId, statement.statementInfo)))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const NetscapeCommentExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Comment", value: extension.value.value })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const NetscapeCertTypeExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Type", value: extension.value.toJSON().join(', ') })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const LeiRoleExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Role", value: extension.value.text })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const LeiExtension = (props) => {
const { extension, getLEILink } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Identifier", value: extension.value.text, href: getLEILink(extension.value.text) })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const TimestampExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Version", value: extension.value.version }), h(GeneralNamePart, Object.assign({ generalName: extension.value.location }, props)), h(RowValue, { name: "Requires Auth", value: extension.value.requiresAuth ? l10n.getString('yes') : l10n.getString('no') })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const ArchiveRevInfoExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Version", value: extension.value.version })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const CRLReasonExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Reason", value: extension.value.toJSON() })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
function getAttributeValue(attribute) {
return buildExports.Convert.ToString(attribute.values[0]);
}
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const SubjectDirectoryAttributesExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
h(RowValue, { name: "Attributes", value: "" }),
extension.value.map((attribute) => (h(TableRowTable, null, h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }), h(RowValue, { name: "Value", value: getAttributeValue(attribute) })))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const AsStringExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Value", value: extension.value, monospace: true })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const PrivateKeyUsagePeriodExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Not Before", value: dateShort(extension.value.notBefore) }), h(RowValue, { name: "Not After", value: dateShort(extension.value.notAfter) })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const EntrustVersionInfoExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Version", value: extension.value.entrustVers }), h(RowValue, { name: "Info Flags", value: extension.value.entrustInfoFlags.toJSON().join(', ') })));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const BiometricSyntaxExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
h(RowValue, { name: "Biometrics", value: "" }),
extension.value.map((data) => (h(TableRowTable, null, h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }), h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }), h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }), h(RowValue, { name: "Hash", value: buildExports.Convert.ToHex(data.biometricDataHash.buffer), monospace: true }), h(RowValue, { name: "Source Uri", value: data.sourceDataUri })))),
])));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const LogotypeExtension = (props) => {
const { extension } = props;
const renderImage = (image) => {
if (!image) {
return null;
}
return image.map((img) => {
const { imageDetails } = img;
return [
h(RowValue, { name: "Image Type", value: imageDetails.mediaType }),
h(RowValue, { name: "Image Hash", value: buildExports.Convert.ToHex(imageDetails.logotypeHash[0].hashValue), monospace: true }),
h(RowValue, { name: "Image URL", value: imageDetails.logotypeURI[0], monospace: true, collapse: true }),
h(RowValue, { name: "Image Hash Algorithm", value: getStringByOID(imageDetails.logotypeHash[0].hashAlg.algorithm) }),
];
});
};
const renderAudio = (audio) => {
if (!audio) {
return null;
}
return audio.map((aud) => {
const { audioDetails } = aud;
return [
h(RowValue, { name: "Audio Type", value: audioDetails.mediaType }),
h(RowValue, { name: "Audio Hash", value: buildExports.Convert.ToHex(audioDetails.logotypeHash[0].hashValue), monospace: true }),
h(RowValue, { name: "Audio URL", value: audioDetails.logotypeURI[0], monospace: true, collapse: true }),
h(RowValue, { name: "Audio Hash Algorithm", value: getStringByOID(audioDetails.logotypeHash[0].hashAlg.algorithm) }),
];
});
};
const renderLogo = (title, info) => {
if (!info || !info.direct) {
return null;
}
const { image, audio } = info.direct;
return [
h(RowValue, { name: "Type", value: title }),
renderImage(image),
renderAudio(audio),
h("tr", null, h("td", null), h("td", null)),
];
};
return (h(BasicExtension, { extension: extension }, renderLogo('Subject', extension.value.subjectLogo), renderLogo('Issuer', extension.value.issuerLogo)));
};
/*!
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
*/
/**
* @license
* Copyright (c) Peculiar Ventures, LLC.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
const TNAuthListExtension = (props) => {
const { extension } = props;
return (h(BasicExtension, { extension: extension }, extension.value.length > 0 && ([
h(RowValue, { name: "Entries", value: "" }),
extension.value.map((entry) => (h(TableRowTable, null, h(RowValue, { name: "SPC", value: entry.spc }), h(RowValue, { name: "Range", value: entry.range ? `start=${entry.range.start} count==${entry.range.count}` : null }), h(RowValue, { name: "One", value: entry.one })))),
]