@peculiar/certificates-viewer 3.2.1 → 3.3.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/{certification_request-cde57123.js → certification_request-e1997ebf.js} +563 -133
- package/dist/cjs/crl-f1ee43bc.js +312 -0
- package/dist/cjs/{index-ff818d4d.js → download-a97f4cb2.js} +106 -2
- package/dist/cjs/index.cjs.js +1 -3
- package/dist/cjs/l10n-638a7577.js +167 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{peculiar-attribute-certificate-viewer_2.cjs.entry.js → peculiar-attribute-certificate-viewer_3.cjs.entry.js} +123 -21
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -15
- package/dist/cjs/peculiar-certificate-summary_3.cjs.entry.js +2 -2
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +6 -25
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +6 -8
- package/dist/cjs/peculiar.cjs.js +1 -1
- package/dist/cjs/{public_key-2f5bd471.js → public_key-ba538d77.js} +80 -40
- package/dist/cjs/{x509_certificate-51a97033.js → x509_certificate-42b478d2.js} +13 -7
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +19 -6
- package/dist/collection/components/certificate-viewer/attributes/type_relationship_attribute.js +2 -1
- package/dist/collection/components/certificate-viewer/basic_information.js +3 -1
- package/dist/collection/components/certificate-viewer/extensions/basic_constraints_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/extensions/basic_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/extensions/crl_number_extension.js +19 -0
- package/dist/collection/components/certificate-viewer/extensions/index.js +9 -1
- package/dist/collection/components/certificate-viewer/extensions/issuing_distribution_point_extension.js +27 -0
- package/dist/collection/components/certificate-viewer/extensions/timestamp_extension.js +2 -1
- package/dist/collection/components/certificate-viewer/miscellaneous.js +2 -20
- package/dist/collection/components/certificates-viewer/certificates-viewer.js +2 -3
- package/dist/collection/components/crl-viewer/crl-viewer.js +234 -0
- package/dist/collection/components/crl-viewer/revoked_certificates.js +27 -0
- package/dist/collection/crypto/crl.js +82 -0
- package/dist/collection/crypto/csr.js +7 -0
- package/dist/collection/crypto/extension.js +10 -1
- package/dist/collection/crypto/index.js +1 -0
- package/dist/collection/crypto/x509_attribute_certificate.js +7 -1
- package/dist/collection/crypto/x509_certificate.js +7 -1
- package/dist/collection/locales/en.json +12 -1
- package/dist/collection/utils/download.js +18 -2
- package/dist/collection/utils/index.js +1 -0
- package/dist/collection/utils/validator.js +2 -0
- package/dist/esm/{certification_request-c0674647.js → certification_request-5d982d92.js} +493 -66
- package/dist/esm/crl-f2110716.js +308 -0
- package/dist/esm/{index-0ba131b0.js → download-67ac9120.js} +102 -2
- package/dist/esm/index.js +1 -3
- package/dist/esm/{l10n-ac28fa92.js → l10n-da0dd100.js} +24 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{peculiar-attribute-certificate-viewer_2.entry.js → peculiar-attribute-certificate-viewer_3.entry.js} +113 -12
- package/dist/esm/peculiar-certificate-decoder.entry.js +21 -11
- package/dist/esm/peculiar-certificate-summary_3.entry.js +2 -2
- package/dist/esm/peculiar-certificate-viewer.entry.js +6 -25
- package/dist/esm/peculiar-certificates-viewer.entry.js +6 -8
- package/dist/esm/peculiar.js +1 -1
- package/dist/esm/{public_key-38c9ddc8.js → public_key-0a3091a5.js} +67 -28
- package/dist/esm/{x509_certificate-12f6d344.js → x509_certificate-6b243207.js} +9 -3
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/locales/en.json +12 -1
- package/dist/peculiar/p-34e2d6be.entry.js +11 -0
- package/dist/peculiar/p-35e7a514.js +12 -0
- package/dist/peculiar/p-3aea9dde.js +32 -0
- package/dist/peculiar/{p-38635919.entry.js → p-49ab6f8c.entry.js} +1 -1
- package/dist/peculiar/p-86116b1f.entry.js +4 -0
- package/dist/peculiar/{p-464e0943.js → p-bce2bbe0.js} +9 -9
- package/dist/peculiar/p-ca0c34ca.entry.js +26 -0
- package/dist/peculiar/p-cff9655c.js +18 -0
- package/dist/peculiar/{p-17c4da7b.js → p-db6e24c6.js} +2 -2
- package/dist/peculiar/p-e535a666.entry.js +4 -0
- package/dist/peculiar/p-f8dc3232.js +63 -0
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +3 -3
- package/dist/types/components/certificate-viewer/basic_information.d.ts +2 -0
- package/dist/types/components/certificate-viewer/extensions/crl_number_extension.d.ts +15 -0
- package/dist/types/components/certificate-viewer/extensions/issuing_distribution_point_extension.d.ts +15 -0
- package/dist/types/components/certificate-viewer/miscellaneous.d.ts +2 -2
- package/dist/types/components/certificate-viewer/row.d.ts +1 -1
- package/dist/types/components/crl-viewer/crl-viewer.d.ts +59 -0
- package/dist/types/components/crl-viewer/revoked_certificates.d.ts +14 -0
- package/dist/types/components.d.ts +66 -0
- package/dist/types/crypto/crl.d.ts +28 -0
- package/dist/types/crypto/csr.d.ts +2 -0
- package/dist/types/crypto/extension.d.ts +2 -2
- package/dist/types/crypto/index.d.ts +1 -0
- package/dist/types/crypto/x509_attribute_certificate.d.ts +2 -0
- package/dist/types/crypto/x509_certificate.d.ts +2 -0
- package/dist/types/utils/download.d.ts +10 -2
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/l10n.d.ts +11 -0
- package/dist/types/utils/validator.d.ts +1 -0
- package/package.json +19 -19
- package/dist/cjs/_commonjsHelpers-cb1f949a.js +0 -23
- package/dist/cjs/csr-78378ed0.js +0 -150
- package/dist/cjs/download-6724f3a7.js +0 -79
- package/dist/cjs/l10n-a048a686.js +0 -145
- package/dist/cjs/x509_attribute_certificate-cc325b70.js +0 -87
- package/dist/esm/_commonjsHelpers-bfbd2ad8.js +0 -20
- package/dist/esm/csr-c1b6a176.js +0 -147
- package/dist/esm/download-735fb2eb.js +0 -76
- package/dist/esm/x509_attribute_certificate-a6d4aa15.js +0 -85
- package/dist/peculiar/p-006865d7.js +0 -4
- package/dist/peculiar/p-3f8d1008.entry.js +0 -4
- package/dist/peculiar/p-42da7f97.js +0 -11
- package/dist/peculiar/p-4f4c1d30.js +0 -12
- package/dist/peculiar/p-6011646e.entry.js +0 -11
- package/dist/peculiar/p-6bfd077c.entry.js +0 -18
- package/dist/peculiar/p-6c510523.js +0 -18
- package/dist/peculiar/p-986cc770.entry.js +0 -11
- package/dist/peculiar/p-b765873e.js +0 -78
- package/dist/peculiar/p-d0b55fbb.js +0 -4
- package/dist/peculiar/p-d7a13cb4.js +0 -18
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
5
|
-
|
|
6
|
-
function createCommonjsModule(fn, basedir, module) {
|
|
7
|
-
return module = {
|
|
8
|
-
path: basedir,
|
|
9
|
-
exports: {},
|
|
10
|
-
require: function (path, base) {
|
|
11
|
-
return commonjsRequire();
|
|
12
|
-
}
|
|
13
|
-
}, fn(module, module.exports), module.exports;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
function commonjsRequire () {
|
|
17
|
-
throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { commonjsGlobal as a, createCommonjsModule as c };
|
package/dist/esm/csr-c1b6a176.js
DELETED
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import { A as AsnData, n as Attribute$1, o as id_pkcs9_at_extensionRequest, p as AsnParser, q as ExtensionRequest, E as Extension, e as AsnConvert, r as id_pkcs9_at_unstructuredName, U as UnstructuredName, s as id_pkcs9_at_challengePassword, t as ChallengePassword, u as id_ValuationRanking, V as ValuationRanking, v as id_InsuranceValue, I as InsuranceValue, w as id_WebGDPR, W as WebGDPR, x as id_ActivityDescription, y as ActivityDescription, z as id_TypeRelationship, T as TypeRelationship, B as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, F as id_DomainNameOwner, G as DomainNameOwner, H as id_DomainNameLegalRepresentative, J as DomainNameLegalRepresentative, K as id_DomainNameBeneficiary, L as DomainNameBeneficiary, d as certificateRawToBuffer, M as CertificationRequest, N as Name, f as id_ecPublicKey, g as ECParameters, h as id_rsaEncryption, R as RSAPublicKey, l as getCertificateThumbprint, j as hexFormat, k as base64Format } from './certification_request-c0674647.js';
|
|
5
|
-
import { b as build } from './index-0ba131b0.js';
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
10
|
-
*
|
|
11
|
-
* This source code is licensed under the MIT license found in the
|
|
12
|
-
* LICENSE file in the root directory of this source tree.
|
|
13
|
-
*/
|
|
14
|
-
class Attribute extends AsnData {
|
|
15
|
-
constructor(raw) {
|
|
16
|
-
super(raw, Attribute$1);
|
|
17
|
-
const asnExtnValue = this.getAsnExtnValue();
|
|
18
|
-
switch (this.asn.type) {
|
|
19
|
-
case id_DomainNameBeneficiary:
|
|
20
|
-
this.value = AsnParser.parse(asnExtnValue, DomainNameBeneficiary);
|
|
21
|
-
break;
|
|
22
|
-
case id_DomainNameLegalRepresentative:
|
|
23
|
-
this.value = AsnParser.parse(asnExtnValue, DomainNameLegalRepresentative);
|
|
24
|
-
break;
|
|
25
|
-
case id_DomainNameOwner:
|
|
26
|
-
this.value = AsnParser.parse(asnExtnValue, DomainNameOwner);
|
|
27
|
-
break;
|
|
28
|
-
case id_DomainNameTechnicalOperator:
|
|
29
|
-
this.value = AsnParser.parse(asnExtnValue, DomainNameTechnicalOperator);
|
|
30
|
-
break;
|
|
31
|
-
case id_TypeRelationship:
|
|
32
|
-
this.value = AsnParser.parse(asnExtnValue, TypeRelationship);
|
|
33
|
-
break;
|
|
34
|
-
case id_ActivityDescription:
|
|
35
|
-
this.value = AsnParser.parse(asnExtnValue, ActivityDescription);
|
|
36
|
-
break;
|
|
37
|
-
case id_WebGDPR:
|
|
38
|
-
this.value = AsnParser.parse(asnExtnValue, WebGDPR);
|
|
39
|
-
break;
|
|
40
|
-
case id_InsuranceValue:
|
|
41
|
-
this.value = AsnParser.parse(asnExtnValue, InsuranceValue);
|
|
42
|
-
break;
|
|
43
|
-
case id_ValuationRanking:
|
|
44
|
-
this.value = AsnParser.parse(asnExtnValue, ValuationRanking);
|
|
45
|
-
break;
|
|
46
|
-
case id_pkcs9_at_challengePassword:
|
|
47
|
-
this.value = AsnParser.parse(asnExtnValue, ChallengePassword);
|
|
48
|
-
break;
|
|
49
|
-
case id_pkcs9_at_unstructuredName:
|
|
50
|
-
this.value = AsnParser.parse(asnExtnValue, UnstructuredName);
|
|
51
|
-
break;
|
|
52
|
-
case id_pkcs9_at_extensionRequest: {
|
|
53
|
-
const extensionRequest = AsnParser.parse(asnExtnValue, ExtensionRequest);
|
|
54
|
-
this.value = extensionRequest
|
|
55
|
-
.map((e) => new Extension(AsnConvert.serialize(e)));
|
|
56
|
-
break;
|
|
57
|
-
}
|
|
58
|
-
default:
|
|
59
|
-
this.value = build.Convert.ToHex(asnExtnValue);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
getAsnExtnValue() {
|
|
63
|
-
return this.asn.values[0];
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* @license
|
|
69
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
70
|
-
*
|
|
71
|
-
* This source code is licensed under the MIT license found in the
|
|
72
|
-
* LICENSE file in the root directory of this source tree.
|
|
73
|
-
*/
|
|
74
|
-
class CSR extends AsnData {
|
|
75
|
-
constructor(raw) {
|
|
76
|
-
super(certificateRawToBuffer(raw), CertificationRequest);
|
|
77
|
-
this.thumbprints = {};
|
|
78
|
-
this.type = 'PKCS#10 Certificate Request';
|
|
79
|
-
const { certificationRequestInfo } = this.asn;
|
|
80
|
-
this.subject = new Name(certificationRequestInfo.subject).toJSON();
|
|
81
|
-
this.version = certificationRequestInfo.version;
|
|
82
|
-
}
|
|
83
|
-
get publicKey() {
|
|
84
|
-
const { subjectPublicKey, algorithm } = this.asn.certificationRequestInfo.subjectPKInfo;
|
|
85
|
-
let params;
|
|
86
|
-
if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {
|
|
87
|
-
params = AsnConvert.parse(algorithm.parameters, ECParameters);
|
|
88
|
-
}
|
|
89
|
-
if (algorithm.algorithm === id_rsaEncryption) {
|
|
90
|
-
params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);
|
|
91
|
-
}
|
|
92
|
-
const spki = AsnConvert.serialize(this.asn.certificationRequestInfo.subjectPKInfo);
|
|
93
|
-
return {
|
|
94
|
-
params,
|
|
95
|
-
value: spki,
|
|
96
|
-
algorithm: algorithm.algorithm,
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
get signature() {
|
|
100
|
-
const { signature, signatureAlgorithm } = this.asn;
|
|
101
|
-
return {
|
|
102
|
-
value: signature,
|
|
103
|
-
algorithm: signatureAlgorithm.algorithm,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
get commonName() {
|
|
107
|
-
if (!this.subject) {
|
|
108
|
-
return '';
|
|
109
|
-
}
|
|
110
|
-
for (let i = 0; i < this.subject.length; i += 1) {
|
|
111
|
-
const name = this.subject[i];
|
|
112
|
-
if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {
|
|
113
|
-
return name.value;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return '';
|
|
117
|
-
}
|
|
118
|
-
async getThumbprint(algorithm = 'SHA-1') {
|
|
119
|
-
try {
|
|
120
|
-
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
121
|
-
if (thumbprint) {
|
|
122
|
-
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
catch (error) {
|
|
126
|
-
console.error('Error thumbprint get:', error);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
parseAttributes() {
|
|
130
|
-
const { certificationRequestInfo } = this.asn;
|
|
131
|
-
if (certificationRequestInfo.attributes) {
|
|
132
|
-
this.attributes = certificationRequestInfo.attributes
|
|
133
|
-
.map((e) => new Attribute(AsnConvert.serialize(e)));
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
exportAsBase64() {
|
|
137
|
-
return build.Convert.ToBase64(this.raw);
|
|
138
|
-
}
|
|
139
|
-
exportAsHexFormatted() {
|
|
140
|
-
return hexFormat(build.Convert.ToHex(this.raw));
|
|
141
|
-
}
|
|
142
|
-
exportAsPemFormatted() {
|
|
143
|
-
return `-----BEGIN CERTIFICATE REQUEST-----\n${base64Format(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
export { Attribute as A, CSR as C };
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import { b as build } from './index-0ba131b0.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
9
|
-
*
|
|
10
|
-
* This source code is licensed under the MIT license found in the
|
|
11
|
-
* LICENSE file in the root directory of this source tree.
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Download from buffer
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```js
|
|
18
|
-
* import { downloadFromBuffer } from './utils';
|
|
19
|
-
*
|
|
20
|
-
* downloadFromBuffer(arrayBufferValue, 'myFile', 'pdf', 'applciation/pdf');
|
|
21
|
-
* ```
|
|
22
|
-
*/
|
|
23
|
-
function downloadFromBuffer(value, name, extension, mime = 'application/octet-stream') {
|
|
24
|
-
const blob = new Blob([value], { type: mime });
|
|
25
|
-
// @ts-ignore
|
|
26
|
-
if (navigator.msSaveBlob) { // IE10+ : (has Blob, but not a[download] or URL)
|
|
27
|
-
// @ts-ignore
|
|
28
|
-
navigator.msSaveBlob(blob, `${name}.${extension}`);
|
|
29
|
-
return new Promise((res) => setTimeout(res, 100));
|
|
30
|
-
}
|
|
31
|
-
const blobURL = window.URL.createObjectURL(blob);
|
|
32
|
-
const link = document.createElement('a');
|
|
33
|
-
const frame = document.createElement('iframe');
|
|
34
|
-
link.style.display = 'none';
|
|
35
|
-
frame.style.display = 'none';
|
|
36
|
-
frame.name = blobURL;
|
|
37
|
-
document.body.appendChild(frame);
|
|
38
|
-
link.href = blobURL;
|
|
39
|
-
link.target = blobURL;
|
|
40
|
-
link.download = `${name}.${extension}`;
|
|
41
|
-
document.body.appendChild(link);
|
|
42
|
-
link.dispatchEvent(new MouseEvent('click'));
|
|
43
|
-
document.body.removeChild(link);
|
|
44
|
-
return new Promise((res) => setTimeout(() => {
|
|
45
|
-
document.body.removeChild(frame);
|
|
46
|
-
res(undefined);
|
|
47
|
-
}, 100));
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* @license
|
|
52
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the MIT license found in the
|
|
55
|
-
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/
|
|
57
|
-
class Download {
|
|
58
|
-
}
|
|
59
|
-
Download.x509 = {
|
|
60
|
-
asPEM: (pem, name) => {
|
|
61
|
-
downloadFromBuffer(build.Convert.FromString(pem), name, 'cer', 'application/pkix-cert');
|
|
62
|
-
},
|
|
63
|
-
asDER: (hex, name) => {
|
|
64
|
-
downloadFromBuffer(build.Convert.FromString(hex), name, 'cer', 'application/pkix-cert');
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
Download.pkcs10 = {
|
|
68
|
-
asPEM: (pem, name) => {
|
|
69
|
-
downloadFromBuffer(build.Convert.FromString(pem), name, 'csr', 'application/pkcs10');
|
|
70
|
-
},
|
|
71
|
-
asDER: (hex, name) => {
|
|
72
|
-
downloadFromBuffer(build.Convert.FromString(hex), name, 'csr', 'application/pkcs10');
|
|
73
|
-
},
|
|
74
|
-
};
|
|
75
|
-
|
|
76
|
-
export { Download as D, downloadFromBuffer as d };
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import { A as AsnData, d as certificateRawToBuffer, m as AttributeCertificate, E as Extension, e as AsnConvert, l as getCertificateThumbprint, j as hexFormat, k as base64Format } from './certification_request-c0674647.js';
|
|
5
|
-
import { b as build } from './index-0ba131b0.js';
|
|
6
|
-
import { d as dateDiff } from './l10n-ac28fa92.js';
|
|
7
|
-
import { A as Attribute } from './csr-c1b6a176.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
12
|
-
*
|
|
13
|
-
* This source code is licensed under the MIT license found in the
|
|
14
|
-
* LICENSE file in the root directory of this source tree.
|
|
15
|
-
*/
|
|
16
|
-
class X509AttributeCertificate extends AsnData {
|
|
17
|
-
constructor(raw) {
|
|
18
|
-
var _a;
|
|
19
|
-
super(certificateRawToBuffer(raw), AttributeCertificate);
|
|
20
|
-
this.thumbprints = {};
|
|
21
|
-
this.type = 'X.509 Attribute Certificate';
|
|
22
|
-
const { acinfo } = this.asn;
|
|
23
|
-
this.serialNumber = build.Convert.ToHex(acinfo.serialNumber);
|
|
24
|
-
this.version = acinfo.version;
|
|
25
|
-
const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;
|
|
26
|
-
if (!notBefore) {
|
|
27
|
-
throw new Error("Cannot get 'notBefore' value");
|
|
28
|
-
}
|
|
29
|
-
this.notBefore = notBefore;
|
|
30
|
-
const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;
|
|
31
|
-
if (!notAfter) {
|
|
32
|
-
throw new Error("Cannot get 'notAfter' value");
|
|
33
|
-
}
|
|
34
|
-
this.notAfter = notAfter;
|
|
35
|
-
this.validity = dateDiff(this.notBefore, this.notAfter);
|
|
36
|
-
this.issuer = acinfo.issuer.v1Form || ((_a = acinfo.issuer.v2Form) === null || _a === void 0 ? void 0 : _a.issuerName);
|
|
37
|
-
this.holder = acinfo.holder;
|
|
38
|
-
}
|
|
39
|
-
get signature() {
|
|
40
|
-
const { signatureValue, signatureAlgorithm } = this.asn;
|
|
41
|
-
return {
|
|
42
|
-
value: signatureValue,
|
|
43
|
-
algorithm: signatureAlgorithm.algorithm,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
parseExtensions() {
|
|
47
|
-
const { acinfo } = this.asn;
|
|
48
|
-
if (acinfo.extensions) {
|
|
49
|
-
this.extensions = acinfo.extensions
|
|
50
|
-
.map((e) => new Extension(AsnConvert.serialize(e)));
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
parseAttributes() {
|
|
54
|
-
const { acinfo } = this.asn;
|
|
55
|
-
if (acinfo.attributes) {
|
|
56
|
-
this.attributes = acinfo.attributes
|
|
57
|
-
.map((e) => new Attribute(AsnConvert.serialize(e)));
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
async getThumbprint(algorithm = 'SHA-1') {
|
|
61
|
-
try {
|
|
62
|
-
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
63
|
-
if (thumbprint) {
|
|
64
|
-
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
catch (error) {
|
|
68
|
-
console.error('Error thumbprint get:', error);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
exportAsBase64() {
|
|
72
|
-
return build.Convert.ToBase64(this.raw);
|
|
73
|
-
}
|
|
74
|
-
exportAsHexFormatted() {
|
|
75
|
-
return hexFormat(build.Convert.ToHex(this.raw));
|
|
76
|
-
}
|
|
77
|
-
exportAsPemFormatted() {
|
|
78
|
-
return `-----BEGIN ATTRIBUTE CERTIFICATE-----\n${base64Format(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`;
|
|
79
|
-
}
|
|
80
|
-
get commonName() {
|
|
81
|
-
return `attribute-certificate-${this.thumbprints['SHA-1']}`;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export { X509AttributeCertificate as X };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{c as t}from"./p-d0b55fbb.js";var r=t((function(t,r){Object.defineProperty(r,"__esModule",{value:!0});class e{static isArrayBuffer(t){return"[object ArrayBuffer]"===Object.prototype.toString.call(t)}static toArrayBuffer(t){return this.isArrayBuffer(t)?t:t.byteLength===t.buffer.byteLength?t.buffer:this.toUint8Array(t).slice().buffer}static toUint8Array(t){return this.toView(t,Uint8Array)}static toView(t,r){if(t.constructor===r)return t;if(this.isArrayBuffer(t))return new r(t);if(this.isArrayBufferView(t))return new r(t.buffer,t.byteOffset,t.byteLength);throw new TypeError("The provided value is not of type '(ArrayBuffer or ArrayBufferView)'")}static isBufferSource(t){return this.isArrayBufferView(t)||this.isArrayBuffer(t)}static isArrayBufferView(t){return ArrayBuffer.isView(t)||t&&this.isArrayBuffer(t.buffer)}static isEqual(t,r){const n=e.toUint8Array(t),s=e.toUint8Array(r);if(n.length!==s.byteLength)return!1;for(let t=0;t<n.length;t++)if(n[t]!==s[t])return!1;return!0}static concat(...t){if(Array.isArray(t[0])){const r=t[0];let e=0;for(const t of r)e+=t.byteLength;const n=new Uint8Array(e);let s=0;for(const t of r){const r=this.toUint8Array(t);n.set(r,s),s+=r.length}return t[1]?this.toView(n,t[1]):n.buffer}return this.concat(t)}}class n{static fromString(t){const r=unescape(encodeURIComponent(t)),e=new Uint8Array(r.length);for(let t=0;t<r.length;t++)e[t]=r.charCodeAt(t);return e.buffer}static toString(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return decodeURIComponent(escape(n))}}class s{static toString(t,r=!1){const n=e.toArrayBuffer(t),s=new DataView(n);let i="";for(let t=0;t<n.byteLength;t+=2){const e=s.getUint16(t,r);i+=String.fromCharCode(e)}return i}static fromString(t,r=!1){const e=new ArrayBuffer(2*t.length),n=new DataView(e);for(let e=0;e<t.length;e++)n.setUint16(2*e,t.charCodeAt(e),r);return e}}class i{static isHex(t){return"string"==typeof t&&/^[a-z0-9]+$/i.test(t)}static isBase64(t){return"string"==typeof t&&/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}static isBase64Url(t){return"string"==typeof t&&/^[a-zA-Z0-9-_]+$/i.test(t)}static ToString(t,r="utf8"){const n=e.toUint8Array(t);switch(r.toLowerCase()){case"utf8":return this.ToUtf8String(n);case"binary":return this.ToBinary(n);case"hex":return this.ToHex(n);case"base64":return this.ToBase64(n);case"base64url":return this.ToBase64Url(n);case"utf16le":return s.toString(n,!0);case"utf16":case"utf16be":return s.toString(n);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromString(t,r="utf8"){if(!t)return new ArrayBuffer(0);switch(r.toLowerCase()){case"utf8":return this.FromUtf8String(t);case"binary":return this.FromBinary(t);case"hex":return this.FromHex(t);case"base64":return this.FromBase64(t);case"base64url":return this.FromBase64Url(t);case"utf16le":return s.fromString(t,!0);case"utf16":case"utf16be":return s.fromString(t);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToBase64(t){const r=e.toUint8Array(t);if("undefined"!=typeof btoa){const t=this.ToString(r,"binary");return btoa(t)}return Buffer.from(r).toString("base64")}static FromBase64(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!i.isBase64(r))throw new TypeError("Argument 'base64Text' is not Base64 encoded");return"undefined"!=typeof atob?this.FromBinary(atob(r)):new Uint8Array(Buffer.from(r,"base64")).buffer}static FromBase64Url(t){const r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!i.isBase64Url(r))throw new TypeError("Argument 'base64url' is not Base64Url encoded");return this.FromBase64(this.Base64Padding(r.replace(/\-/g,"+").replace(/\_/g,"/")))}static ToBase64Url(t){return this.ToBase64(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"")}static FromUtf8String(t,r=i.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.FromBinary(t);case"utf8":return n.fromString(t);case"utf16":case"utf16be":return s.fromString(t);case"utf16le":case"usc2":return s.fromString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static ToUtf8String(t,r=i.DEFAULT_UTF8_ENCODING){switch(r){case"ascii":return this.ToBinary(t);case"utf8":return n.toString(t);case"utf16":case"utf16be":return s.toString(t);case"utf16le":case"usc2":return s.toString(t,!0);default:throw new Error(`Unknown type of encoding '${r}'`)}}static FromBinary(t){const r=t.length,e=new Uint8Array(r);for(let n=0;n<r;n++)e[n]=t.charCodeAt(n);return e.buffer}static ToBinary(t){const r=e.toUint8Array(t);let n="";for(let t=0;t<r.length;t++)n+=String.fromCharCode(r[t]);return n}static ToHex(t){const r=e.toUint8Array(t),n=[],s=r.length;for(let t=0;t<s;t++){const e=r[t].toString(16).padStart(2,"0");n.push(e)}return n.join("")}static FromHex(t){let r=this.formatString(t);if(!r)return new ArrayBuffer(0);if(!i.isHex(r))throw new TypeError("Argument 'hexString' is not HEX encoded");r.length%2&&(r=`0${r}`);const e=new Uint8Array(r.length/2);for(let t=0;t<r.length;t+=2){const n=r.slice(t,t+2);e[t/2]=parseInt(n,16)}return e.buffer}static ToUtf16String(t,r=!1){return s.toString(t,r)}static FromUtf16String(t,r=!1){return s.fromString(t,r)}static Base64Padding(t){const r=4-t.length%4;if(r<4)for(let e=0;e<r;e++)t+="=";return t}static formatString(t){return(null==t?void 0:t.replace(/[\n\r\t ]/g,""))||""}}i.DEFAULT_UTF8_ENCODING="utf8",r.BufferSourceConverter=e,r.Convert=i,r.assign=function(t){const r=arguments[0];for(let t=1;t<arguments.length;t++){const e=arguments[t];for(const t in e)r[t]=e[t]}return r},r.combine=function(...t){const r=t.map((t=>t.byteLength)).reduce(((t,r)=>t+r)),e=new Uint8Array(r);let n=0;return t.map((t=>new Uint8Array(t))).forEach((t=>{for(const r of t)e[n++]=r})),e.buffer},r.isEqual=function(t,r){if(!t||!r)return!1;if(t.byteLength!==r.byteLength)return!1;const e=new Uint8Array(t),n=new Uint8Array(r);for(let r=0;r<t.byteLength;r++)if(e[r]!==n[r])return!1;return!0}}));export{r as b}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{X as a}from"./p-17c4da7b.js";import{O as i}from"./p-464e0943.js";import"./p-006865d7.js";import{l}from"./p-4f4c1d30.js";import{D as s}from"./p-d7a13cb4.js";import"./p-d0b55fbb.js";const c=class{constructor(e){t(this,e),this.detailsOpen=r(this,"detailsOpen",7),this.detailsClose=r(this,"detailsClose",7),this.certificates=[],this.filterWithSearch=!0,this.highlightWithSearch=!0,this.search="",this.certificatesDecoded=[],this.isDecodeInProcess=!0,this.isHasTests=!1,this.isHasRoots=!1,this.handleClickDetails=(t,r)=>{r.stopPropagation(),this.certificateSelectedForDetails=t,this.detailsOpen.emit(t)},this.handleModalClose=()=>{this.certificateSelectedForDetails=void 0,this.detailsClose.emit()},this.handleSearch=t=>{this.search=t.target.value.trim()}}componentWillLoad(){this.certificatesDecodeAndSet()}watchCertificates(t,r){JSON.stringify(t)!==JSON.stringify(r)&&this.certificatesDecodeAndSet()}async certificatesDecodeAndSet(){let t=!1,r=!1;if(!Array.isArray(this.certificates))return;const e=[];for(const o of this.certificates)try{const i=new a(o.value);await i.getThumbprint("SHA-1"),e.push({body:i,tests:o.tests,name:o.name}),!r&&i.isRoot&&(r=!0),t||o.tests&&(o.tests.expired||o.tests.revoked||o.tests.valid)&&(t=!0)}catch(t){console.error("Error certificate parse:",t)}this.isHasTests=t,this.isHasRoots=r,this.isDecodeInProcess=!1,this.certificatesDecoded=e}handleClickDownloadAsPem(t,r){r.stopPropagation(),s.x509.asPEM(t.body.exportAsPemFormatted(),t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),s.x509.asPEM(t.body.exportAsHexFormatted(),t.name||t.body.commonName)}handleClickRow(t){this.expandedRow=this.expandedRow===t?void 0:t}getMaxColSpanValue(){let t=4;return this.isHasTests&&(t+=1),this.isHasRoots||(t+=1),t}renderExpandedRow(t){const r=this.getMaxColSpanValue();return e("tr",{class:"expanded_summary"},e("td",{colSpan:r},e("peculiar-certificate-summary",{certificate:t,showIssuer:!t.isRoot})))}renderCertificateTests(t){if(!t)return null;const r=[];return t.valid&&r.push(e("peculiar-button",{class:"button_table_action",href:t.valid,target:"_blank"},l.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},l.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},l.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const s=a===this.expandedRow,c=i[o.body.signature.algorithm]||o.body.signature.algorithm;this.filterWithSearch&&this.search&&-1===[c,o.body.issuerCommonName,o.name,o.body.commonName,o.body.thumbprints["SHA-1"]].join(" ").toLowerCase().indexOf(this.search.toLowerCase())||r.push([e("tr",{class:{expanded:s},onClick:this.handleClickRow.bind(this,a),key:o.body.thumbprints["SHA-1"]},!this.isHasRoots&&e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("issuer"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.body.issuerCommonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("name"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},o.name||o.body.commonName))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("publicKey"),":"),e("peculiar-typography",{class:"content"},e("peculiar-highlight-words",{search:t},c))),e("td",null,e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("fingerprint")," (SHA-1):"),e("peculiar-typography",{class:"content",monospace:!0},e("peculiar-highlight-words",{search:t},o.body.thumbprints["SHA-1"]))),e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},l.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:l.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},l.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},l.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),s&&this.renderExpandedRow(o.body)])})),r}renderCertificateDetailsModal(){return this.certificateSelectedForDetails?e("div",{class:"modal_wrapper",role:"presentation","aria-hidden":"false",part:"presentation"},e("div",{class:"modal_backdrop",onClick:this.handleModalClose,"aria-hidden":"true"}),e("div",{class:"modal_container",role:"dialog",part:"presentation_container"},e("header",{class:"modal_title"},e("peculiar-typography",{type:"h4"},l.getString("certificateDetails")),e("button",{class:"modal_close",onClick:this.handleModalClose,type:"button","aria-label":"Close",title:"Close"},e("svg",{width:"30",height:"30",viewBox:"0 0 30 30",xmlns:"http://www.w3.org/2000/svg"},e("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"})))),e("div",{class:"modal_content"},e("peculiar-certificate-viewer",{certificate:this.certificateSelectedForDetails})))):null}renderSearch(){return this.filterWithSearch||this.highlightWithSearch?e("div",{class:"search_section"},e("input",{onInput:this.handleSearch,type:"search",value:"",class:"input_search",disabled:!this.certificatesDecoded.length,placeholder:"Search"})):null}renderEmptyState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"There are no certificates available.")))}renderEmptySearchState(){const t=this.getMaxColSpanValue();return e("tr",null,e("td",{class:"status_wrapper",colSpan:t},e("peculiar-typography",{type:"b1",align:"center"},"No results found for “",this.search,"“")))}renderLoadingState(){return e("div",{class:"loading_container"},e("peculiar-circular-progress",null))}renderBody(){if(this.isDecodeInProcess)return null;if(!this.certificatesDecoded.length)return this.renderEmptyState();const t=this.renderContentState();return this.search&&!t.length?this.renderEmptySearchState():t}render(){return e(o,null,this.renderSearch(),e("table",{class:{m_extra:this.isHasTests||!this.isHasRoots}},e("thead",null,e("tr",null,!this.isHasRoots&&e("th",{class:"col_issuer"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},l.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},l.getString("testURLs"))))),e("tbody",null,this.renderBody())),this.renderCertificateDetailsModal(),this.isDecodeInProcess&&this.renderLoadingState())}static get watchers(){return{certificates:["watchCertificates"]}}};c.style=':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::-webkit-input-placeholder{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-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::-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}}';export{c as peculiar_certificates_viewer}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{A as t,d as s,m as r,E as e,e as i,l as o,j as a,k as n}from"./p-464e0943.js";import{b as h}from"./p-006865d7.js";import{d as c}from"./p-4f4c1d30.js";import{A as u}from"./p-6c510523.js";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/class m extends t{constructor(t){var e;super(s(t),r),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:i}=this.asn;this.serialNumber=h.Convert.ToHex(i.serialNumber),this.version=i.version;const o=i.attrCertValidityPeriod.notBeforeTime;if(!o)throw new Error("Cannot get 'notBefore' value");this.notBefore=o;const a=i.attrCertValidityPeriod.notAfterTime;if(!a)throw new Error("Cannot get 'notAfter' value");this.notAfter=a,this.validity=c(this.notBefore,this.notAfter),this.issuer=i.issuer.v1Form||(null===(e=i.issuer.v2Form)||void 0===e?void 0:e.issuerName),this.holder=i.holder}get signature(){const{signatureValue:t,signatureAlgorithm:s}=this.asn;return{value:t,algorithm:s.algorithm}}parseExtensions(){const{acinfo:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new e(i.serialize(t)))))}parseAttributes(){const{acinfo:t}=this.asn;t.attributes&&(this.attributes=t.attributes.map((t=>new u(i.serialize(t)))))}async getThumbprint(t="SHA-1"){try{const s=await o(t,this.raw);s&&(this.thumbprints[t.name||t]=h.Convert.ToHex(s))}catch(t){console.error("Error thumbprint get:",t)}}exportAsBase64(){return h.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return a(h.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${n(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}}export{m as X}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{c as t,a as n}from"./p-d0b55fbb.js";var r=t((function(t){t.exports=function(){var t=6e4,n=36e5,r="millisecond",i="second",e="minute",s="hour",u="day",a="week",o="month",h="quarter",c="year",f="date",d="Invalid Date",l=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,m=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},M=function(t,n,r){var i=String(t);return!i||i.length>=n?t:""+Array(n+1-i.length).join(r)+t},y={s:M,z:function(t){var n=-t.utcOffset(),r=Math.abs(n),i=Math.floor(r/60),e=r%60;return(n<=0?"+":"-")+M(i,2,"0")+":"+M(e,2,"0")},m:function t(n,r){if(n.date()<r.date())return-t(r,n);var i=12*(r.year()-n.year())+(r.month()-n.month()),e=n.clone().add(i,o),s=r-e<0,u=n.clone().add(i+(s?-1:1),o);return+(-(i+(r-e)/(s?e-u:u-e))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:o,y:c,w:a,d:u,D:f,h:s,m:e,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},D="en",g={};g[D]=v;var p=function(t){return t instanceof _},w=function t(n,r,i){var e;if(!n)return D;if("string"==typeof n){var s=n.toLowerCase();g[s]&&(e=s),r&&(g[s]=r,e=s);var u=n.split("-");if(!e&&u.length>1)return t(u[0])}else{var a=n.name;g[a]=n,e=a}return!i&&e&&(D=e),e||!i&&D},S=function(t,n){if(p(t))return t.clone();var r="object"==typeof n?n:{};return r.date=t,r.args=arguments,new _(r)},b=y;b.l=w,b.i=p,b.w=function(t,n){return S(t,{locale:n.$L,utc:n.$u,x:n.$x,$offset:n.$offset})};var _=function(){function v(t){this.$L=w(t.locale,null,!0),this.parse(t)}var M=v.prototype;return M.parse=function(t){this.$d=function(t){var n=t.date,r=t.utc;if(null===n)return new Date(NaN);if(b.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var i=n.match(l);if(i){var e=i[2]-1||0,s=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)):new Date(i[1],e,i[3]||1,i[4]||0,i[5]||0,i[6]||0,s)}}return new Date(n)}(t),this.$x=t.x||{},this.init()},M.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},M.$utils=function(){return b},M.isValid=function(){return!(this.$d.toString()===d)},M.isSame=function(t,n){var r=S(t);return this.startOf(n)<=r&&r<=this.endOf(n)},M.isAfter=function(t,n){return S(t)<this.startOf(n)},M.isBefore=function(t,n){return this.endOf(n)<S(t)},M.$g=function(t,n,r){return b.u(t)?this[n]:this.set(r,t)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(t,n){var r=this,h=!!b.u(n)||n,d=b.p(t),l=function(t,n){var i=b.w(r.$u?Date.UTC(r.$y,n,t):new Date(r.$y,n,t),r);return h?i:i.endOf(u)},m=function(t,n){return b.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(n)),r)},v=this.$W,M=this.$M,y=this.$D,D="set"+(this.$u?"UTC":"");switch(d){case c:return h?l(1,0):l(31,11);case o:return h?l(1,M):l(0,M+1);case a:var g=this.$locale().weekStart||0,p=(v<g?v+7:v)-g;return l(h?y-p:y+(6-p),M);case u:case f:return m(D+"Hours",0);case s:return m(D+"Minutes",1);case e:return m(D+"Seconds",2);case i:return m(D+"Milliseconds",3);default:return this.clone()}},M.endOf=function(t){return this.startOf(t,!1)},M.$set=function(t,n){var a,h=b.p(t),d="set"+(this.$u?"UTC":""),l=(a={},a[u]=d+"Date",a[f]=d+"Date",a[o]=d+"Month",a[c]=d+"FullYear",a[s]=d+"Hours",a[e]=d+"Minutes",a[i]=d+"Seconds",a[r]=d+"Milliseconds",a)[h],m=h===u?this.$D+(n-this.$W):n;if(h===o||h===c){var v=this.clone().set(f,1);v.$d[l](m),v.init(),this.$d=v.set(f,Math.min(this.$D,v.daysInMonth())).$d}else l&&this.$d[l](m);return this.init(),this},M.set=function(t,n){return this.clone().$set(t,n)},M.get=function(t){return this[b.p(t)]()},M.add=function(r,h){var f,d=this;r=Number(r);var l=b.p(h),m=function(t){var n=S(d);return b.w(n.date(n.date()+Math.round(t*r)),d)};if(l===o)return this.set(o,this.$M+r);if(l===c)return this.set(c,this.$y+r);if(l===u)return m(1);if(l===a)return m(7);var v=(f={},f[e]=t,f[s]=n,f[i]=1e3,f)[l]||1,M=this.$d.getTime()+r*v;return b.w(M,this)},M.subtract=function(t,n){return this.add(-1*t,n)},M.format=function(t){var n=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",e=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=r.weekdays,h=r.months,c=function(t,r,e,s){return t&&(t[r]||t(n,i))||e[r].slice(0,s)},f=function(t){return b.s(s%12||12,t,"0")},l=r.meridiem||function(t,n,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i},v={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:c(r.monthsShort,a,h,3),MMMM:c(h,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:c(r.weekdaysMin,this.$W,o,2),ddd:c(r.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:b.s(s,2,"0"),h:f(1),hh:f(2),a:l(s,u,!0),A:l(s,u,!1),m:String(u),mm:b.s(u,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:e};return i.replace(m,(function(t,n){return n||v[t]||e.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(r,f,d){var l,m=b.p(f),v=S(r),M=(v.utcOffset()-this.utcOffset())*t,y=this-v,D=b.m(this,v);return D=(l={},l[c]=D/12,l[o]=D,l[h]=D/3,l[a]=(y-M)/6048e5,l[u]=(y-M)/864e5,l[s]=y/n,l[e]=y/t,l[i]=y/1e3,l)[m]||y,d?D:b.a(D)},M.daysInMonth=function(){return this.endOf(o).$D},M.$locale=function(){return g[this.$L]},M.locale=function(t,n){if(!t)return this.$L;var r=this.clone(),i=w(t,n,!0);return i&&(r.$L=i),r},M.clone=function(){return b.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},v}(),N=_.prototype;return S.prototype=N,[["$ms",r],["$s",i],["$m",e],["$H",s],["$W",u],["$M",o],["$y",c],["$D",f]].forEach((function(t){N[t[1]]=function(n){return this.$g(n,t[0],t[1])}})),S.extend=function(t,n){return t.$i||(t(n,_,S),t.$i=!0),S},S.locale=w,S.isDayjs=p,S.unix=function(t){return S(1e3*t)},S.en=g[D],S.Ls=g,S.p={},S}()})),i=t((function(t){t.exports=function(t,n,r){t=t||{};var i=n.prototype,e={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"};function s(t,n,r,e){return i.fromToBase(t,n,r,e)}r.en.relativeTime=e,i.fromToBase=function(n,i,s,u,a){for(var o,h,c,f=s.$locale().relativeTime||e,d=t.thresholds||[{l:"s",r:44,d:"second"},{l:"m",r:89},{l:"mm",r:44,d:"minute"},{l:"h",r:89},{l:"hh",r:21,d:"hour"},{l:"d",r:35},{l:"dd",r:25,d:"day"},{l:"M",r:45},{l:"MM",r:10,d:"month"},{l:"y",r:17},{l:"yy",d:"year"}],l=d.length,m=0;m<l;m+=1){var v=d[m];v.d&&(o=u?r(n).diff(s,v.d,!0):s.diff(n,v.d,!0));var M=(t.rounding||Math.round)(Math.abs(o));if(c=o>0,M<=v.r||!v.r){M<=1&&m>0&&(v=d[m-1]);var y=f[v.l];a&&(M=a(""+M)),h="string"==typeof y?y.replace("%d",M):y(M,i,v.l,c);break}}if(i)return h;var D=c?f.future:f.past;return"function"==typeof D?D(h):D.replace("%s",h)},i.to=function(t,n){return s(t,n,this,!0)},i.from=function(t,n){return s(t,n,this)};var u=function(t){return t.$u?r.utc():r()};i.toNow=function(t){return this.to(u(this),t)},i.fromNow=function(t){return this.from(u(this),t)}}}));
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/
|
|
12
|
-
r.extend(i);const e=t=>new Date(t).toUTCString(),s=(t,n)=>{if(!t||!n)return"";const i=r(t),e=r(n);return i.to(e,!0)},u={en:{basicInformation:"Basic Information",subjectName:"Subject Name",issuerName:"Issuer Name",publicKeyInfo:"Public Key Info",signature:"Signature",extensions:"Extensions",miscellaneous:"Miscellaneous",download:"Download","download.pem":"Download PEM","download.der":"Download DER",serialNumber:"Serial Number",version:"Version",validity:"Validity",issued:"Issued",expired:"Expired",algorithm:"Algorithm",namedCurve:"Named Curve",exponent:"Exponent",modulus:"Modulus",value:"Value",valid:"Valid",revoked:"Revoked",issuer:"Issuer",name:"Name",publicKey:"Public Key",fingerprint:"Fingerprint",fingerprints:"Fingerprints",actions:"Actions",details:"Details",testURLs:"Test URLs",certificateDetails:"Certificate Details",holder:"Holder",digestInfo:"Digest Info",type:"Type"}},a=new class{constructor(){this.setLocale=t=>{this.locale=t&&u[t]?t:"en"},this.getLocale=()=>this.locale;const t=window.navigator.language.slice(0,2).toLowerCase();this.setLocale(t)}getString(t,n){const r=u[this.locale][t];if(!r)return"";if(!n)return r;const i=r.split(n.pattern);return i.length>1?[i[0],n.replacer,i[1]]:r}};export{e as a,s as d,a as l}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{r as t,c as i,h as e,H as o}from"./p-f7683ba5.js";import{i as s,a as r,b as a,c}from"./p-464e0943.js";import"./p-4f4c1d30.js";import{X as n}from"./p-17c4da7b.js";import{X as l}from"./p-42da7f97.js";import{C as p}from"./p-6c510523.js";import"./p-006865d7.js";import"./p-d0b55fbb.js";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/function h(t){return new Promise(((i,e)=>{const o=new FileReader;o.onload=()=>i({value:o.result,fileName:t.name,fileSize:t.size,sourceMime:t.type}),o.onerror=()=>e(o.error),o.readAsBinaryString(t)}))}const d=class{constructor(e){t(this,e),this.successParse=i(this,"successParse",7),this.clearCertificate=i(this,"clearCertificate",7),this.onClickDecode=()=>{const{value:t}=this.inputPaste;t&&this.decode(t)},this.onClickExample=()=>{this.decode(this.certificateExample)},this.onClickClear=()=>{this.clearValue()},this.onChangeInputFile=async t=>{const i=t.target;if(i.files){const t=await h(i.files[0]);"string"==typeof t.value&&this.decode(t.value),i.value=""}},this.onDropFile=async t=>{t.stopPropagation(),t.preventDefault();const i=t.dataTransfer;if(i.files){const t=await h(i.files[0]);"string"==typeof t.value&&this.decode(t.value)}}}componentDidLoad(){this.defaultCertificate&&setTimeout((()=>this.decode(this.defaultCertificate)),100)}clearValue(){this.inputPaste.value="",this.certificateDecoded=null,this.clearCertificate.emit()}setValue(t){this.certificateDecoded=t,this.inputPaste.value=t.exportAsPemFormatted(),this.successParse.emit(t.exportAsBase64())}decode(t){const i=s(t),e=r(t),o=a(t),h=c(t);let d,f;if(i&&!(e||h||o))return this.clearValue(),void alert("Unsupported file type. Please try to use Certificate/AttributeCertificate/CertificateRequest.");try{e&&(d=new n(t)),h&&(d=new l(t)),o&&(d=new p(t))}catch(t){f=t}if(!d)try{d=new n(t)}catch(t){f=t}if(!d)try{d=new l(t)}catch(t){f=t}if(!d)try{d=new p(t)}catch(t){f=t}d?this.setValue(d):(this.clearValue(),console.log(f),alert("Error decoding file. Please try to use Certificate/AttributeCertificate/CertificateRequest."))}render(){return e(o,null,e("textarea",{placeholder:"Certificate DER or PEM",class:"textarea",ref:t=>{this.inputPaste=t},onDrop:this.onDropFile}),e("div",{class:"controls"},e("peculiar-button",{fill:"fill",class:"button",onClick:this.onClickDecode},"Decode"),e("peculiar-button",{class:"button"},"Choose file",e("input",{type:"file",class:"input_file",accept:"application/pkix-cert,application/x-x509-ca-cert,application/x-x509-user-cert,application/pkcs10,.csr,.req",onChange:this.onChangeInputFile,value:""})),e("peculiar-button",{class:"button",onClick:this.onClickClear},"Clear"),this.certificateExample&&e("peculiar-button",{class:"button",onClick:this.onClickExample},"Example")),this.certificateDecoded instanceof n&&e("peculiar-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof l&&e("peculiar-attribute-certificate-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}),this.certificateDecoded instanceof p&&e("peculiar-csr-viewer",{certificate:this.certificateDecoded,class:"viewer",download:!0}))}};d.style=":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block;width:100%;font-size:0}.textarea{min-height:300px;width:100%;border-radius:3px;border-width:1px;border-style:solid;padding:14px;font-family:monospace;resize:vertical;background-color:white;background-color:rgba(var(--pv-color-light-rgb), 1);border-color:#d1d5d9;border-color:rgba(var(--pv-color-grey_3-rgb), 1);color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);font-size:14px;font-size:var(--pv-font-size-h7)}.controls{margin-top:10px}.button{position:relative}.button:not(:first-child){margin-left:10px}.viewer{margin-top:64px}.input_file{opacity:0;width:100%;height:100%;top:0;left:0;display:block;position:absolute}";export{d as peculiar_certificate_decoder}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{h as t,r as e,H as i}from"./p-f7683ba5.js";import{O as a,P as r,y as s,W as n,I as d,T as o,V as l,U as h,t as c}from"./p-464e0943.js";import{b as p}from"./p-006865d7.js";import{l as b}from"./p-4f4c1d30.js";import{X as g}from"./p-42da7f97.js";import{g as u,R as m,G as x,a as v,B as f,S as w,T as y,b as k,c as L,d as I,E as S,M as A,e as N,P as j}from"./p-b765873e.js";import{C as _}from"./p-6c510523.js";import"./p-d0b55fbb.js";import"./p-d7a13cb4.js";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const K=(e,i)=>{const{attribute:a}=e;return[t(m,{name:"Name",value:u(a.asn.type)}),i,t("tr",null,t("td",{colSpan:2,class:"divider"},t("span",{class:"bg_fill"})))]},D=e=>{const{name:i}=e;return i?i.map((e=>e.map((e=>t(m,{name:a[e.type]||e.type,value:e.value.toString()}))))):null},P=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(D,{name:i.value}))},C=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Code Authority",value:""}),t(x,{generalName:i.value.codeAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Code Id",value:""}),t(x,{generalName:i.value.codeId,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Short Name",value:i.value.shortName}),t(m,{name:"Short Description",value:i.value.shortDescription}))},E=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Assessment Authority",value:""}),t(x,{generalName:i.value.assessmentAuthority,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Assessment Location",value:""}),t(x,{generalName:i.value.assessmentLocation,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Assessment Ref",value:""}),t(x,{generalName:i.value.assessmentRef,getDNSNameLink:()=>"",getIPAddressLink:()=>""}),t(m,{name:"Data Storage Territory",value:i.value.dataStorageTerritory}),t(m,{name:"Description",value:i.value.description}))},z=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:`${i.value.base} * 10^${i.value.degree} ${i.value.location}`}))},T=e=>{const{attribute:i}=e;return t(K,{attribute:i},Object.keys(i.value).map((e=>t(m,{name:e,value:i.value[e].toNumber()?"Yes":"No"}))))},V=t=>{let e=1;return t/100>1?e=100:t/10>1&&(e=10),`${t}/${5*e}`},H=e=>{const{attribute:i}=e,a=Object.keys(i.value).map((e=>[V(i.value[e]),t("br",null)]));return t(K,{attribute:i},t(m,{name:"Value",value:a}))},O=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value,monospace:!0}))},$=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value.utf8String}))},q=e=>{const{attribute:i}=e;return t(K,{attribute:i},t(m,{name:"Value",value:i.value.toString()}))},R=e=>{const{attributes:i}=e;return i&&i.length?[t(v,{value:"Attributes"}),i.map((e=>{try{return t(e.value instanceof r?P:e.value instanceof s?C:e.value instanceof n?E:e.value instanceof d?z:e.value instanceof o?T:e.value instanceof l?H:e.value instanceof h?$:e.value instanceof c?q:"string"==typeof e.value?O:K,{attribute:e})}catch(t){return console.error("Error render attribute:",e.asn.type),null}}))]:null},W=e=>{const{issuer:i}=e;return i?[t(v,{value:b.getString("issuer")}),i.map((e=>t(x,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""})))]:null},B=e=>{const{holder:i}=e;if(!i)return null;const{baseCertificateID:a,objectDigestInfo:r}=i;return[t(v,{value:b.getString("holder")}),a&&[a.issuer.map((e=>t(x,{generalName:e,getDNSNameLink:()=>"",getIPAddressLink:()=>""}))),t("tr",null,t("td",null),t("td",null)),t(m,{name:b.getString("serialNumber"),value:p.Convert.ToHex(a.serial),monospace:!0}),t("tr",null,t("td",null),t("td",null))],r&&[t(m,{name:b.getString("digestInfo"),value:""}),t(m,{name:b.getString("algorithm"),value:u(r.digestAlgorithm.algorithm)}),t(m,{name:b.getString("value"),value:p.Convert.ToHex(r.objectDigest),monospace:!0}),t(m,{name:b.getString("type"),value:r.digestedObjectType})]]},G=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var e;return null===(e=this.authKeyIdParentLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var e;return null===(e=this.authKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof g)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new g(t)}this.certificateDecoded.parseExtensions(),this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof g&&e instanceof g&&t.serialNumber!==e.serialNumber&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this attribute certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no attribute certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(i,null,t("table",null,t(f,Object.assign({},this.certificateDecoded)),t(W,{issuer:this.certificateDecoded.issuer}),t(B,{holder:this.certificateDecoded.holder}),t(w,{signature:this.certificateDecoded.signature}),t(y,{thumbprints:this.certificateDecoded.thumbprints}),t(R,{attributes:this.certificateDecoded.attributes,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(S,{extensions:this.certificateDecoded.extensions,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(A,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/G.style=":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;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";const M=class{constructor(t){e(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>t,this.getAuthKeyIdSiblingsLink=t=>t,this.getSubjectKeyIdChildrenLink=t=>{var e;return null===(e=this.subjectKeyIdChildrenLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var e;return null===(e=this.subjectKeyIdSiblingsLink)||void 0===e?void 0:e.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof _)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new _(t)}this.certificateDecoded.parseAttributes(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,e){"string"!=typeof t||"string"!=typeof e?t instanceof _&&e instanceof _&&t.commonName!==e.commonName&&this.decodeCertificate(t):t!==e&&this.decodeCertificate(t)}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate request."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate request available."))}getExtensionRequestAttribute(){if(this.certificateDecoded)return this.certificateDecoded.attributes.find((t=>"1.2.840.113549.1.9.14"===t.asn.type))}render(){if(this.certificateDecodeError)return this.renderErrorState();if(!this.certificateDecoded)return this.renderEmptyState();const e=this.getExtensionRequestAttribute();return t(i,{"data-view":this.view},t("table",null,t(f,Object.assign({},this.certificateDecoded)),t(N,{name:this.certificateDecoded.subject}),t(j,{publicKey:this.certificateDecoded.publicKey}),t(w,{signature:this.certificateDecoded.signature}),t(y,{thumbprints:this.certificateDecoded.thumbprints}),t(R,{attributes:this.certificateDecoded.attributes,getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),t(S,{extensions:null==e?void 0:e.value,title:"Extension Request",getLEILink:k,getDNSNameLink:L,getIPAddressLink:I,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(A,{certificate:this.certificateDecoded})))}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};M.style=":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;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{G as peculiar_attribute_certificate_viewer,M as peculiar_csr_viewer}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{A as s,n as t,o as a,p as e,q as r,E as i,e as h,r as n,U as c,s as o,t as u,u as b,V as m,v as l,I as p,w as g,W as E,x as k,y as f,z as A,T as x,B as C,D as I,F as R,G as T,H as d,J as w,K as y,L as F,d as N,M as j,N as q,f as K,g as S,h as v,R as B,l as H,j as P,k as U}from"./p-464e0943.js";import{b as D}from"./p-006865d7.js";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/class G extends s{constructor(s){super(s,t);const N=this.getAsnExtnValue();switch(this.asn.type){case y:this.value=e.parse(N,F);break;case d:this.value=e.parse(N,w);break;case R:this.value=e.parse(N,T);break;case C:this.value=e.parse(N,I);break;case A:this.value=e.parse(N,x);break;case k:this.value=e.parse(N,f);break;case g:this.value=e.parse(N,E);break;case l:this.value=e.parse(N,p);break;case b:this.value=e.parse(N,m);break;case o:this.value=e.parse(N,u);break;case n:this.value=e.parse(N,c);break;case a:{const s=e.parse(N,r);this.value=s.map((s=>new i(h.serialize(s))));break}default:this.value=D.Convert.ToHex(N)}}getAsnExtnValue(){return this.asn.values[0]}}
|
|
12
|
-
/**
|
|
13
|
-
* @license
|
|
14
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/class Q extends s{constructor(s){super(N(s),j),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new q(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:s,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===K&&t.parameters&&(a=h.parse(t.parameters,S)),t.algorithm===v&&(a=h.parse(s,B)),{params:a,value:h.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:s,signatureAlgorithm:t}=this.asn;return{value:s,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let s=0;s<this.subject.length;s+=1){const t=this.subject[s];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(s="SHA-1"){try{const t=await H(s,this.raw);t&&(this.thumbprints[s.name||s]=D.Convert.ToHex(t))}catch(s){console.error("Error thumbprint get:",s)}}parseAttributes(){const{certificationRequestInfo:s}=this.asn;s.attributes&&(this.attributes=s.attributes.map((s=>new G(h.serialize(s)))))}exportAsBase64(){return D.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(D.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${U(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}export{G as A,Q as C}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
|
-
*/
|
|
4
|
-
import{h as t,r as i,H as e}from"./p-f7683ba5.js";import{X as a}from"./p-17c4da7b.js";import"./p-464e0943.js";import"./p-006865d7.js";import{l as r}from"./p-4f4c1d30.js";import{a as d,R as s,B as o,e as n,P as l,S as p,T as h,E as c,b,c as g,d as m,M as x}from"./p-b765873e.js";import"./p-d0b55fbb.js";import"./p-6c510523.js";import"./p-d7a13cb4.js";
|
|
5
|
-
/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright (c) Peculiar Ventures, LLC.
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the MIT license found in the
|
|
10
|
-
* LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const u=i=>{const{name:e,issuerDnLink:a}=i,o=r.getString("issuerName");return[t(d,{value:a?t("peculiar-link",{href:a,type:"h6"},o):o}),e.map((i=>t(s,{name:i.name||i.type,value:i.value})))]},f=class{constructor(t){i(this,t),this.isDecodeInProcess=!0,this.getAuthKeyIdParentLink=t=>{var i;return null===(i=this.authKeyIdParentLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getAuthKeyIdSiblingsLink=t=>{var i;return null===(i=this.authKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{authKeyId}}",t)},this.getSubjectKeyIdChildrenLink=t=>{var i;return null===(i=this.subjectKeyIdChildrenLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)},this.getSubjectKeyIdSiblingsLink=t=>{var i;return null===(i=this.subjectKeyIdSiblingsLink)||void 0===i?void 0:i.replace("{{subjectKeyId}}",t)}}componentWillLoad(){this.decodeCertificate(this.certificate)}async decodeCertificate(t){this.isDecodeInProcess=!0;try{if(t instanceof a)this.certificateDecoded=t;else{if("string"!=typeof t)return;this.certificateDecoded=new a(t)}this.certificateDecoded.parseExtensions(),await this.certificateDecoded.getThumbprint("SHA-1"),await this.certificateDecoded.getThumbprint("SHA-256")}catch(t){this.certificateDecodeError=t,console.error("Error certificate parse:",t)}this.isDecodeInProcess=!1}watchCertificateAndDecode(t,i){"string"!=typeof t||"string"!=typeof i?t instanceof a&&i instanceof a&&t.serialNumber!==i.serialNumber&&this.decodeCertificate(t):t!==i&&this.decodeCertificate(t)}getIssuerDnLink(){return this.issuerDnLink}renderErrorState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There was an error decoding this certificate."))}renderEmptyState(){return t("div",{class:"status_wrapper"},t("peculiar-typography",{type:"b1",class:"interaction_text"},"There is no certificate available."))}render(){return this.certificateDecodeError?this.renderErrorState():this.certificateDecoded?t(e,{"data-view":this.view},t("table",null,t(o,Object.assign({},this.certificateDecoded)),t(n,{name:this.certificateDecoded.subject}),t(u,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),t(l,{publicKey:this.certificateDecoded.publicKey}),t(p,{signature:this.certificateDecoded.signature}),t(h,{thumbprints:this.certificateDecoded.thumbprints}),t(c,{extensions:this.certificateDecoded.extensions,getLEILink:b,getDNSNameLink:g,getIPAddressLink:m,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&t(x,{certificate:this.certificateDecoded}))):this.renderEmptyState()}static get watchers(){return{certificate:["watchCertificateAndDecode"]}}};f.style=":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;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";export{f as peculiar_certificate_viewer}
|