@peculiar/certificates-viewer 1.20.1 → 1.20.2-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{download-061c8763.js → download-aed99556.js} +3691 -7058
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +24 -24
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +1 -1
- package/dist/esm/{download-250f9495.js → download-1580501c.js} +3690 -7058
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +24 -24
- package/dist/esm/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/{download-250f9495.js → download-1580501c.js} +2358 -4499
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_9.entry.js +24 -24
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/peculiar/{p-293edf5c.system.entry.js → p-344c2502.system.entry.js} +1 -1
- package/dist/peculiar/p-557d912f.system.js +1 -1
- package/dist/peculiar/p-6639fba3.system.js +100 -0
- package/dist/peculiar/p-7c7cd1d9.js +100 -0
- package/dist/peculiar/p-9351b95f.system.entry.js +457 -0
- package/dist/peculiar/p-ad2ab9ac.entry.js +110 -0
- package/dist/peculiar/{p-75793893.entry.js → p-efc86dbf.entry.js} +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/package.json +20 -20
- package/dist/peculiar/p-31a15658.entry.js +0 -110
- package/dist/peculiar/p-636aea18.system.js +0 -78
- package/dist/peculiar/p-aece90c7.system.entry.js +0 -457
- package/dist/peculiar/p-e5769859.js +0 -77
|
@@ -48,8 +48,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
import { h, r as registerInstance, H as Host, c as createEvent } from './index-5ef692cc.js';
|
|
51
|
-
import { A as AsnData, a as Attribute$1, i as index, b as id_pkcs9_at_extensionRequest, c as AsnParser, E as ExtensionRequest, d as Extension, e as AsnConvert, f as id_pkcs9_at_unstructuredName, U as UnstructuredName, g as id_pkcs9_at_challengePassword, C as ChallengePassword, h as id_ValuationRanking, V as ValuationRanking, j as id_InsuranceValue, I as InsuranceValue, k as id_WebGDPR, W as WebGDPR, l as id_ActivityDescription, m as ActivityDescription, n as id_TypeRelationship, T as TypeRelationship, o as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, p as id_DomainNameOwner, q as DomainNameOwner, r as id_DomainNameLegalRepresentative, s as DomainNameLegalRepresentative, t as id_DomainNameBeneficiary, u as DomainNameBeneficiary, v as certificateRawToBuffer, w as AttributeCertificate, x as getCertificateThumbprint, y as hexFormat, z as base64Format, B as CertificationRequest, N as Name, F as id_ecPublicKey, G as ECParameters, H as id_rsaEncryption, R as RSAPublicKey, O as OIDs, J as Name$1, K as OtherName, L as DisplayText, M as UserNotice, P as EDIPartyName, Q as AsnIntegerArrayBufferConverter, S as KeyUsage, X as BasicConstraints, Y as ExtendedKeyUsage, Z as SubjectKeyIdentifier, _ as AuthorityKeyIdentifier, $ as CRLDistributionPoints, a0 as AuthorityInfoAccessSyntax, a1 as SubjectInfoAccessSyntax, a2 as SubjectAlternativeName, a3 as CertificatePolicies, a4 as CertificateTransparency, a5 as NameConstraints, a6 as CertificateTemplate, a7 as EnrollCertTypeChoice, a8 as CaVersion, a9 as QCStatements, aa as NetscapeComment, ab as NetscapeCertType, ac as LeiRole, ad as LeiChoice, ae as Timestamp, af as ArchiveRevInfo, ag as CRLReason, ah as SubjectDirectoryAttributes, ai as PrivateKeyUsagePeriod, aj as EntrustVersionInfo, ak as BiometricSyntax, al as LogotypeExtn, am as TNAuthorizationList, an as PolicyConstraints, ao as PolicyMappings, ap as Download, aq as isPem, ar as isX509Pem, as as isPkcs10Pem, at as isX509AttributePem, au as X509Certificate } from './download-250f9495.js';
|
|
52
51
|
import { d as dateDiff, l as l10n, a as dateShort, h as history } from './l10n-c8cf6930.js';
|
|
52
|
+
import { A as AsnData, a as Attribute$1, b as build_2, i as id_pkcs9_at_extensionRequest, c as AsnParser, E as ExtensionRequest, d as Extension, e as AsnConvert, f as id_pkcs9_at_unstructuredName, U as UnstructuredName, g as id_pkcs9_at_challengePassword, C as ChallengePassword, h as id_ValuationRanking, V as ValuationRanking, j as id_InsuranceValue, I as InsuranceValue, k as id_WebGDPR, W as WebGDPR, l as id_ActivityDescription, m as ActivityDescription, n as id_TypeRelationship, T as TypeRelationship, o as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, p as id_DomainNameOwner, q as DomainNameOwner, r as id_DomainNameLegalRepresentative, s as DomainNameLegalRepresentative, t as id_DomainNameBeneficiary, u as DomainNameBeneficiary, v as certificateRawToBuffer, w as AttributeCertificate, x as getCertificateThumbprint, y as hexFormat, z as base64Format, B as CertificationRequest, N as Name, F as id_ecPublicKey, G as ECParameters, H as id_rsaEncryption, R as RSAPublicKey, O as OIDs, J as Name$1, K as OtherName, L as DisplayText, M as UserNotice, P as build_1, Q as EDIPartyName, S as AsnIntegerArrayBufferConverter, X as KeyUsage, Y as BasicConstraints, Z as ExtendedKeyUsage, _ as SubjectKeyIdentifier, $ as AuthorityKeyIdentifier, a0 as CRLDistributionPoints, a1 as AuthorityInfoAccessSyntax, a2 as SubjectInfoAccessSyntax, a3 as SubjectAlternativeName, a4 as CertificatePolicies, a5 as CertificateTransparency, a6 as NameConstraints, a7 as CertificateTemplate, a8 as EnrollCertTypeChoice, a9 as CaVersion, aa as QCStatements, ab as NetscapeComment, ac as NetscapeCertType, ad as LeiRole, ae as LeiChoice, af as Timestamp, ag as ArchiveRevInfo, ah as CRLReason, ai as SubjectDirectoryAttributes, aj as PrivateKeyUsagePeriod, ak as EntrustVersionInfo, al as BiometricSyntax, am as LogotypeExtn, an as TNAuthorizationList, ao as PolicyConstraints, ap as PolicyMappings, aq as Download, ar as isPem, as as isX509Pem, at as isPkcs10Pem, au as isX509AttributePem, av as X509Certificate } from './download-1580501c.js';
|
|
53
53
|
/**
|
|
54
54
|
* @license
|
|
55
55
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -134,7 +134,7 @@ var Attribute = /** @class */ (function (_super) {
|
|
|
134
134
|
break;
|
|
135
135
|
}
|
|
136
136
|
default:
|
|
137
|
-
_this.value =
|
|
137
|
+
_this.value = build_2.ToHex(asnExtnValue);
|
|
138
138
|
}
|
|
139
139
|
return _this;
|
|
140
140
|
}
|
|
@@ -159,7 +159,7 @@ var X509AttributeCertificate = /** @class */ (function (_super) {
|
|
|
159
159
|
_this.thumbprints = {};
|
|
160
160
|
_this.type = 'X.509 Attribute Certificate';
|
|
161
161
|
var acinfo = _this.asn.acinfo;
|
|
162
|
-
_this.serialNumber =
|
|
162
|
+
_this.serialNumber = build_2.ToHex(acinfo.serialNumber);
|
|
163
163
|
_this.version = acinfo.version;
|
|
164
164
|
var notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;
|
|
165
165
|
if (!notBefore) {
|
|
@@ -212,7 +212,7 @@ var X509AttributeCertificate = /** @class */ (function (_super) {
|
|
|
212
212
|
return [4 /*yield*/, getCertificateThumbprint(algorithm, this.raw)];
|
|
213
213
|
case 1:
|
|
214
214
|
thumbprint = _c.sent();
|
|
215
|
-
this.thumbprints[algorithm['name'] || algorithm] =
|
|
215
|
+
this.thumbprints[algorithm['name'] || algorithm] = build_2.ToHex(thumbprint);
|
|
216
216
|
return [3 /*break*/, 3];
|
|
217
217
|
case 2:
|
|
218
218
|
error_1 = _c.sent();
|
|
@@ -224,10 +224,10 @@ var X509AttributeCertificate = /** @class */ (function (_super) {
|
|
|
224
224
|
});
|
|
225
225
|
};
|
|
226
226
|
X509AttributeCertificate.prototype.exportAsBase64 = function () {
|
|
227
|
-
return
|
|
227
|
+
return build_2.ToBase64(this.raw);
|
|
228
228
|
};
|
|
229
229
|
X509AttributeCertificate.prototype.exportAsHexFormatted = function () {
|
|
230
|
-
return hexFormat(
|
|
230
|
+
return hexFormat(build_2.ToHex(this.raw));
|
|
231
231
|
};
|
|
232
232
|
X509AttributeCertificate.prototype.exportAsPemFormatted = function () {
|
|
233
233
|
return "-----BEGIN ATTRIBUTE CERTIFICATE-----\n" + base64Format(this.exportAsBase64()) + "\n-----END ATTRIBUTE CERTIFICATE-----";
|
|
@@ -317,7 +317,7 @@ var CSR = /** @class */ (function (_super) {
|
|
|
317
317
|
return [4 /*yield*/, getCertificateThumbprint(algorithm, this.raw)];
|
|
318
318
|
case 1:
|
|
319
319
|
thumbprint = _c.sent();
|
|
320
|
-
this.thumbprints[algorithm['name'] || algorithm] =
|
|
320
|
+
this.thumbprints[algorithm['name'] || algorithm] = build_2.ToHex(thumbprint);
|
|
321
321
|
return [3 /*break*/, 3];
|
|
322
322
|
case 2:
|
|
323
323
|
error_2 = _c.sent();
|
|
@@ -336,10 +336,10 @@ var CSR = /** @class */ (function (_super) {
|
|
|
336
336
|
}
|
|
337
337
|
};
|
|
338
338
|
CSR.prototype.exportAsBase64 = function () {
|
|
339
|
-
return
|
|
339
|
+
return build_2.ToBase64(this.raw);
|
|
340
340
|
};
|
|
341
341
|
CSR.prototype.exportAsHexFormatted = function () {
|
|
342
|
-
return hexFormat(
|
|
342
|
+
return hexFormat(build_2.ToHex(this.raw));
|
|
343
343
|
};
|
|
344
344
|
CSR.prototype.exportAsPemFormatted = function () {
|
|
345
345
|
return "-----BEGIN CERTIFICATE REQUEST-----\n" + base64Format(this.exportAsBase64()) + "\n-----END CERTIFICATE REQUEST-----";
|
|
@@ -419,7 +419,7 @@ var Signature = function (props) {
|
|
|
419
419
|
return [
|
|
420
420
|
h(RowTitle, { value: l10n.getString('signature') }),
|
|
421
421
|
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(signature.algorithm) }),
|
|
422
|
-
h(RowValue, { name: l10n.getString('value'), value:
|
|
422
|
+
h(RowValue, { name: l10n.getString('value'), value: build_2.ToHex(signature.value), monospace: true, collapse: true }),
|
|
423
423
|
];
|
|
424
424
|
};
|
|
425
425
|
/**
|
|
@@ -510,13 +510,13 @@ var GeneralNamePart = function (props) {
|
|
|
510
510
|
catch (error) {
|
|
511
511
|
//
|
|
512
512
|
}
|
|
513
|
-
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value:
|
|
513
|
+
return (h(RowValue, { name: OIDs[value.typeId] || value.typeId, value: build_2.ToHex(value.value), monospace: true }));
|
|
514
514
|
}
|
|
515
|
-
if (
|
|
516
|
-
return (h(RowValue, { name: names[name] || name, value:
|
|
515
|
+
if (build_1.isBufferSource(value)) {
|
|
516
|
+
return (h(RowValue, { name: names[name] || name, value: build_2.ToString(value) }));
|
|
517
517
|
}
|
|
518
518
|
if (value instanceof EDIPartyName) {
|
|
519
|
-
return (h(RowValue, { name: names[name] || name, value:
|
|
519
|
+
return (h(RowValue, { name: names[name] || name, value: build_2.ToString(value.partyName) }));
|
|
520
520
|
}
|
|
521
521
|
if (name === 'dNSName') {
|
|
522
522
|
return (h(RowValue, { name: names[name] || name, value: value, href: getDNSNameLink(value) }));
|
|
@@ -761,7 +761,7 @@ var ExtendedKeyUsageExtension = function (props) {
|
|
|
761
761
|
*/
|
|
762
762
|
var SubjectKeyIdentifierExtension = function (props) {
|
|
763
763
|
var extension = props.extension, getSubjectKeyIdChildrenLink = props.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink = props.getSubjectKeyIdSiblingsLink;
|
|
764
|
-
var keyId =
|
|
764
|
+
var keyId = build_2.ToHex(extension.value.buffer);
|
|
765
765
|
var childrenLink = getSubjectKeyIdChildrenLink(keyId);
|
|
766
766
|
var siblingsLink = getSubjectKeyIdSiblingsLink(keyId);
|
|
767
767
|
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
|
|
@@ -778,7 +778,7 @@ var SubjectKeyIdentifierExtension = function (props) {
|
|
|
778
778
|
*/
|
|
779
779
|
var AuthorityKeyIdentifierExtension = function (props) {
|
|
780
780
|
var extension = props.extension, getAuthKeyIdParentLink = props.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink = props.getAuthKeyIdSiblingsLink;
|
|
781
|
-
var keyId =
|
|
781
|
+
var keyId = build_2.ToHex(extension.value.keyIdentifier.buffer);
|
|
782
782
|
var parentLink = getAuthKeyIdParentLink(keyId);
|
|
783
783
|
var siblingsLink = getAuthKeyIdSiblingsLink(keyId);
|
|
784
784
|
return (h(BasicExtension, { extension: extension }, h(RowValue, { name: "Key ID", value: keyId, monospace: true, extraValue: [
|
|
@@ -1027,7 +1027,7 @@ var QCStatementsExtension = function (props) {
|
|
|
1027
1027
|
return (h(BasicExtension, { extension: extension }, extension.value.map(function (statement, arrayIndex) { return ([
|
|
1028
1028
|
h(RowValue, { name: "Statement #" + (arrayIndex + 1), value: "" }),
|
|
1029
1029
|
h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
|
|
1030
|
-
h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ?
|
|
1030
|
+
h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? build_2.ToHex(statement.statementInfo) : null, monospace: true }),
|
|
1031
1031
|
]); })));
|
|
1032
1032
|
};
|
|
1033
1033
|
/**
|
|
@@ -1115,7 +1115,7 @@ var CRLReasonExtension = function (props) {
|
|
|
1115
1115
|
* LICENSE file in the root directory of this source tree.
|
|
1116
1116
|
*/
|
|
1117
1117
|
function getAttributeValue(attribute) {
|
|
1118
|
-
return
|
|
1118
|
+
return build_2.ToString(attribute.values[0]);
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
1121
|
* @license
|
|
@@ -1179,7 +1179,7 @@ var BiometricSyntaxExtension = function (props) {
|
|
|
1179
1179
|
h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
|
|
1180
1180
|
h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
|
|
1181
1181
|
h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
|
|
1182
|
-
h(RowValue, { name: "Hash", value:
|
|
1182
|
+
h(RowValue, { name: "Hash", value: build_2.ToHex(data.biometricDataHash.buffer), monospace: true }),
|
|
1183
1183
|
h(RowValue, { name: "Source Uri", value: data.sourceDataUri }),
|
|
1184
1184
|
]); })));
|
|
1185
1185
|
};
|
|
@@ -1200,7 +1200,7 @@ var LogotypeExtension = function (props) {
|
|
|
1200
1200
|
var imageDetails = img.imageDetails;
|
|
1201
1201
|
return [
|
|
1202
1202
|
h(RowValue, { name: "Image Type", value: imageDetails.mediaType }),
|
|
1203
|
-
h(RowValue, { name: "Image Hash", value:
|
|
1203
|
+
h(RowValue, { name: "Image Hash", value: build_2.ToHex(imageDetails.logotypeHash[0].hashValue), monospace: true }),
|
|
1204
1204
|
h(RowValue, { name: "Image URL", value: imageDetails.logotypeURI[0], monospace: true, collapse: true }),
|
|
1205
1205
|
h(RowValue, { name: "Image Hash Algorithm", value: getStringByOID(imageDetails.logotypeHash[0].hashAlg.algorithm) }),
|
|
1206
1206
|
];
|
|
@@ -1214,7 +1214,7 @@ var LogotypeExtension = function (props) {
|
|
|
1214
1214
|
var audioDetails = aud.audioDetails;
|
|
1215
1215
|
return [
|
|
1216
1216
|
h(RowValue, { name: "Audio Type", value: audioDetails.mediaType }),
|
|
1217
|
-
h(RowValue, { name: "Audio Hash", value:
|
|
1217
|
+
h(RowValue, { name: "Audio Hash", value: build_2.ToHex(audioDetails.logotypeHash[0].hashValue), monospace: true }),
|
|
1218
1218
|
h(RowValue, { name: "Audio URL", value: audioDetails.logotypeURI[0], monospace: true, collapse: true }),
|
|
1219
1219
|
h(RowValue, { name: "Audio Hash Algorithm", value: getStringByOID(audioDetails.logotypeHash[0].hashAlg.algorithm) }),
|
|
1220
1220
|
];
|
|
@@ -1492,13 +1492,13 @@ var Holder = function (props) {
|
|
|
1492
1492
|
baseCertificateID && ([
|
|
1493
1493
|
baseCertificateID.issuer.map(function (item) { return (h(GeneralNamePart, { generalName: item, getDNSNameLink: function () { return ''; }, getIPAddressLink: function () { return ''; } })); }),
|
|
1494
1494
|
h("tr", null, h("td", null), h("td", null)),
|
|
1495
|
-
h(RowValue, { name: l10n.getString('serialNumber'), value:
|
|
1495
|
+
h(RowValue, { name: l10n.getString('serialNumber'), value: build_2.ToHex(baseCertificateID.serial), monospace: true }),
|
|
1496
1496
|
h("tr", null, h("td", null), h("td", null)),
|
|
1497
1497
|
]),
|
|
1498
1498
|
objectDigestInfo && ([
|
|
1499
1499
|
h(RowValue, { name: l10n.getString('digestInfo'), value: "" }),
|
|
1500
1500
|
h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(objectDigestInfo.digestAlgorithm.algorithm) }),
|
|
1501
|
-
h(RowValue, { name: l10n.getString('value'), value:
|
|
1501
|
+
h(RowValue, { name: l10n.getString('value'), value: build_2.ToHex(objectDigestInfo.objectDigest), monospace: true }),
|
|
1502
1502
|
h(RowValue, { name: l10n.getString('type'), value: objectDigestInfo.digestedObjectType }),
|
|
1503
1503
|
]),
|
|
1504
1504
|
];
|
|
@@ -1854,7 +1854,7 @@ var PublicKey = function (props) {
|
|
|
1854
1854
|
h(RowValue, { name: l10n.getString('namedCurve'), value: getStringByOID((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
|
|
1855
1855
|
h(RowValue, { name: l10n.getString('exponent'), value: getPublicKeyExponent(publicKey) }),
|
|
1856
1856
|
h(RowValue, { name: l10n.getString('modulus'), value: getPublicKeyModulus(publicKey) }),
|
|
1857
|
-
h(RowValue, { name: l10n.getString('value'), value:
|
|
1857
|
+
h(RowValue, { name: l10n.getString('value'), value: build_2.ToHex(publicKey.value), monospace: true, collapse: true }),
|
|
1858
1858
|
];
|
|
1859
1859
|
};
|
|
1860
1860
|
/**
|
|
@@ -35,8 +35,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-5ef692cc.js';
|
|
38
|
-
import { au as X509Certificate, ap as Download, O as OIDs } from './download-250f9495.js';
|
|
39
38
|
import { l as l10n } from './l10n-c8cf6930.js';
|
|
39
|
+
import { av as X509Certificate, aq as Download, O as OIDs } from './download-1580501c.js';
|
|
40
40
|
var certificatesViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:\"\"}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}";
|
|
41
41
|
var CertificatesViewer = /** @class */ (function () {
|
|
42
42
|
function class_1(hostRef) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function n(e){try{s(o.next(e))}catch(t){i(t)}}function l(e){try{s(o["throw"](e))}catch(t){i(t)}}function s(e){e.done?r(e.value):a(e.value).then(n,l)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,n;return n={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(e){return function(t){return s([e,t])}}function s(n){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,a&&(i=n[0]&2?a["return"]:n[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,n[1])).done)return i;if(a=0,i)n=[n[0]&2,i.value];switch(n[0]){case 0:case 1:i=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;a=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!i||n[1]>i[0]&&n[1]<i[3])){r.label=n[1];break}if(n[0]===6&&r.label<i[1]){r.label=i[1];i=n;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(n);break}if(i[2])r.ops.pop();r.trys.pop();continue}n=t.call(e,r)}catch(l){n=[6,l];a=0}finally{o=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9f815f76.system.js","./p-636aea18.system.js","./p-bd1f9066.system.js"],(function(e){"use strict";var t,r,o,a,i,n,l,s;return{setters:[function(e){t=e.r;r=e.c;o=e.h;a=e.H},function(e){i=e.au;n=e.ap;l=e.O},function(e){s=e.l}],execute:function(){var c=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';var d=e("peculiar_certificates_viewer",function(){function e(e){var o=this;t(this,e);this.detailsOpen=r(this,"detailsOpen",7);this.detailsClose=r(this,"detailsClose",7);this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.search="";this.certificatesDecoded=[];this.isDecodeInProcess=true;this.isHasTests=false;this.isHasRoots=false;this.handleClickDetails=function(e,t){t.stopPropagation();o.certificateSelectedForDetails=e;o.detailsOpen.emit(e)};this.handleModalClose=function(){o.certificateSelectedForDetails=undefined;o.detailsClose.emit()};this.handleSearch=function(e){o.search=e.target.value.trim()}}e.prototype.componentWillLoad=function(){this.certificatesDecodeAndSet()};e.prototype.watchCertificates=function(e,t){if(JSON.stringify(e)!==JSON.stringify(t)){this.certificatesDecodeAndSet()}};e.prototype.certificatesDecodeAndSet=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,o,a,n,l,s;return __generator(this,(function(c){switch(c.label){case 0:e=false;t=false;if(!Array.isArray(this.certificates)){return[2]}r=[];o=0,a=this.certificates;c.label=1;case 1:if(!(o<a.length))return[3,6];n=a[o];c.label=2;case 2:c.trys.push([2,4,,5]);l=new i(n.value);return[4,l.getThumbprint("SHA-1")];case 3:c.sent();r.push({body:l,tests:n.tests,name:n.name});if(!t&&l.isRoot){t=true}if(!e){if(n.tests&&(n.tests.expired||n.tests.revoked||n.tests.valid)){e=true}}return[3,5];case 4:s=c.sent();console.error("Error certificate parse:",s);return[3,5];case 5:o++;return[3,1];case 6:this.isHasTests=e;this.isHasRoots=t;this.isDecodeInProcess=false;this.certificatesDecoded=r;return[2]}}))}))};e.prototype.handleClickDownloadAsPem=function(e,t){t.stopPropagation();n.certificate.asPEM(e.body.exportAsPemFormatted(),e.name||e.body.commonName)};e.prototype.handleClickDownloadAsDer=function(e,t){t.stopPropagation();n.certificate.asPEM(e.body.exportAsHexFormatted(),e.name||e.body.commonName)};e.prototype.handleClickRow=function(e){var t=this.expandedRow===e;this.expandedRow=t?undefined:e};e.prototype.getMaxColSpanValue=function(){var e=4;if(this.isHasTests){e+=1}if(!this.isHasRoots){e+=1}return e};e.prototype.renderExpandedRow=function(e){var t=this.getMaxColSpanValue();return o("tr",{class:"expanded_summary"},o("td",{colSpan:t},o("peculiar-certificate-summary",{certificate:e,showIssuer:!e.isRoot})))};e.prototype.renderCertificateTests=function(e){if(!e){return null}var t=[];if(e.valid){t.push(o("peculiar-button",{class:"button_table_action",href:e.valid,target:"_blank"},s.getString("valid")))}if(e.revoked){t.push(o("peculiar-button",{class:"button_table_action",href:e.revoked,target:"_blank"},s.getString("revoked")))}if(e.expired){t.push(o("peculiar-button",{class:"button_table_action",href:e.expired,target:"_blank"},s.getString("expired")))}return t};e.prototype.renderContentState=function(){var e=this;var t=this.highlightWithSearch?this.search:"";var r=[];this.certificatesDecoded.forEach((function(a,i){var n=i===e.expandedRow;var c=l[a.body.signature.algorithm]||a.body.signature.algorithm;if(e.filterWithSearch&&e.search){var d=[c,a.body.issuerCommonName,a.name,a.body.commonName,a.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(d.indexOf(e.search.toLowerCase())===-1){return}}r.push([o("tr",{class:{expanded:n},onClick:e.handleClickRow.bind(e,i),key:i},!e.isHasRoots&&o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("issuer"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},a.body.issuerCommonName))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("name"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},a.name||a.body.commonName))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("publicKey"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},c))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("fingerprint")," (SHA-1):"),o("peculiar-typography",{class:"content",monospace:true},o("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"]))),o("td",{class:"align_center"},o("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("actions"),":"),o("span",{class:"content"},o("peculiar-button",{onClick:e.handleClickDetails.bind(e,a.body),class:"button_table_action"},s.getString("details")),o("peculiar-button-split",{onClick:e.handleClickDownloadAsPem.bind(e,a),actions:[{text:s.getString("download.der"),onClick:e.handleClickDownloadAsDer.bind(e,a)}],class:"button_table_action"},s.getString("download.pem")))),e.isHasTests&&o("td",{class:"align_center"},o("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("testURLs"),":"),o("span",{class:"content"},e.renderCertificateTests(a.tests)))),n&&e.renderExpandedRow(a.body)])}));return r};e.prototype.renderCertificateDetailsModal=function(){if(!this.certificateSelectedForDetails){return null}return o("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},o("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),o("div",{class:"modal_container",role:"dialog",part:"presentation_container"},o("header",{class:"modal_title"},o("peculiar-typography",{type:"h4"},s.getString("certificateDetails")),o("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},o("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),o("div",{class:"modal_content"},o("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails}))))};e.prototype.renderSearch=function(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return o("div",{class:"search_section"},o("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))};e.prototype.renderEmptyState=function(){var e=this.getMaxColSpanValue();return o("tr",null,o("td",{class:"status_wrapper",colSpan:e},o("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))};e.prototype.renderEmptySearchState=function(){var e=this.getMaxColSpanValue();return o("tr",null,o("td",{class:"status_wrapper",colSpan:e},o("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))};e.prototype.renderLoadingState=function(){return o("div",{class:"loading_container"},o("peculiar-circular-progress",null))};e.prototype.renderBody=function(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}var e=this.renderContentState();if(this.search&&!e.length){return this.renderEmptySearchState()}return e};e.prototype.render=function(){return o(a,null,this.renderSearch(),o("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},o("thead",null,o("tr",null,!this.isHasRoots&&o("th",{class:"col_issuer"},o("peculiar-typography",{type:"h7",align:"left"},s.getString("issuer"))),o("th",{class:"col_name"},o("peculiar-typography",{type:"h7",align:"left"},s.getString("name"))),o("th",{class:"col_public_key"},o("peculiar-typography",{type:"h7",align:"left"},s.getString("publicKey"))),o("th",{class:"col_fingerprint"},o("peculiar-typography",{type:"h7",align:"left"},s.getString("fingerprint")," (SHA-1)")),o("th",{class:"col_actions"},o("peculiar-typography",{type:"h7",align:"center"},s.getString("actions"))),this.isHasTests&&o("th",{class:"col_tests"},o("peculiar-typography",{type:"h7",align:"center"},s.getString("testURLs"))))),o("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())};Object.defineProperty(e,"watchers",{get:function(){return{certificates:["watchCertificates"]}},enumerable:false,configurable:true});return e}());d.style=c}}}));
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,r,o){function a(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,i){function n(e){try{s(o.next(e))}catch(t){i(t)}}function l(e){try{s(o["throw"](e))}catch(t){i(t)}}function s(e){e.done?r(e.value):a(e.value).then(n,l)}s((o=o.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},o,a,i,n;return n={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(e){return function(t){return s([e,t])}}function s(n){if(o)throw new TypeError("Generator is already executing.");while(r)try{if(o=1,a&&(i=n[0]&2?a["return"]:n[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,n[1])).done)return i;if(a=0,i)n=[n[0]&2,i.value];switch(n[0]){case 0:case 1:i=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;a=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!i||n[1]>i[0]&&n[1]<i[3])){r.label=n[1];break}if(n[0]===6&&r.label<i[1]){r.label=i[1];i=n;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(n);break}if(i[2])r.ops.pop();r.trys.pop();continue}n=t.call(e,r)}catch(l){n=[6,l];a=0}finally{o=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-9f815f76.system.js","./p-bd1f9066.system.js","./p-6639fba3.system.js"],(function(e){"use strict";var t,r,o,a,i,n,l,s;return{setters:[function(e){t=e.r;r=e.c;o=e.h;a=e.H},function(e){i=e.l},function(e){n=e.av;l=e.aq;s=e.O}],execute:function(){var c=':host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;min-width:280px;overflow:auto;position:relative;background:white;background:rgba(var(--pv-color-light-rgb), 1)}table{width:100%;table-layout:fixed;border-collapse:collapse;border-spacing:0}table thead{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07)}table tr td{vertical-align:middle}table tbody tr:not(.expanded_summary){cursor:pointer}table tr{border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table th{padding:15px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table td{padding:8px 10px;border-width:1px;border-style:solid;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1)}table .col_issuer,table .col_name,table .col_public_key{width:16%}table .col_actions,table .col_tests{width:18%}table.m_extra .col_issuer,table.m_extra .col_name,table.m_extra .col_public_key{width:12%}table.m_extra .col_actions,table.m_extra .col_tests{width:17%}table tr.expanded td:not(:last-child){border-right-color:transparent}table tr.expanded td{border-bottom-color:transparent}.expanded{border-bottom-color:transparent;background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}table tr.expanded_summary td{vertical-align:top;padding:10px 20px 26px}@-webkit-keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}@keyframes fadeIn{0%{opacity:0.001}100%{opacity:1}}.modal_wrapper{position:fixed;top:0;left:0;width:100%;height:100%;z-index:1;overflow:auto;text-align:center;-webkit-animation:fadeIn 200ms;animation:fadeIn 200ms;padding:30px 10px}.modal_wrapper:before{display:inline-block;vertical-align:middle;width:0;height:100%;content:""}.modal_backdrop{background:rgba(42, 49, 52, 0.5);background:rgba(var(--pv-color-dark-rgb), 0.5);z-index:-1;position:fixed;top:0;right:0;bottom:0;left:0}.modal_container{position:relative;display:inline-block;vertical-align:middle;width:100%;max-width:900px;text-align:left;border-radius:3px;overflow:hidden;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);height:100%}.modal_title{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);border-bottom-width:1px;border-bottom-style:solid;padding:20px 60px 16px 20px;position:relative;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:60px}.modal_content{height:calc(100% - 60px);overflow-y:auto}.modal_close{cursor:pointer;border:none;background-color:transparent;position:absolute;top:0;bottom:0;right:0;padding:0 12px;-webkit-transition:opacity 100ms;transition:opacity 100ms;outline:none}.modal_close:hover{opacity:0.6}.modal_close svg{fill:#2a3134;fill:rgba(var(--pv-color-dark-rgb), 1)}.button_table_action{margin:2px}.mobile_title{display:none}.status_wrapper{height:85px;text-align:center;pointer-events:none}.search_section{background-color:rgba(53, 132, 247, 0.07);background-color:rgba(var(--pv-color-primary-rgb), 0.07);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);height:50px;padding:10px;border-width:1px 1px 0 1px;border-style:solid}.input_search{height:100%;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:0 14px;font-size:12px;outline:none;border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.input_search::-moz-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search:-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::-ms-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.input_search::placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.loading_container{position:absolute;top:0;left:0;width:100%;height:100%;background:rgba(42, 49, 52, 0.3);background:rgba(var(--pv-color-dark-rgb), 0.3);display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.align_center{text-align:center}@media (hover: hover){table tbody tr:not(.expanded_summary):hover{background-color:rgba(53, 132, 247, 0.04);background-color:rgba(var(--pv-color-primary-rgb), 0.04)}}@media (max-width: 900px){table,tbody,tr,td{display:block}thead{display:none}tr{padding:0 15px;border-width:1px;border-style:solid}tr:not(:first-child){margin-top:-1px}tr:not(.expanded_summary) td:first-child{border:none !important}table td{padding-left:0;padding-right:0;border-width:1px 0 0 0 !important;border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr.expanded_summary td{padding:15px 0}.mobile_title{display:inline-block;width:90px;vertical-align:middle}.modal_title{padding:17px 60px 17px 15px}.content{display:inline-block;width:calc(100% - 90px);vertical-align:middle;text-align:left}.expanded_summary{border-top-color:transparent;padding-bottom:10px}.expanded_summary td:before{content:none}.status_wrapper{height:266px;display:table-cell}.search_section{height:60px;padding:15px}.align_center{text-align:inherit}}';var d=e("peculiar_certificates_viewer",function(){function e(e){var o=this;t(this,e);this.detailsOpen=r(this,"detailsOpen",7);this.detailsClose=r(this,"detailsClose",7);this.certificates=[];this.filterWithSearch=true;this.highlightWithSearch=true;this.search="";this.certificatesDecoded=[];this.isDecodeInProcess=true;this.isHasTests=false;this.isHasRoots=false;this.handleClickDetails=function(e,t){t.stopPropagation();o.certificateSelectedForDetails=e;o.detailsOpen.emit(e)};this.handleModalClose=function(){o.certificateSelectedForDetails=undefined;o.detailsClose.emit()};this.handleSearch=function(e){o.search=e.target.value.trim()}}e.prototype.componentWillLoad=function(){this.certificatesDecodeAndSet()};e.prototype.watchCertificates=function(e,t){if(JSON.stringify(e)!==JSON.stringify(t)){this.certificatesDecodeAndSet()}};e.prototype.certificatesDecodeAndSet=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,o,a,i,l,s;return __generator(this,(function(c){switch(c.label){case 0:e=false;t=false;if(!Array.isArray(this.certificates)){return[2]}r=[];o=0,a=this.certificates;c.label=1;case 1:if(!(o<a.length))return[3,6];i=a[o];c.label=2;case 2:c.trys.push([2,4,,5]);l=new n(i.value);return[4,l.getThumbprint("SHA-1")];case 3:c.sent();r.push({body:l,tests:i.tests,name:i.name});if(!t&&l.isRoot){t=true}if(!e){if(i.tests&&(i.tests.expired||i.tests.revoked||i.tests.valid)){e=true}}return[3,5];case 4:s=c.sent();console.error("Error certificate parse:",s);return[3,5];case 5:o++;return[3,1];case 6:this.isHasTests=e;this.isHasRoots=t;this.isDecodeInProcess=false;this.certificatesDecoded=r;return[2]}}))}))};e.prototype.handleClickDownloadAsPem=function(e,t){t.stopPropagation();l.certificate.asPEM(e.body.exportAsPemFormatted(),e.name||e.body.commonName)};e.prototype.handleClickDownloadAsDer=function(e,t){t.stopPropagation();l.certificate.asPEM(e.body.exportAsHexFormatted(),e.name||e.body.commonName)};e.prototype.handleClickRow=function(e){var t=this.expandedRow===e;this.expandedRow=t?undefined:e};e.prototype.getMaxColSpanValue=function(){var e=4;if(this.isHasTests){e+=1}if(!this.isHasRoots){e+=1}return e};e.prototype.renderExpandedRow=function(e){var t=this.getMaxColSpanValue();return o("tr",{class:"expanded_summary"},o("td",{colSpan:t},o("peculiar-certificate-summary",{certificate:e,showIssuer:!e.isRoot})))};e.prototype.renderCertificateTests=function(e){if(!e){return null}var t=[];if(e.valid){t.push(o("peculiar-button",{class:"button_table_action",href:e.valid,target:"_blank"},i.getString("valid")))}if(e.revoked){t.push(o("peculiar-button",{class:"button_table_action",href:e.revoked,target:"_blank"},i.getString("revoked")))}if(e.expired){t.push(o("peculiar-button",{class:"button_table_action",href:e.expired,target:"_blank"},i.getString("expired")))}return t};e.prototype.renderContentState=function(){var e=this;var t=this.highlightWithSearch?this.search:"";var r=[];this.certificatesDecoded.forEach((function(a,n){var l=n===e.expandedRow;var c=s[a.body.signature.algorithm]||a.body.signature.algorithm;if(e.filterWithSearch&&e.search){var d=[c,a.body.issuerCommonName,a.name,a.body.commonName,a.body.thumbprints["SHA-1"]].join(" ").toLowerCase();if(d.indexOf(e.search.toLowerCase())===-1){return}}r.push([o("tr",{class:{expanded:l},onClick:e.handleClickRow.bind(e,n),key:n},!e.isHasRoots&&o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("issuer"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},a.body.issuerCommonName))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("name"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},a.name||a.body.commonName))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("publicKey"),":"),o("peculiar-typography",{class:"content"},o("peculiar-highlight-words",{search:t},c))),o("td",null,o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("fingerprint")," (SHA-1):"),o("peculiar-typography",{class:"content",monospace:true},o("peculiar-highlight-words",{search:t},a.body.thumbprints["SHA-1"]))),o("td",{class:"align_center"},o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("actions"),":"),o("span",{class:"content"},o("peculiar-button",{onClick:e.handleClickDetails.bind(e,a.body),class:"button_table_action"},i.getString("details")),o("peculiar-button-split",{onClick:e.handleClickDownloadAsPem.bind(e,a),actions:[{text:i.getString("download.der"),onClick:e.handleClickDownloadAsDer.bind(e,a)}],class:"button_table_action"},i.getString("download.pem")))),e.isHasTests&&o("td",{class:"align_center"},o("peculiar-typography",{class:"mobile_title",color:"grey_5"},i.getString("testURLs"),":"),o("span",{class:"content"},e.renderCertificateTests(a.tests)))),l&&e.renderExpandedRow(a.body)])}));return r};e.prototype.renderCertificateDetailsModal=function(){if(!this.certificateSelectedForDetails){return null}return o("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},o("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),o("div",{class:"modal_container",role:"dialog",part:"presentation_container"},o("header",{class:"modal_title"},o("peculiar-typography",{type:"h4"},i.getString("certificateDetails")),o("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},o("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},o("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M15.7204 14.375L21.0654 19.7185C21.3115 19.9658 21.3115 20.3693 21.0654 20.6154L20.615 21.0645C20.3689 21.3118 19.9667 21.3118 19.7181 21.0645L14.3744 15.721L9.03194 21.0645C8.78327 21.3118 8.3811 21.3118 8.13371 21.0645L7.68459 20.6154C7.43847 20.3693 7.43847 19.9658 7.68459 19.7185L13.0296 14.375L7.68459 9.03155C7.43847 8.78417 7.43847 8.38074 7.68459 8.13463L8.13371 7.68554C8.3811 7.43815 8.78327 7.43815 9.03194 7.68554L14.3744 13.029L19.7181 7.68554C19.9667 7.43815 20.3689 7.43815 20.615 7.68554L21.0654 8.13463C21.3115 8.38074 21.3115 8.78417 21.0654 9.03155L15.7204 14.375Z"})))),o("div",{class:"modal_content"},o("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails}))))};e.prototype.renderSearch=function(){if(!this.filterWithSearch&&!this.highlightWithSearch){return null}return o("div",{class:"search_section"},o("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"}))};e.prototype.renderEmptyState=function(){var e=this.getMaxColSpanValue();return o("tr",null,o("td",{class:"status_wrapper",colSpan:e},o("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))};e.prototype.renderEmptySearchState=function(){var e=this.getMaxColSpanValue();return o("tr",null,o("td",{class:"status_wrapper",colSpan:e},o("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))};e.prototype.renderLoadingState=function(){return o("div",{class:"loading_container"},o("peculiar-circular-progress",null))};e.prototype.renderBody=function(){if(this.isDecodeInProcess){return null}if(!this.certificatesDecoded.length){return this.renderEmptyState()}var e=this.renderContentState();if(this.search&&!e.length){return this.renderEmptySearchState()}return e};e.prototype.render=function(){return o(a,null,this.renderSearch(),o("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},o("thead",null,o("tr",null,!this.isHasRoots&&o("th",{class:"col_issuer"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("issuer"))),o("th",{class:"col_name"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("name"))),o("th",{class:"col_public_key"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("publicKey"))),o("th",{class:"col_fingerprint"},o("peculiar-typography",{type:"h7",align:"left"},i.getString("fingerprint")," (SHA-1)")),o("th",{class:"col_actions"},o("peculiar-typography",{type:"h7",align:"center"},i.getString("actions"))),this.isHasTests&&o("th",{class:"col_tests"},o("peculiar-typography",{type:"h7",align:"center"},i.getString("testURLs"))))),o("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())};Object.defineProperty(e,"watchers",{get:function(){return{certificates:["watchCertificates"]}},enumerable:false,configurable:true});return e}());d.style=c}}}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["./p-9f815f76.system.js","./p-aa0a9b36.system.js"],(function(){"use strict";var e,i;return{setters:[function(i){e=i.b},function(e){i=e.p}],execute:function(){i().then((function(i){return e([["p-
|
|
1
|
+
System.register(["./p-9f815f76.system.js","./p-aa0a9b36.system.js"],(function(){"use strict";var e,i;return{setters:[function(i){e=i.b},function(e){i=e.p}],execute:function(){i().then((function(i){return e([["p-9351b95f.system",[[1,"peculiar-certificate-decoder",{certificateExample:[1,"certificate-example"],certificateDecoded:[32]}],[1,"peculiar-attribute-certificate-viewer",{certificate:[1],download:[4],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],isDecodeInProcess:[32]}],[1,"peculiar-csr-viewer",{certificate:[513],download:[4],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-certificate-viewer",{certificate:[513],download:[516],authKeyIdParentLink:[513,"auth-key-id-parent-link"],authKeyIdSiblingsLink:[513,"auth-key-id-siblings-link"],subjectKeyIdChildrenLink:[513,"subject-key-id-children-link"],subjectKeyIdSiblingsLink:[513,"subject-key-id-siblings-link"],issuerDnLink:[513,"issuer-dn-link"],view:[513],isDecodeInProcess:[32]}],[1,"peculiar-button-split",{onClick:[16],fill:[1],actions:[16],open:[32]}],[1,"peculiar-text-hider",{opened:[1540]},[[0,"textExpand","textExpandHandler"]]],[1,"peculiar-link",{href:[513],type:[513]}],[1,"peculiar-typography",{type:[513],color:[1],align:[1],ellipsis:[4],monospace:[4]}],[1,"peculiar-button",{fill:[1],disabled:[516],href:[1],target:[1],onClick:[16]}]]],["p-983b5210.system",[[1,"peculiar-certificate-summary",{certificate:[16],showIssuer:[4,"show-issuer"]}],[1,"peculiar-circular-progress",{size:[2],width:[2]}],[1,"peculiar-highlight-words",{search:[1]}]]],["p-344c2502.system",[[1,"peculiar-certificates-viewer",{certificates:[16],filterWithSearch:[4,"filter-with-search"],highlightWithSearch:[4,"highlight-with-search"],search:[32],certificatesDecoded:[32],expandedRow:[32],certificateSelectedForDetails:[32],isDecodeInProcess:[32]}]]]],i)}))}}}));
|