@peculiar/certificates-viewer 3.0.3 → 3.0.4
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-311ab0a6.js → certification_request-43396146.js} +7 -2
- package/dist/cjs/peculiar-attribute-certificate-viewer_9.cjs.entry.js +7 -3
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +1 -1
- package/dist/collection/crypto/csr.js +3 -1
- package/dist/collection/crypto/utils.js +4 -1
- package/dist/collection/crypto/x509_attribute_certificate.js +3 -1
- package/dist/collection/crypto/x509_certificate.js +3 -1
- package/dist/esm/{certification_request-efd1e98c.js → certification_request-16ea346c.js} +7 -2
- package/dist/esm/peculiar-attribute-certificate-viewer_9.entry.js +7 -3
- package/dist/esm/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/peculiar/{p-fd1c657d.entry.js → p-7452b86e.entry.js} +1 -1
- package/dist/peculiar/{p-621509b3.entry.js → p-d0db9e70.entry.js} +3 -3
- package/dist/peculiar/{p-d676d064.js → p-d7ed39f0.js} +2 -2
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/crypto/utils.d.ts +1 -1
- package/package.json +2 -2
|
@@ -10224,7 +10224,10 @@ const certificateRawToBuffer = (raw) => {
|
|
|
10224
10224
|
};
|
|
10225
10225
|
const getCertificateThumbprint = async (algorithm, data) => {
|
|
10226
10226
|
const crypto = cryptoProvider.get();
|
|
10227
|
-
|
|
10227
|
+
if (crypto.subtle) {
|
|
10228
|
+
return crypto.subtle.digest(algorithm, data);
|
|
10229
|
+
}
|
|
10230
|
+
return undefined;
|
|
10228
10231
|
};
|
|
10229
10232
|
|
|
10230
10233
|
/**
|
|
@@ -10300,7 +10303,9 @@ class X509Certificate extends AsnData {
|
|
|
10300
10303
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
10301
10304
|
try {
|
|
10302
10305
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
10303
|
-
|
|
10306
|
+
if (thumbprint) {
|
|
10307
|
+
this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
|
|
10308
|
+
}
|
|
10304
10309
|
}
|
|
10305
10310
|
catch (error) {
|
|
10306
10311
|
console.error('Error thumbprint get:', error);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-064e95c7.js');
|
|
9
|
-
const certification_request = require('./certification_request-
|
|
9
|
+
const certification_request = require('./certification_request-43396146.js');
|
|
10
10
|
const download = require('./download-5e7d5455.js');
|
|
11
11
|
const l10n = require('./l10n-d4a77087.js');
|
|
12
12
|
require('./_commonjsHelpers-cb1f949a.js');
|
|
@@ -157,7 +157,9 @@ class X509AttributeCertificate extends certification_request.AsnData {
|
|
|
157
157
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
158
158
|
try {
|
|
159
159
|
const thumbprint = await certification_request.getCertificateThumbprint(algorithm, this.raw);
|
|
160
|
-
|
|
160
|
+
if (thumbprint) {
|
|
161
|
+
this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
|
|
162
|
+
}
|
|
161
163
|
}
|
|
162
164
|
catch (error) {
|
|
163
165
|
console.error('Error thumbprint get:', error);
|
|
@@ -231,7 +233,9 @@ class CSR extends certification_request.AsnData {
|
|
|
231
233
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
232
234
|
try {
|
|
233
235
|
const thumbprint = await certification_request.getCertificateThumbprint(algorithm, this.raw);
|
|
234
|
-
|
|
236
|
+
if (thumbprint) {
|
|
237
|
+
this.thumbprints[algorithm['name'] || algorithm] = download.build.Convert.ToHex(thumbprint);
|
|
238
|
+
}
|
|
235
239
|
}
|
|
236
240
|
catch (error) {
|
|
237
241
|
console.error('Error thumbprint get:', error);
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
7
7
|
|
|
8
8
|
const index = require('./index-064e95c7.js');
|
|
9
|
-
const certification_request = require('./certification_request-
|
|
9
|
+
const certification_request = require('./certification_request-43396146.js');
|
|
10
10
|
const download = require('./download-5e7d5455.js');
|
|
11
11
|
const l10n = require('./l10n-d4a77087.js');
|
|
12
12
|
require('./_commonjsHelpers-cb1f949a.js');
|
|
@@ -64,7 +64,9 @@ export class CSR extends AsnData {
|
|
|
64
64
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
65
65
|
try {
|
|
66
66
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
67
|
-
|
|
67
|
+
if (thumbprint) {
|
|
68
|
+
this.thumbprints[algorithm['name'] || algorithm] = Convert.ToHex(thumbprint);
|
|
69
|
+
}
|
|
68
70
|
}
|
|
69
71
|
catch (error) {
|
|
70
72
|
console.error('Error thumbprint get:', error);
|
|
@@ -30,5 +30,8 @@ export const certificateRawToBuffer = (raw) => {
|
|
|
30
30
|
};
|
|
31
31
|
export const getCertificateThumbprint = async (algorithm, data) => {
|
|
32
32
|
const crypto = cryptoProvider.get();
|
|
33
|
-
|
|
33
|
+
if (crypto.subtle) {
|
|
34
|
+
return crypto.subtle.digest(algorithm, data);
|
|
35
|
+
}
|
|
36
|
+
return undefined;
|
|
34
37
|
};
|
|
@@ -63,7 +63,9 @@ export class X509AttributeCertificate extends AsnData {
|
|
|
63
63
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
64
64
|
try {
|
|
65
65
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
66
|
-
|
|
66
|
+
if (thumbprint) {
|
|
67
|
+
this.thumbprints[algorithm['name'] || algorithm] = Convert.ToHex(thumbprint);
|
|
68
|
+
}
|
|
67
69
|
}
|
|
68
70
|
catch (error) {
|
|
69
71
|
console.error('Error thumbprint get:', error);
|
|
@@ -84,7 +84,9 @@ export class X509Certificate extends AsnData {
|
|
|
84
84
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
85
85
|
try {
|
|
86
86
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
87
|
-
|
|
87
|
+
if (thumbprint) {
|
|
88
|
+
this.thumbprints[algorithm['name'] || algorithm] = Convert.ToHex(thumbprint);
|
|
89
|
+
}
|
|
88
90
|
}
|
|
89
91
|
catch (error) {
|
|
90
92
|
console.error('Error thumbprint get:', error);
|
|
@@ -10222,7 +10222,10 @@ const certificateRawToBuffer = (raw) => {
|
|
|
10222
10222
|
};
|
|
10223
10223
|
const getCertificateThumbprint = async (algorithm, data) => {
|
|
10224
10224
|
const crypto = cryptoProvider.get();
|
|
10225
|
-
|
|
10225
|
+
if (crypto.subtle) {
|
|
10226
|
+
return crypto.subtle.digest(algorithm, data);
|
|
10227
|
+
}
|
|
10228
|
+
return undefined;
|
|
10226
10229
|
};
|
|
10227
10230
|
|
|
10228
10231
|
/**
|
|
@@ -10298,7 +10301,9 @@ class X509Certificate extends AsnData {
|
|
|
10298
10301
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
10299
10302
|
try {
|
|
10300
10303
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
10301
|
-
|
|
10304
|
+
if (thumbprint) {
|
|
10305
|
+
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
10306
|
+
}
|
|
10302
10307
|
}
|
|
10303
10308
|
catch (error) {
|
|
10304
10309
|
console.error('Error thumbprint get:', error);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { h, r as registerInstance, H as Host, c as createEvent } from './index-bbd484d9.js';
|
|
5
|
-
import { A as AsnData, a as Attribute$1, i as id_pkcs9_at_extensionRequest, b as AsnParser, E as ExtensionRequest, c as Extension, d as AsnConvert, e as id_pkcs9_at_unstructuredName, U as UnstructuredName, f as id_pkcs9_at_challengePassword, C as ChallengePassword, g as id_ValuationRanking, V as ValuationRanking, h as id_InsuranceValue, I as InsuranceValue, j as id_WebGDPR, W as WebGDPR, k as id_ActivityDescription, l as ActivityDescription, m as id_TypeRelationship, T as TypeRelationship, n as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, o as id_DomainNameOwner, p as DomainNameOwner, q as id_DomainNameLegalRepresentative, r as DomainNameLegalRepresentative, s as id_DomainNameBeneficiary, t as DomainNameBeneficiary, u as certificateRawToBuffer, v as AttributeCertificate, w as getCertificateThumbprint, x as hexFormat, y as base64Format, z as CertificationRequest, N as Name, B as id_ecPublicKey, F as ECParameters, G as id_rsaEncryption, R as RSAPublicKey, O as OIDs, H as Name$1, J as OtherName, K as DisplayText, L as UserNotice, M as EDIPartyName, P as AsnIntegerArrayBufferConverter, Q as KeyUsage, S as BasicConstraints, X as ExtendedKeyUsage, Y as SubjectKeyIdentifier, Z as AuthorityKeyIdentifier, _ as CRLDistributionPoints, $ as AuthorityInfoAccessSyntax, a0 as SubjectInfoAccessSyntax, a1 as SubjectAlternativeName, a2 as CertificatePolicies, a3 as CertificateTransparency, a4 as NameConstraints, a5 as CertificateTemplate, a6 as EnrollCertTypeChoice, a7 as CaVersion, a8 as QCStatements, a9 as NetscapeComment, aa as NetscapeCertType, ab as LeiRole, ac as LeiChoice, ad as Timestamp, ae as ArchiveRevInfo, af as CRLReason, ag as SubjectDirectoryAttributes, ah as PrivateKeyUsagePeriod, ai as EntrustVersionInfo, aj as BiometricSyntax, ak as LogotypeExtn, al as TNAuthorizationList, am as PolicyConstraints, an as PolicyMappings, ao as isPem, ap as isX509Pem, aq as isPkcs10Pem, ar as isX509AttributePem, as as X509Certificate } from './certification_request-
|
|
5
|
+
import { A as AsnData, a as Attribute$1, i as id_pkcs9_at_extensionRequest, b as AsnParser, E as ExtensionRequest, c as Extension, d as AsnConvert, e as id_pkcs9_at_unstructuredName, U as UnstructuredName, f as id_pkcs9_at_challengePassword, C as ChallengePassword, g as id_ValuationRanking, V as ValuationRanking, h as id_InsuranceValue, I as InsuranceValue, j as id_WebGDPR, W as WebGDPR, k as id_ActivityDescription, l as ActivityDescription, m as id_TypeRelationship, T as TypeRelationship, n as id_DomainNameTechnicalOperator, D as DomainNameTechnicalOperator, o as id_DomainNameOwner, p as DomainNameOwner, q as id_DomainNameLegalRepresentative, r as DomainNameLegalRepresentative, s as id_DomainNameBeneficiary, t as DomainNameBeneficiary, u as certificateRawToBuffer, v as AttributeCertificate, w as getCertificateThumbprint, x as hexFormat, y as base64Format, z as CertificationRequest, N as Name, B as id_ecPublicKey, F as ECParameters, G as id_rsaEncryption, R as RSAPublicKey, O as OIDs, H as Name$1, J as OtherName, K as DisplayText, L as UserNotice, M as EDIPartyName, P as AsnIntegerArrayBufferConverter, Q as KeyUsage, S as BasicConstraints, X as ExtendedKeyUsage, Y as SubjectKeyIdentifier, Z as AuthorityKeyIdentifier, _ as CRLDistributionPoints, $ as AuthorityInfoAccessSyntax, a0 as SubjectInfoAccessSyntax, a1 as SubjectAlternativeName, a2 as CertificatePolicies, a3 as CertificateTransparency, a4 as NameConstraints, a5 as CertificateTemplate, a6 as EnrollCertTypeChoice, a7 as CaVersion, a8 as QCStatements, a9 as NetscapeComment, aa as NetscapeCertType, ab as LeiRole, ac as LeiChoice, ad as Timestamp, ae as ArchiveRevInfo, af as CRLReason, ag as SubjectDirectoryAttributes, ah as PrivateKeyUsagePeriod, ai as EntrustVersionInfo, aj as BiometricSyntax, ak as LogotypeExtn, al as TNAuthorizationList, am as PolicyConstraints, an as PolicyMappings, ao as isPem, ap as isX509Pem, aq as isPkcs10Pem, ar as isX509AttributePem, as as X509Certificate } from './certification_request-16ea346c.js';
|
|
6
6
|
import { b as build, D as Download } from './download-cf68ac2c.js';
|
|
7
7
|
import { d as dateDiff, l as l10n, a as dateShort, h as history } from './l10n-9ac63748.js';
|
|
8
8
|
import './_commonjsHelpers-bfbd2ad8.js';
|
|
@@ -153,7 +153,9 @@ class X509AttributeCertificate extends AsnData {
|
|
|
153
153
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
154
154
|
try {
|
|
155
155
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
156
|
-
|
|
156
|
+
if (thumbprint) {
|
|
157
|
+
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
158
|
+
}
|
|
157
159
|
}
|
|
158
160
|
catch (error) {
|
|
159
161
|
console.error('Error thumbprint get:', error);
|
|
@@ -227,7 +229,9 @@ class CSR extends AsnData {
|
|
|
227
229
|
async getThumbprint(algorithm = 'SHA-1') {
|
|
228
230
|
try {
|
|
229
231
|
const thumbprint = await getCertificateThumbprint(algorithm, this.raw);
|
|
230
|
-
|
|
232
|
+
if (thumbprint) {
|
|
233
|
+
this.thumbprints[algorithm['name'] || algorithm] = build.Convert.ToHex(thumbprint);
|
|
234
|
+
}
|
|
231
235
|
}
|
|
232
236
|
catch (error) {
|
|
233
237
|
console.error('Error thumbprint get:', error);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
4
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-bbd484d9.js';
|
|
5
|
-
import { as as X509Certificate, O as OIDs } from './certification_request-
|
|
5
|
+
import { as as X509Certificate, O as OIDs } from './certification_request-16ea346c.js';
|
|
6
6
|
import { D as Download } from './download-cf68ac2c.js';
|
|
7
7
|
import { l as l10n } from './l10n-9ac63748.js';
|
|
8
8
|
import './_commonjsHelpers-bfbd2ad8.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{as as a,O as i}from"./p-d676d064.js";import{D as l}from"./p-c774ec0b.js";import{l as s}from"./p-99797a49.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(),l.x509.asPEM(t.body.exportAsPemFormatted(),t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),l.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"},s.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},s.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},s.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const l=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:l},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"},s.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"},s.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"},s.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"},s.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"},s.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},s.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:s.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},s.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),l&&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"},s.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"},s.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},s.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},s.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}
|
|
4
|
+
import{r as t,c as r,h as e,H as o}from"./p-f7683ba5.js";import{as as a,O as i}from"./p-d7ed39f0.js";import{D as l}from"./p-c774ec0b.js";import{l as s}from"./p-99797a49.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(),l.x509.asPEM(t.body.exportAsPemFormatted(),t.name||t.body.commonName)}handleClickDownloadAsDer(t,r){r.stopPropagation(),l.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"},s.getString("valid"))),t.revoked&&r.push(e("peculiar-button",{class:"button_table_action",href:t.revoked,target:"_blank"},s.getString("revoked"))),t.expired&&r.push(e("peculiar-button",{class:"button_table_action",href:t.expired,target:"_blank"},s.getString("expired"))),r}renderContentState(){const t=this.highlightWithSearch?this.search:"",r=[];return this.certificatesDecoded.forEach(((o,a)=>{const l=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:l},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"},s.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"},s.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"},s.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"},s.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"},s.getString("actions"),":"),e("span",{class:"content"},e("peculiar-button",{onClick:this.handleClickDetails.bind(this,o.body),class:"button_table_action"},s.getString("details")),e("peculiar-button-split",{onClick:this.handleClickDownloadAsPem.bind(this,o),actions:[{text:s.getString("download.der"),onClick:this.handleClickDownloadAsDer.bind(this,o)}],class:"button_table_action"},s.getString("download.pem")))),this.isHasTests&&e("td",{class:"align_center"},e("peculiar-typography",{class:"mobile_title",color:"grey_5"},s.getString("testURLs"),":"),e("span",{class:"content"},this.renderCertificateTests(o.tests)))),l&&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"},s.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"},s.getString("issuer"))),e("th",{class:"col_name"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("name"))),e("th",{class:"col_public_key"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("publicKey"))),e("th",{class:"col_fingerprint"},e("peculiar-typography",{type:"h7",align:"left"},s.getString("fingerprint")," (SHA-1)")),e("th",{class:"col_actions"},e("peculiar-typography",{type:"h7",align:"center"},s.getString("actions"))),this.isHasTests&&e("th",{class:"col_tests"},e("peculiar-typography",{type:"h7",align:"center"},s.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,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{h as e,r as t,H as a,c as i}from"./p-f7683ba5.js";import{A as n,a as o,i as r,b as s,E as l,c,d,e as b,U as p,f as h,C as u,g as f,V as g,h as m,I as v,j as x,W as y,k as w,l as k,m as _,T as C,n as z,D as A,o as S,p as I,q as N,r as L,s as D,t as j,u as E,v as T,w as K,x as P,y as O,z as G,N as $,B as R,F as V,G as H,R as q,O as B,H as F,J as U,K as Y,L as M,M as X,P as W,Q,S as J,X as Z,Y as ee,Z as te,_ as ae,$ as ie,a0 as ne,a1 as oe,a2 as re,a3 as se,a4 as le,a5 as ce,a6 as de,a7 as be,a8 as pe,a9 as he,aa as ue,ab as fe,ac as ge,ad as me,ae as ve,af as xe,ag as ye,ah as we,ai as ke,aj as _e,ak as Ce,al as ze,am as Ae,an as Se,ao as Ie,ap as Ne,aq as Le,ar as De,as as je}from"./p-
|
|
4
|
+
import{h as e,r as t,H as a,c as i}from"./p-f7683ba5.js";import{A as n,a as o,i as r,b as s,E as l,c,d,e as b,U as p,f as h,C as u,g as f,V as g,h as m,I as v,j as x,W as y,k as w,l as k,m as _,T as C,n as z,D as A,o as S,p as I,q as N,r as L,s as D,t as j,u as E,v as T,w as K,x as P,y as O,z as G,N as $,B as R,F as V,G as H,R as q,O as B,H as F,J as U,K as Y,L as M,M as X,P as W,Q,S as J,X as Z,Y as ee,Z as te,_ as ae,$ as ie,a0 as ne,a1 as oe,a2 as re,a3 as se,a4 as le,a5 as ce,a6 as de,a7 as be,a8 as pe,a9 as he,aa as ue,ab as fe,ac as ge,ad as me,ae as ve,af as xe,ag as ye,ah as we,ai as ke,aj as _e,ak as Ce,al as ze,am as Ae,an as Se,ao as Ie,ap as Ne,aq as Le,ar as De,as as je}from"./p-d7ed39f0.js";import{b as Ee,D as Te}from"./p-c774ec0b.js";import{d as Ke,l as Pe,a as Oe,h as Ge}from"./p-99797a49.js";import"./p-d0b55fbb.js";
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -22,14 +22,14 @@ import{h as e,r as t,H as a,c as i}from"./p-f7683ba5.js";import{A as n,a as o,i
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/class Ve extends n{constructor(e){var t;super(E(e),T),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:a}=this.asn;this.serialNumber=Ee.Convert.ToHex(a.serialNumber),this.version=a.version;const i=a.attrCertValidityPeriod.notBeforeTime;if(!i)throw new Error("Cannot get 'notBefore' value");this.notBefore=i;const n=a.attrCertValidityPeriod.notAfterTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=Ke(this.notBefore,this.notAfter),this.issuer=a.issuer.v1Form||(null===(t=a.issuer.v2Form)||void 0===t?void 0:t.issuerName),this.holder=a.holder}get signature(){const{signatureValue:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}parseExtensions(){const{acinfo:e}=this.asn;e.extensions&&(this.extensions=e.extensions.map((e=>new c(d.serialize(e)))))}parseAttributes(){const{acinfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);this.thumbprints[e.name||e]=Ee.Convert.ToHex(t)}catch(e){console.error("Error thumbprint get:",e)}}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${O(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}}
|
|
25
|
+
*/class Ve extends n{constructor(e){var t;super(E(e),T),this.thumbprints={},this.type="X.509 Attribute Certificate";const{acinfo:a}=this.asn;this.serialNumber=Ee.Convert.ToHex(a.serialNumber),this.version=a.version;const i=a.attrCertValidityPeriod.notBeforeTime;if(!i)throw new Error("Cannot get 'notBefore' value");this.notBefore=i;const n=a.attrCertValidityPeriod.notAfterTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=Ke(this.notBefore,this.notAfter),this.issuer=a.issuer.v1Form||(null===(t=a.issuer.v2Form)||void 0===t?void 0:t.issuerName),this.holder=a.holder}get signature(){const{signatureValue:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}parseExtensions(){const{acinfo:e}=this.asn;e.extensions&&(this.extensions=e.extensions.map((e=>new c(d.serialize(e)))))}parseAttributes(){const{acinfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);t&&(this.thumbprints[e.name||e]=Ee.Convert.ToHex(t))}catch(e){console.error("Error thumbprint get:",e)}}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN ATTRIBUTE CERTIFICATE-----\n${O(this.exportAsBase64())}\n-----END ATTRIBUTE CERTIFICATE-----`}get commonName(){return`attribute-certificate-${this.thumbprints["SHA-1"]}`}}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/class He extends n{constructor(e){super(E(e),G),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new $(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:e,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===R&&t.parameters&&(a=d.parse(t.parameters,V)),t.algorithm===H&&(a=d.parse(e,q)),{params:a,value:d.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let e=0;e<this.subject.length;e+=1){const t=this.subject[e];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);this.thumbprints[e.name||e]=Ee.Convert.ToHex(t)}catch(e){console.error("Error thumbprint get:",e)}}parseAttributes(){const{certificationRequestInfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${O(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}
|
|
32
|
+
*/class He extends n{constructor(e){super(E(e),G),this.thumbprints={},this.type="PKCS#10 Certificate Request";const{certificationRequestInfo:t}=this.asn;this.subject=new $(t.subject).toJSON(),this.version=t.version}get publicKey(){const{subjectPublicKey:e,algorithm:t}=this.asn.certificationRequestInfo.subjectPKInfo;let a;return t.algorithm===R&&t.parameters&&(a=d.parse(t.parameters,V)),t.algorithm===H&&(a=d.parse(e,q)),{params:a,value:d.serialize(this.asn.certificationRequestInfo.subjectPKInfo),algorithm:t.algorithm}}get signature(){const{signature:e,signatureAlgorithm:t}=this.asn;return{value:e,algorithm:t.algorithm}}get commonName(){if(!this.subject)return"";for(let e=0;e<this.subject.length;e+=1){const t=this.subject[e];if("CN"===t.shortName||"E"===t.shortName||"O"===t.shortName)return t.value}return""}async getThumbprint(e="SHA-1"){try{const t=await K(e,this.raw);t&&(this.thumbprints[e.name||e]=Ee.Convert.ToHex(t))}catch(e){console.error("Error thumbprint get:",e)}}parseAttributes(){const{certificationRequestInfo:e}=this.asn;e.attributes&&(this.attributes=e.attributes.map((e=>new Re(d.serialize(e)))))}exportAsBase64(){return Ee.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return P(Ee.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE REQUEST-----\n${O(this.exportAsBase64())}\n-----END CERTIFICATE REQUEST-----`}}
|
|
33
33
|
/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -76,7 +76,7 @@ class gn extends mn{constructor(e){super(e,Qi);const i=this.getAsnExtnValue();tr
|
|
|
76
76
|
*
|
|
77
77
|
* This source code is licensed under the MIT license found in the
|
|
78
78
|
* LICENSE file in the root directory of this source tree.
|
|
79
|
-
*/class vn{constructor(){this.providers=new Map;const t=window.crypto||window.msCrypto;void 0!==t&&this.set(vn.DEFAULT,t)}static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}get(t=vn.DEFAULT){const e=this.providers.get(t.toLowerCase());if(!e)throw new Error(`Cannot get Crypto by name '${t}'`);return e}set(t,e){if("string"==typeof t){if(!e)throw new TypeError("Argument 'value' is required");this.providers.set(t.toLowerCase(),e)}else this.providers.set(vn.DEFAULT,t);return this}}vn.DEFAULT="default";const En=new vn,wn=t=>t.replace(/(.{32})/g,"$1\n").replace(/(.{4})/g,"$1 ").trim(),Pn=t=>t.replace(/(.{64})/g,"$1\n"),Dn=e=>{const i=e.replace(/.*base64,/,"").replace(/-----.+-----/g,"").replace(/[\s\r\n]/g,"");let r;return r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(i)?t.Convert.FromHex(i):(t=>{try{return window.atob(t),!0}catch(t){return!1}})(i)||xr(i)?t.Convert.FromBase64(i):t.Convert.FromBinary(e),r},bn=async(t,e)=>En.get().subtle.digest(t,e);
|
|
79
|
+
*/class vn{constructor(){this.providers=new Map;const t=window.crypto||window.msCrypto;void 0!==t&&this.set(vn.DEFAULT,t)}static isCryptoKeyPair(t){return t&&t.privateKey&&t.publicKey}get(t=vn.DEFAULT){const e=this.providers.get(t.toLowerCase());if(!e)throw new Error(`Cannot get Crypto by name '${t}'`);return e}set(t,e){if("string"==typeof t){if(!e)throw new TypeError("Argument 'value' is required");this.providers.set(t.toLowerCase(),e)}else this.providers.set(vn.DEFAULT,t);return this}}vn.DEFAULT="default";const En=new vn,wn=t=>t.replace(/(.{32})/g,"$1\n").replace(/(.{4})/g,"$1 ").trim(),Pn=t=>t.replace(/(.{64})/g,"$1\n"),Dn=e=>{const i=e.replace(/.*base64,/,"").replace(/-----.+-----/g,"").replace(/[\s\r\n]/g,"");let r;return r=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(i)?t.Convert.FromHex(i):(t=>{try{return window.atob(t),!0}catch(t){return!1}})(i)||xr(i)?t.Convert.FromBase64(i):t.Convert.FromBinary(e),r},bn=async(t,e)=>{const i=En.get();if(i.subtle)return i.subtle.digest(t,e)};
|
|
80
80
|
/**
|
|
81
81
|
* @license
|
|
82
82
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -84,4 +84,4 @@ class gn extends mn{constructor(e){super(e,Qi);const i=this.getAsnExtnValue();tr
|
|
|
84
84
|
* This source code is licensed under the MIT license found in the
|
|
85
85
|
* LICENSE file in the root directory of this source tree.
|
|
86
86
|
*/
|
|
87
|
-
class Bn extends mn{constructor(i){super(Dn(i),Ji),this.thumbprints={},this.type="X.509 Certificate";const{tbsCertificate:r}=this.asn;this.serialNumber=t.Convert.ToHex(r.serialNumber),this.subject=new _r(r.subject).toJSON(),this.issuer=new _r(r.issuer).toJSON(),this.version=r.version+1;const s=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!s)throw new Error("Cannot get 'notBefore' value");this.notBefore=s;const n=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=e(this.notBefore,this.notAfter)}parseExtensions(){const{tbsCertificate:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new gn(Se.serialize(t)))))}get publicKey(){const{subjectPublicKey:t,algorithm:e}=this.asn.tbsCertificate.subjectPublicKeyInfo;let i;return"1.2.840.10045.2.1"===e.algorithm&&e.parameters&&(i=Se.parse(e.parameters,ir)),e.algorithm===or&&(i=Se.parse(t,Tr)),{params:i,value:Se.serialize(this.asn.tbsCertificate.subjectPublicKeyInfo),algorithm:e.algorithm}}get signature(){const{signatureValue:t,signatureAlgorithm:e}=this.asn;return{value:t,algorithm:e.algorithm}}exportAsBase64(){return t.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return wn(t.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE-----\n${Pn(this.exportAsBase64())}\n-----END CERTIFICATE-----`}async getThumbprint(e="SHA-1"){try{const i=await bn(e,this.raw);this.thumbprints[e.name||e]=t.Convert.ToHex(i)}catch(t){console.error("Error thumbprint get:",t)}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const e=this.subject[t];if("CN"===e.shortName||"E"===e.shortName||"O"===e.shortName)return e.value}return""}get issuerCommonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const e=this.issuer[t];if("CN"===e.shortName)return e.value;if("E"===e.shortName)return e.value}return""}get isRoot(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)}subjectToString(){return this.subject?this.subject.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}issuerToString(){return this.issuer?this.issuer.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}}class In{constructor(t={}){this.acIssuer=new Oe,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}var Tn;Ce([he({type:Oe})],In.prototype,"acIssuer",void 0),Ce([he({type:Ot.Integer})],In.prototype,"acSerial",void 0),Ce([he({type:xi,repeated:"sequence"})],In.prototype,"attrs",void 0);let xn=Tn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Tn.prototype)}};xn=Tn=Ce([ue({type:Rt.Sequence,itemType:Ot.ObjectIdentifier})],xn);class Rn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}Ce([he({type:Ot.Integer,optional:!0})],Rn.prototype,"pathLenConstraint",void 0),Ce([he({type:xn,implicit:!0,context:0,optional:!0})],Rn.prototype,"permittedAttrs",void 0),Ce([he({type:xn,implicit:!0,context:1,optional:!0})],Rn.prototype,"excludedAttrs",void 0),Ce([he({type:Ot.Boolean,defaultValue:!0})],Rn.prototype,"permitUnSpecified",void 0);class On{constructor(t={}){this.issuer=new Ve,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}var Nn;Ce([he({type:Ve})],On.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],On.prototype,"serial",void 0),Ce([he({type:Ot.BitString,optional:!0})],On.prototype,"issuerUID",void 0),function(t){t[t.publicKey=0]="publicKey",t[t.publicKeyCert=1]="publicKeyCert",t[t.otherObjectTypes=2]="otherObjectTypes"}(Nn||(Nn={}));class Mn{constructor(t={}){this.digestedObjectType=Nn.publicKey,this.digestAlgorithm=new Fi,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.Enumerated})],Mn.prototype,"digestedObjectType",void 0),Ce([he({type:Ot.ObjectIdentifier,optional:!0})],Mn.prototype,"otherObjectTypeID",void 0),Ce([he({type:Fi})],Mn.prototype,"digestAlgorithm",void 0),Ce([he({type:Ot.BitString})],Mn.prototype,"objectDigest",void 0);class kn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,optional:!0})],kn.prototype,"issuerName",void 0),Ce([he({type:On,context:0,implicit:!0,optional:!0})],kn.prototype,"baseCertificateID",void 0),Ce([he({type:Mn,context:1,implicit:!0,optional:!0})],kn.prototype,"objectDigestInfo",void 0);let Kn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,repeated:"sequence"})],Kn.prototype,"v1Form",void 0),Ce([he({type:kn,context:0,implicit:!0})],Kn.prototype,"v2Form",void 0),Kn=Ce([ue({type:Rt.Choice})],Kn);class Hn{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notBeforeTime",void 0),Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notAfterTime",void 0);class jn{constructor(t={}){Object.assign(this,t)}}var _n,Un,Fn;Ce([he({type:On,implicit:!0,context:0,optional:!0})],jn.prototype,"baseCertificateID",void 0),Ce([he({type:Ve,implicit:!0,context:1,optional:!0})],jn.prototype,"entityName",void 0),Ce([he({type:Mn,implicit:!0,context:2,optional:!0})],jn.prototype,"objectDigestInfo",void 0),function(t){t[t.v2=1]="v2"}(_n||(_n={}));class Vn{constructor(t={}){this.version=_n.v2,this.holder=new jn,this.issuer=new Kn,this.signature=new Fi,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Hn,this.attributes=[],Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Vn.prototype,"version",void 0),Ce([he({type:jn})],Vn.prototype,"holder",void 0),Ce([he({type:Kn})],Vn.prototype,"issuer",void 0),Ce([he({type:Fi})],Vn.prototype,"signature",void 0),Ce([he({type:Ot.Integer,converter:Kt})],Vn.prototype,"serialNumber",void 0),Ce([he({type:Hn})],Vn.prototype,"attrCertValidityPeriod",void 0),Ce([he({type:xi,repeated:"sequence"})],Vn.prototype,"attributes",void 0),Ce([he({type:Ot.BitString,optional:!0})],Vn.prototype,"issuerUniqueID",void 0),Ce([he({type:Wi,optional:!0})],Vn.prototype,"extensions",void 0);class Ln{constructor(t={}){this.acinfo=new Vn,this.signatureAlgorithm=new Fi,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Vn})],Ln.prototype,"acinfo",void 0),Ce([he({type:Fi})],Ln.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Ln.prototype,"signatureValue",void 0),function(t){t[t.unmarked=1]="unmarked",t[t.unclassified=2]="unclassified",t[t.restricted=4]="restricted",t[t.confidential=8]="confidential",t[t.secret=16]="secret",t[t.topSecret=32]="topSecret"}(Un||(Un={}));class Gn extends se{}class $n{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier,implicit:!0,context:0})],$n.prototype,"type",void 0),Ce([he({type:Ot.Any,implicit:!0,context:1})],$n.prototype,"value",void 0);class Qn{constructor(t={}){this.policyId="",this.classList=new Gn(Un.unclassified),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Qn.prototype,"policyId",void 0),Ce([he({type:Gn,defaultValue:new Gn(Un.unclassified)})],Qn.prototype,"classList",void 0),Ce([he({type:$n,repeated:"set"})],Qn.prototype,"securityCategories",void 0);class Wn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:ne})],Wn.prototype,"cotets",void 0),Ce([he({type:Ot.ObjectIdentifier})],Wn.prototype,"oid",void 0),Ce([he({type:Ot.Utf8String})],Wn.prototype,"string",void 0);class qn{constructor(t={}){this.values=[],Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],qn.prototype,"policyAuthority",void 0),Ce([he({type:Wn,repeated:"sequence"})],qn.prototype,"values",void 0);class zn{constructor(t={}){this.targetCertificate=new On,Object.assign(this,t)}}Ce([he({type:On})],zn.prototype,"targetCertificate",void 0),Ce([he({type:Oe,optional:!0})],zn.prototype,"targetName",void 0),Ce([he({type:Mn,optional:!0})],zn.prototype,"certDigestInfo",void 0);let Jn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,context:0,implicit:!0})],Jn.prototype,"targetName",void 0),Ce([he({type:Oe,context:1,implicit:!0})],Jn.prototype,"targetGroup",void 0),Ce([he({type:zn,context:2,implicit:!0})],Jn.prototype,"targetCert",void 0),Jn=Ce([ue({type:Rt.Choice})],Jn);let Zn=Fn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Fn.prototype)}};var Xn;Zn=Fn=Ce([ue({type:Rt.Sequence,itemType:Jn})],Zn);let Yn=Xn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Xn.prototype)}};Yn=Xn=Ce([ue({type:Rt.Sequence,itemType:Zn})],Yn);class to{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],to.prototype,"roleAuthority",void 0),Ce([he({type:Oe,implicit:!0,context:1})],to.prototype,"roleName",void 0);class eo{constructor(t={}){this.service=new Oe,this.ident=new Oe,Object.assign(this,t)}}Ce([he({type:Oe})],eo.prototype,"service",void 0),Ce([he({type:Oe})],eo.prototype,"ident",void 0),Ce([he({type:ne,optional:!0})],eo.prototype,"authInfo",void 0);const io="0.4.0.9496.6";let ro=class{constructor(t={}){this.codeAuthority=new Oe,this.codeId=new Oe,this.shortName="",this.shortDescription="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],ro.prototype,"codeAuthority",void 0),Ce([he({type:Oe,context:1})],ro.prototype,"codeId",void 0),Ce([he({type:Ot.Utf8String,context:2})],ro.prototype,"shortName",void 0),Ce([he({type:Ot.Utf8String,context:3})],ro.prototype,"shortDescription",void 0),ro=Ce([ue({type:Rt.Sequence})],ro);let so=class extends Ie{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};so=Ce([ue({type:Rt.Sequence})],so);const no="0.4.0.9496.1";let oo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};oo=Ce([ue({type:Rt.Sequence})],oo);const ao="0.4.0.9496.2";let co=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};co=Ce([ue({type:Rt.Sequence})],co);const lo="0.4.0.9496.3";let uo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};uo=Ce([ue({type:Rt.Sequence})],uo);const ho="0.4.0.9496.4";let po=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};po=Ce([ue({type:Rt.Sequence})],po);const fo="0.4.0.9496.8";let yo=class{constructor(t={}){this.location="",this.base=0,this.degree=0,Object.assign(this,t)}toString(){return`${this.base} x 10^${this.degree} ${this.location}`}};Ce([he({type:Ot.PrintableString})],yo.prototype,"location",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"base",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"degree",void 0),yo=Ce([ue({type:Rt.Sequence})],yo);const So="0.4.0.9496.9";let Co=class{constructor(t={}){this.stars5=0,this.stars4=0,this.stars3=0,this.stars2=0,this.stars1=0,Object.assign(this,t)}};Ce([he({type:Ot.Integer})],Co.prototype,"stars5",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars4",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars3",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars2",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars1",void 0),Co=Ce([ue({type:Rt.Sequence})],Co);const Ao="0.4.0.9496.5";let mo=class{constructor(t={}){this.DNBvsDNO=new se(0),this.DNBvsDNT=new se(0),this.DNOvsDNT=new se(0),Object.assign(this,t)}};Ce([he({type:se,context:0})],mo.prototype,"DNBvsDNO",void 0),Ce([he({type:se,context:1})],mo.prototype,"DNBvsDNT",void 0),Ce([he({type:se,context:2})],mo.prototype,"DNOvsDNT",void 0),mo=Ce([ue({type:Rt.Sequence})],mo);const go="0.4.0.9496.7";let vo=class{constructor(t={}){this.assessmentAuthority=new Oe,this.assessmentRef=new Oe,this.assessmentLocation=new Oe,this.dataStorageTerritory="",this.description="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],vo.prototype,"assessmentAuthority",void 0),Ce([he({type:Oe,context:1})],vo.prototype,"assessmentRef",void 0),Ce([he({type:Oe,context:2})],vo.prototype,"assessmentLocation",void 0),Ce([he({type:Ot.PrintableString,context:3})],vo.prototype,"dataStorageTerritory",void 0),Ce([he({type:Ot.Utf8String,context:4})],vo.prototype,"description",void 0),vo=Ce([ue({type:Rt.Sequence})],vo);class Eo{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}}var wo;Ce([he({type:Ot.ObjectIdentifier})],Eo.prototype,"attrType",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Eo.prototype,"attrValues",void 0);class Po{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Po.prototype,"otherCertFormat",void 0),Ce([he({type:Ot.Any})],Po.prototype,"otherCert",void 0);let Do=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Ji})],Do.prototype,"certificate",void 0),Ce([he({type:Ln,context:2,implicit:!0})],Do.prototype,"v2AttrCert",void 0),Ce([he({type:Po,context:3,implicit:!0})],Do.prototype,"other",void 0),Do=Ce([ue({type:Rt.Choice})],Do);let bo=wo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,wo.prototype)}};bo=wo=Ce([ue({type:Rt.Set,itemType:Do})],bo);class Bo{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Bo.prototype,"contentType",void 0),Ce([he({type:Ot.Any,context:0})],Bo.prototype,"content",void 0);let Io=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:ne})],Io.prototype,"single",void 0),Ce([he({type:Ot.Any})],Io.prototype,"any",void 0),Io=Ce([ue({type:Rt.Choice})],Io);class To{constructor(t={}){this.eContentType="",Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],To.prototype,"eContentType",void 0),Ce([he({type:Io,context:0,optional:!0})],To.prototype,"eContent",void 0);class xo{constructor(t={}){this.issuer=new Ie,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}var Ro;Ce([he({type:Ie})],xo.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],xo.prototype,"serialNumber",void 0);class Oo{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Oo.prototype,"otherRevInfoFormat",void 0),Ce([he({type:Ot.Any})],Oo.prototype,"otherRevInfo",void 0);let No=class{constructor(t={}){this.other=new Oo,Object.assign(this,t)}};Ce([he({type:Oo,context:1,implicit:!0})],No.prototype,"other",void 0),No=Ce([ue({type:Rt.Choice})],No);let Mo=Ro=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Ro.prototype)}};var ko;Mo=Ro=Ce([ue({type:Rt.Set,itemType:No})],Mo),function(t){t[t.v0=0]="v0",t[t.v1=1]="v1",t[t.v2=2]="v2",t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v5=5]="v5"}(ko||(ko={}));let Ko=class extends Fi{};Ko=Ce([ue({type:Rt.Sequence})],Ko);let Ho=class extends Fi{};Ho=Ce([ue({type:Rt.Sequence})],Ho);let jo=class{constructor(t={}){Object.assign(this,t)}};var _o;Ce([he({type:Ni,context:0,implicit:!0})],jo.prototype,"subjectKeyIdentifier",void 0),Ce([he({type:xo})],jo.prototype,"issuerAndSerialNumber",void 0),jo=Ce([ue({type:Rt.Choice})],jo);class Uo{constructor(t={}){this.version=ko.v0,this.sid=new jo,this.digestAlgorithm=new Ko,this.signatureAlgorithm=new Ho,this.signature=new ne,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Uo.prototype,"version",void 0),Ce([he({type:jo})],Uo.prototype,"sid",void 0),Ce([he({type:Ko})],Uo.prototype,"digestAlgorithm",void 0),Ce([he({type:Eo,repeated:"set",context:0,implicit:!0,optional:!0})],Uo.prototype,"signedAttrs",void 0),Ce([he({type:Ho})],Uo.prototype,"signatureAlgorithm",void 0),Ce([he({type:ne})],Uo.prototype,"signature",void 0),Ce([he({type:Eo,repeated:"set",context:1,implicit:!0,optional:!0})],Uo.prototype,"unsignedAttrs",void 0);let Fo=_o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,_o.prototype)}};var Vo;Fo=_o=Ce([ue({type:Rt.Set,itemType:Uo})],Fo);let Lo=Vo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};Lo=Vo=Ce([ue({type:Rt.Set,itemType:Ko})],Lo);class Go{constructor(t={}){this.version=ko.v0,this.digestAlgorithms=new Lo,this.encapContentInfo=new To,this.signerInfos=new Fo,Object.assign(this,t)}}var $o;Ce([he({type:Ot.Integer})],Go.prototype,"version",void 0),Ce([he({type:Lo})],Go.prototype,"digestAlgorithms",void 0),Ce([he({type:To})],Go.prototype,"encapContentInfo",void 0),Ce([he({type:bo,context:0,implicit:!0,optional:!0})],Go.prototype,"certificates",void 0),Ce([he({type:No,context:1,implicit:!0,optional:!0})],Go.prototype,"crls",void 0),Ce([he({type:Fo})],Go.prototype,"signerInfos",void 0);class Qo{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}Ce([he({type:Ot.ObjectIdentifier})],Qo.prototype,"attrId",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Qo.prototype,"attrValues",void 0);let Wo=$o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,$o.prototype)}};var qo;Wo=$o=Ce([ue({type:Rt.Sequence,itemType:Qo})],Wo);let zo=qo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,qo.prototype)}};zo=qo=Ce([ue({type:Rt.Sequence,itemType:Bo})],zo);class Jo{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Jo.prototype,"certId",void 0),Ce([he({type:Ot.Any,context:0})],Jo.prototype,"certValue",void 0);class Zo{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Zo.prototype,"crlId",void 0),Ce([he({type:Ot.Any,context:0})],Zo.prototype,"crltValue",void 0);class Xo extends ne{}class Yo{constructor(t={}){this.encryptionAlgorithm=new Fi,this.encryptedData=new Xo,Object.assign(this,t)}}var ta,ea;Ce([he({type:Fi})],Yo.prototype,"encryptionAlgorithm",void 0),Ce([he({type:Xo})],Yo.prototype,"encryptedData",void 0),function(t){t[t.v1=0]="v1"}(ea||(ea={}));class ia extends ne{}let ra=ta=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ta.prototype)}};ra=ta=Ce([ue({type:Rt.Sequence,itemType:xi})],ra);class sa{constructor(t={}){this.version=ea.v1,this.privateKeyAlgorithm=new Fi,this.privateKey=new ia,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],sa.prototype,"version",void 0),Ce([he({type:Fi})],sa.prototype,"privateKeyAlgorithm",void 0),Ce([he({type:ia})],sa.prototype,"privateKey",void 0),Ce([he({type:ra,implicit:!0,context:0,optional:!0})],sa.prototype,"attributes",void 0);let na=class extends sa{};na=Ce([ue({type:Rt.Sequence})],na);let oa=class extends Yo{};oa=Ce([ue({type:Rt.Sequence})],oa);class aa{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],aa.prototype,"secretTypeId",void 0),Ce([he({type:Ot.Any,context:0})],aa.prototype,"secretValue",void 0);class ca{constructor(t={}){this.mac=new Pr,this.macSalt=new ne,this.iterations=1,Object.assign(this,t)}}Ce([he({type:Pr})],ca.prototype,"mac",void 0),Ce([he({type:ne})],ca.prototype,"macSalt",void 0),Ce([he({type:Ot.Integer,defaultValue:1})],ca.prototype,"iterations",void 0);class la{constructor(t={}){this.version=3,this.authSafe=new Bo,this.macData=new ca,Object.assign(this,t)}}var ua;Ce([he({type:Ot.Integer})],la.prototype,"version",void 0),Ce([he({type:Bo})],la.prototype,"authSafe",void 0),Ce([he({type:ca,optional:!0})],la.prototype,"macData",void 0);class ha{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],ha.prototype,"bagId",void 0),Ce([he({type:Ot.Any,context:0})],ha.prototype,"bagValue",void 0),Ce([he({type:Qo,repeated:"set",optional:!0})],ha.prototype,"bagAttributes",void 0);let pa=ua=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};var da,fa,ya;pa=ua=Ce([ue({type:Rt.Sequence,itemType:ha})],pa);const Sa="1.2.840.113549.1.9",Ca=`${Sa}.2`,Aa=`${Sa}.7`,ma=`${Sa}.14`;let ga=class extends we{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};Ce([he({type:Ot.IA5String})],ga.prototype,"ia5String",void 0),ga=Ce([ue({type:Rt.Choice})],ga);let va=class extends Bo{};va=Ce([ue({type:Rt.Sequence})],va);let Ea=class extends la{};Ea=Ce([ue({type:Rt.Sequence})],Ea);let wa=class extends Yo{};wa=Ce([ue({type:Rt.Sequence})],wa);let Pa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.IA5String})],Pa.prototype,"value",void 0),Pa=Ce([ue({type:Rt.Choice})],Pa);let Da=class extends ga{};Da=Ce([ue({type:Rt.Choice})],Da);let ba=class extends we{};ba=Ce([ue({type:Rt.Choice})],ba);let Ba=class{constructor(t=new Date){this.value=t}};Ce([he({type:Ot.GeneralizedTime})],Ba.prototype,"value",void 0),Ba=Ce([ue({type:Rt.Choice})],Ba);let Ia=class extends we{};Ia=Ce([ue({type:Rt.Choice})],Ia);let Ta=class{constructor(t="M"){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],Ta.prototype,"value",void 0),Ta=Ce([ue({type:Rt.Choice})],Ta);let xa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],xa.prototype,"value",void 0),xa=Ce([ue({type:Rt.Choice})],xa);let Ra=class extends xa{};Ra=Ce([ue({type:Rt.Choice})],Ra);let Oa=class extends we{};Oa=Ce([ue({type:Rt.Choice})],Oa);let Na=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.ObjectIdentifier})],Na.prototype,"value",void 0),Na=Ce([ue({type:Rt.Choice})],Na);let Ma=class extends Li{};Ma=Ce([ue({type:Rt.Choice})],Ma);let ka=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};Ce([he({type:Ot.Integer})],ka.prototype,"value",void 0),ka=Ce([ue({type:Rt.Choice})],ka);let Ka=class extends Uo{};Ka=Ce([ue({type:Rt.Sequence})],Ka);let Ha=class extends we{};Ha=Ce([ue({type:Rt.Choice})],Ha);let ja=da=class extends Wi{constructor(t){super(t),Object.setPrototypeOf(this,da.prototype)}};ja=da=Ce([ue({type:Rt.Sequence})],ja);let _a=fa=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,fa.prototype)}};_a=fa=Ce([ue({type:Rt.Set,itemType:Eo})],_a);let Ua=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.BmpString})],Ua.prototype,"value",void 0),Ua=Ce([ue({type:Rt.Choice})],Ua);let Fa=class extends Fi{};Fa=Ce([ue({type:Rt.Sequence})],Fa);let Va=ya=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ya.prototype)}};var La;Va=ya=Ce([ue({type:Rt.Sequence,itemType:Fa})],Va);let Ga=La=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}};Ga=La=Ce([ue({type:Rt.Sequence,itemType:xi})],Ga);class $a{constructor(t={}){this.version=0,this.subject=new Ie,this.subjectPKInfo=new Vi,this.attributes=new Ga,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],$a.prototype,"version",void 0),Ce([he({type:Ie})],$a.prototype,"subject",void 0),Ce([he({type:Vi})],$a.prototype,"subjectPKInfo",void 0),Ce([he({type:Ga,implicit:!0,context:0})],$a.prototype,"attributes",void 0);class Qa{constructor(t={}){this.certificationRequestInfo=new $a,this.signatureAlgorithm=new Fi,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:$a})],Qa.prototype,"certificationRequestInfo",void 0),Ce([he({type:Fi})],Qa.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Qa.prototype,"signature",void 0);export{He as $,mn as A,tr as B,Ha as C,po as D,ja as E,ir as F,or as G,Ie as H,yo as I,xe as J,Qe as K,qe as L,Re as M,_r as N,kr as O,Kt as P,gi as Q,Tr as R,Ue as S,mo as T,Da as U,Co as V,vo as W,di as X,Ni as Y,_e as Z,oi as _,xi as a,Ui as a0,Ti as a1,Xe as a2,Vs as a3,wi as a4,is as a5,ss as a6,ns as a7,Zr as a8,Is as a9,Bs as aa,Ms as ab,Ns as ac,Gs as ad,Ls as ae,hi as af,Oi as ag,Mi as ah,ji as ai,Gr as aj,sn as ak,fn as al,Pi as am,Bi as an,xr as ao,Rr as ap,Or as aq,Nr as ar,Bn as as,de as b,gn as c,Se as d,Ca as e,Aa as f,So as g,fo as h,ma as i,go as j,io as k,ro as l,Ao as m,ho as n,lo as o,uo as p,ao as q,co as r,no as s,oo as t,Dn as u,Ln as v,bn as w,wn as x,Pn as y,Qa as z}
|
|
87
|
+
class Bn extends mn{constructor(i){super(Dn(i),Ji),this.thumbprints={},this.type="X.509 Certificate";const{tbsCertificate:r}=this.asn;this.serialNumber=t.Convert.ToHex(r.serialNumber),this.subject=new _r(r.subject).toJSON(),this.issuer=new _r(r.issuer).toJSON(),this.version=r.version+1;const s=r.validity.notBefore.utcTime||r.validity.notBefore.generalTime;if(!s)throw new Error("Cannot get 'notBefore' value");this.notBefore=s;const n=r.validity.notAfter.utcTime||r.validity.notAfter.generalTime;if(!n)throw new Error("Cannot get 'notAfter' value");this.notAfter=n,this.validity=e(this.notBefore,this.notAfter)}parseExtensions(){const{tbsCertificate:t}=this.asn;t.extensions&&(this.extensions=t.extensions.map((t=>new gn(Se.serialize(t)))))}get publicKey(){const{subjectPublicKey:t,algorithm:e}=this.asn.tbsCertificate.subjectPublicKeyInfo;let i;return"1.2.840.10045.2.1"===e.algorithm&&e.parameters&&(i=Se.parse(e.parameters,ir)),e.algorithm===or&&(i=Se.parse(t,Tr)),{params:i,value:Se.serialize(this.asn.tbsCertificate.subjectPublicKeyInfo),algorithm:e.algorithm}}get signature(){const{signatureValue:t,signatureAlgorithm:e}=this.asn;return{value:t,algorithm:e.algorithm}}exportAsBase64(){return t.Convert.ToBase64(this.raw)}exportAsHexFormatted(){return wn(t.Convert.ToHex(this.raw))}exportAsPemFormatted(){return`-----BEGIN CERTIFICATE-----\n${Pn(this.exportAsBase64())}\n-----END CERTIFICATE-----`}async getThumbprint(e="SHA-1"){try{const i=await bn(e,this.raw);i&&(this.thumbprints[e.name||e]=t.Convert.ToHex(i))}catch(t){console.error("Error thumbprint get:",t)}}get commonName(){if(!this.subject)return"";for(let t=0;t<this.subject.length;t+=1){const e=this.subject[t];if("CN"===e.shortName||"E"===e.shortName||"O"===e.shortName)return e.value}return""}get issuerCommonName(){if(!this.issuer)return"";for(let t=0;t<this.issuer.length;t+=1){const e=this.issuer[t];if("CN"===e.shortName)return e.value;if("E"===e.shortName)return e.value}return""}get isRoot(){return JSON.stringify(this.issuer)===JSON.stringify(this.subject)}subjectToString(){return this.subject?this.subject.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}issuerToString(){return this.issuer?this.issuer.map((t=>`${t.shortName}=${t.value}`)).join(", "):""}}class In{constructor(t={}){this.acIssuer=new Oe,this.acSerial=0,this.attrs=[],Object.assign(this,t)}}var Tn;Ce([he({type:Oe})],In.prototype,"acIssuer",void 0),Ce([he({type:Ot.Integer})],In.prototype,"acSerial",void 0),Ce([he({type:xi,repeated:"sequence"})],In.prototype,"attrs",void 0);let xn=Tn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Tn.prototype)}};xn=Tn=Ce([ue({type:Rt.Sequence,itemType:Ot.ObjectIdentifier})],xn);class Rn{constructor(t={}){this.permitUnSpecified=!0,Object.assign(this,t)}}Ce([he({type:Ot.Integer,optional:!0})],Rn.prototype,"pathLenConstraint",void 0),Ce([he({type:xn,implicit:!0,context:0,optional:!0})],Rn.prototype,"permittedAttrs",void 0),Ce([he({type:xn,implicit:!0,context:1,optional:!0})],Rn.prototype,"excludedAttrs",void 0),Ce([he({type:Ot.Boolean,defaultValue:!0})],Rn.prototype,"permitUnSpecified",void 0);class On{constructor(t={}){this.issuer=new Ve,this.serial=new ArrayBuffer(0),this.issuerUID=new ArrayBuffer(0),Object.assign(this,t)}}var Nn;Ce([he({type:Ve})],On.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],On.prototype,"serial",void 0),Ce([he({type:Ot.BitString,optional:!0})],On.prototype,"issuerUID",void 0),function(t){t[t.publicKey=0]="publicKey",t[t.publicKeyCert=1]="publicKeyCert",t[t.otherObjectTypes=2]="otherObjectTypes"}(Nn||(Nn={}));class Mn{constructor(t={}){this.digestedObjectType=Nn.publicKey,this.digestAlgorithm=new Fi,this.objectDigest=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.Enumerated})],Mn.prototype,"digestedObjectType",void 0),Ce([he({type:Ot.ObjectIdentifier,optional:!0})],Mn.prototype,"otherObjectTypeID",void 0),Ce([he({type:Fi})],Mn.prototype,"digestAlgorithm",void 0),Ce([he({type:Ot.BitString})],Mn.prototype,"objectDigest",void 0);class kn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,optional:!0})],kn.prototype,"issuerName",void 0),Ce([he({type:On,context:0,implicit:!0,optional:!0})],kn.prototype,"baseCertificateID",void 0),Ce([he({type:Mn,context:1,implicit:!0,optional:!0})],kn.prototype,"objectDigestInfo",void 0);let Kn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,repeated:"sequence"})],Kn.prototype,"v1Form",void 0),Ce([he({type:kn,context:0,implicit:!0})],Kn.prototype,"v2Form",void 0),Kn=Ce([ue({type:Rt.Choice})],Kn);class Hn{constructor(t={}){this.notBeforeTime=new Date,this.notAfterTime=new Date,Object.assign(this,t)}}Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notBeforeTime",void 0),Ce([he({type:Ot.GeneralizedTime})],Hn.prototype,"notAfterTime",void 0);class jn{constructor(t={}){Object.assign(this,t)}}var _n,Un,Fn;Ce([he({type:On,implicit:!0,context:0,optional:!0})],jn.prototype,"baseCertificateID",void 0),Ce([he({type:Ve,implicit:!0,context:1,optional:!0})],jn.prototype,"entityName",void 0),Ce([he({type:Mn,implicit:!0,context:2,optional:!0})],jn.prototype,"objectDigestInfo",void 0),function(t){t[t.v2=1]="v2"}(_n||(_n={}));class Vn{constructor(t={}){this.version=_n.v2,this.holder=new jn,this.issuer=new Kn,this.signature=new Fi,this.serialNumber=new ArrayBuffer(0),this.attrCertValidityPeriod=new Hn,this.attributes=[],Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Vn.prototype,"version",void 0),Ce([he({type:jn})],Vn.prototype,"holder",void 0),Ce([he({type:Kn})],Vn.prototype,"issuer",void 0),Ce([he({type:Fi})],Vn.prototype,"signature",void 0),Ce([he({type:Ot.Integer,converter:Kt})],Vn.prototype,"serialNumber",void 0),Ce([he({type:Hn})],Vn.prototype,"attrCertValidityPeriod",void 0),Ce([he({type:xi,repeated:"sequence"})],Vn.prototype,"attributes",void 0),Ce([he({type:Ot.BitString,optional:!0})],Vn.prototype,"issuerUniqueID",void 0),Ce([he({type:Wi,optional:!0})],Vn.prototype,"extensions",void 0);class Ln{constructor(t={}){this.acinfo=new Vn,this.signatureAlgorithm=new Fi,this.signatureValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Vn})],Ln.prototype,"acinfo",void 0),Ce([he({type:Fi})],Ln.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Ln.prototype,"signatureValue",void 0),function(t){t[t.unmarked=1]="unmarked",t[t.unclassified=2]="unclassified",t[t.restricted=4]="restricted",t[t.confidential=8]="confidential",t[t.secret=16]="secret",t[t.topSecret=32]="topSecret"}(Un||(Un={}));class Gn extends se{}class $n{constructor(t={}){this.type="",this.value=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier,implicit:!0,context:0})],$n.prototype,"type",void 0),Ce([he({type:Ot.Any,implicit:!0,context:1})],$n.prototype,"value",void 0);class Qn{constructor(t={}){this.policyId="",this.classList=new Gn(Un.unclassified),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Qn.prototype,"policyId",void 0),Ce([he({type:Gn,defaultValue:new Gn(Un.unclassified)})],Qn.prototype,"classList",void 0),Ce([he({type:$n,repeated:"set"})],Qn.prototype,"securityCategories",void 0);class Wn{constructor(t={}){Object.assign(this,t)}}Ce([he({type:ne})],Wn.prototype,"cotets",void 0),Ce([he({type:Ot.ObjectIdentifier})],Wn.prototype,"oid",void 0),Ce([he({type:Ot.Utf8String})],Wn.prototype,"string",void 0);class qn{constructor(t={}){this.values=[],Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],qn.prototype,"policyAuthority",void 0),Ce([he({type:Wn,repeated:"sequence"})],qn.prototype,"values",void 0);class zn{constructor(t={}){this.targetCertificate=new On,Object.assign(this,t)}}Ce([he({type:On})],zn.prototype,"targetCertificate",void 0),Ce([he({type:Oe,optional:!0})],zn.prototype,"targetName",void 0),Ce([he({type:Mn,optional:!0})],zn.prototype,"certDigestInfo",void 0);let Jn=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Oe,context:0,implicit:!0})],Jn.prototype,"targetName",void 0),Ce([he({type:Oe,context:1,implicit:!0})],Jn.prototype,"targetGroup",void 0),Ce([he({type:zn,context:2,implicit:!0})],Jn.prototype,"targetCert",void 0),Jn=Ce([ue({type:Rt.Choice})],Jn);let Zn=Fn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Fn.prototype)}};var Xn;Zn=Fn=Ce([ue({type:Rt.Sequence,itemType:Jn})],Zn);let Yn=Xn=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Xn.prototype)}};Yn=Xn=Ce([ue({type:Rt.Sequence,itemType:Zn})],Yn);class to{constructor(t={}){Object.assign(this,t)}}Ce([he({type:Ve,implicit:!0,context:0,optional:!0})],to.prototype,"roleAuthority",void 0),Ce([he({type:Oe,implicit:!0,context:1})],to.prototype,"roleName",void 0);class eo{constructor(t={}){this.service=new Oe,this.ident=new Oe,Object.assign(this,t)}}Ce([he({type:Oe})],eo.prototype,"service",void 0),Ce([he({type:Oe})],eo.prototype,"ident",void 0),Ce([he({type:ne,optional:!0})],eo.prototype,"authInfo",void 0);const io="0.4.0.9496.6";let ro=class{constructor(t={}){this.codeAuthority=new Oe,this.codeId=new Oe,this.shortName="",this.shortDescription="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],ro.prototype,"codeAuthority",void 0),Ce([he({type:Oe,context:1})],ro.prototype,"codeId",void 0),Ce([he({type:Ot.Utf8String,context:2})],ro.prototype,"shortName",void 0),Ce([he({type:Ot.Utf8String,context:3})],ro.prototype,"shortDescription",void 0),ro=Ce([ue({type:Rt.Sequence})],ro);let so=class extends Ie{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};so=Ce([ue({type:Rt.Sequence})],so);const no="0.4.0.9496.1";let oo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};oo=Ce([ue({type:Rt.Sequence})],oo);const ao="0.4.0.9496.2";let co=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};co=Ce([ue({type:Rt.Sequence})],co);const lo="0.4.0.9496.3";let uo=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};uo=Ce([ue({type:Rt.Sequence})],uo);const ho="0.4.0.9496.4";let po=class extends so{constructor(t){super(t),Object.setPrototypeOf(this,Ie.prototype)}};po=Ce([ue({type:Rt.Sequence})],po);const fo="0.4.0.9496.8";let yo=class{constructor(t={}){this.location="",this.base=0,this.degree=0,Object.assign(this,t)}toString(){return`${this.base} x 10^${this.degree} ${this.location}`}};Ce([he({type:Ot.PrintableString})],yo.prototype,"location",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"base",void 0),Ce([he({type:Ot.Integer})],yo.prototype,"degree",void 0),yo=Ce([ue({type:Rt.Sequence})],yo);const So="0.4.0.9496.9";let Co=class{constructor(t={}){this.stars5=0,this.stars4=0,this.stars3=0,this.stars2=0,this.stars1=0,Object.assign(this,t)}};Ce([he({type:Ot.Integer})],Co.prototype,"stars5",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars4",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars3",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars2",void 0),Ce([he({type:Ot.Integer})],Co.prototype,"stars1",void 0),Co=Ce([ue({type:Rt.Sequence})],Co);const Ao="0.4.0.9496.5";let mo=class{constructor(t={}){this.DNBvsDNO=new se(0),this.DNBvsDNT=new se(0),this.DNOvsDNT=new se(0),Object.assign(this,t)}};Ce([he({type:se,context:0})],mo.prototype,"DNBvsDNO",void 0),Ce([he({type:se,context:1})],mo.prototype,"DNBvsDNT",void 0),Ce([he({type:se,context:2})],mo.prototype,"DNOvsDNT",void 0),mo=Ce([ue({type:Rt.Sequence})],mo);const go="0.4.0.9496.7";let vo=class{constructor(t={}){this.assessmentAuthority=new Oe,this.assessmentRef=new Oe,this.assessmentLocation=new Oe,this.dataStorageTerritory="",this.description="",Object.assign(this,t)}};Ce([he({type:Oe,context:0})],vo.prototype,"assessmentAuthority",void 0),Ce([he({type:Oe,context:1})],vo.prototype,"assessmentRef",void 0),Ce([he({type:Oe,context:2})],vo.prototype,"assessmentLocation",void 0),Ce([he({type:Ot.PrintableString,context:3})],vo.prototype,"dataStorageTerritory",void 0),Ce([he({type:Ot.Utf8String,context:4})],vo.prototype,"description",void 0),vo=Ce([ue({type:Rt.Sequence})],vo);class Eo{constructor(t={}){this.attrType="",this.attrValues=[],Object.assign(this,t)}}var wo;Ce([he({type:Ot.ObjectIdentifier})],Eo.prototype,"attrType",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Eo.prototype,"attrValues",void 0);class Po{constructor(t={}){this.otherCertFormat="",this.otherCert=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Po.prototype,"otherCertFormat",void 0),Ce([he({type:Ot.Any})],Po.prototype,"otherCert",void 0);let Do=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:Ji})],Do.prototype,"certificate",void 0),Ce([he({type:Ln,context:2,implicit:!0})],Do.prototype,"v2AttrCert",void 0),Ce([he({type:Po,context:3,implicit:!0})],Do.prototype,"other",void 0),Do=Ce([ue({type:Rt.Choice})],Do);let bo=wo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,wo.prototype)}};bo=wo=Ce([ue({type:Rt.Set,itemType:Do})],bo);class Bo{constructor(t={}){this.contentType="",this.content=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Bo.prototype,"contentType",void 0),Ce([he({type:Ot.Any,context:0})],Bo.prototype,"content",void 0);let Io=class{constructor(t={}){Object.assign(this,t)}};Ce([he({type:ne})],Io.prototype,"single",void 0),Ce([he({type:Ot.Any})],Io.prototype,"any",void 0),Io=Ce([ue({type:Rt.Choice})],Io);class To{constructor(t={}){this.eContentType="",Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],To.prototype,"eContentType",void 0),Ce([he({type:Io,context:0,optional:!0})],To.prototype,"eContent",void 0);class xo{constructor(t={}){this.issuer=new Ie,this.serialNumber=new ArrayBuffer(0),Object.assign(this,t)}}var Ro;Ce([he({type:Ie})],xo.prototype,"issuer",void 0),Ce([he({type:Ot.Integer,converter:Kt})],xo.prototype,"serialNumber",void 0);class Oo{constructor(t={}){this.otherRevInfoFormat="",this.otherRevInfo=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Oo.prototype,"otherRevInfoFormat",void 0),Ce([he({type:Ot.Any})],Oo.prototype,"otherRevInfo",void 0);let No=class{constructor(t={}){this.other=new Oo,Object.assign(this,t)}};Ce([he({type:Oo,context:1,implicit:!0})],No.prototype,"other",void 0),No=Ce([ue({type:Rt.Choice})],No);let Mo=Ro=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Ro.prototype)}};var ko;Mo=Ro=Ce([ue({type:Rt.Set,itemType:No})],Mo),function(t){t[t.v0=0]="v0",t[t.v1=1]="v1",t[t.v2=2]="v2",t[t.v3=3]="v3",t[t.v4=4]="v4",t[t.v5=5]="v5"}(ko||(ko={}));let Ko=class extends Fi{};Ko=Ce([ue({type:Rt.Sequence})],Ko);let Ho=class extends Fi{};Ho=Ce([ue({type:Rt.Sequence})],Ho);let jo=class{constructor(t={}){Object.assign(this,t)}};var _o;Ce([he({type:Ni,context:0,implicit:!0})],jo.prototype,"subjectKeyIdentifier",void 0),Ce([he({type:xo})],jo.prototype,"issuerAndSerialNumber",void 0),jo=Ce([ue({type:Rt.Choice})],jo);class Uo{constructor(t={}){this.version=ko.v0,this.sid=new jo,this.digestAlgorithm=new Ko,this.signatureAlgorithm=new Ho,this.signature=new ne,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],Uo.prototype,"version",void 0),Ce([he({type:jo})],Uo.prototype,"sid",void 0),Ce([he({type:Ko})],Uo.prototype,"digestAlgorithm",void 0),Ce([he({type:Eo,repeated:"set",context:0,implicit:!0,optional:!0})],Uo.prototype,"signedAttrs",void 0),Ce([he({type:Ho})],Uo.prototype,"signatureAlgorithm",void 0),Ce([he({type:ne})],Uo.prototype,"signature",void 0),Ce([he({type:Eo,repeated:"set",context:1,implicit:!0,optional:!0})],Uo.prototype,"unsignedAttrs",void 0);let Fo=_o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,_o.prototype)}};var Vo;Fo=_o=Ce([ue({type:Rt.Set,itemType:Uo})],Fo);let Lo=Vo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,Vo.prototype)}};Lo=Vo=Ce([ue({type:Rt.Set,itemType:Ko})],Lo);class Go{constructor(t={}){this.version=ko.v0,this.digestAlgorithms=new Lo,this.encapContentInfo=new To,this.signerInfos=new Fo,Object.assign(this,t)}}var $o;Ce([he({type:Ot.Integer})],Go.prototype,"version",void 0),Ce([he({type:Lo})],Go.prototype,"digestAlgorithms",void 0),Ce([he({type:To})],Go.prototype,"encapContentInfo",void 0),Ce([he({type:bo,context:0,implicit:!0,optional:!0})],Go.prototype,"certificates",void 0),Ce([he({type:No,context:1,implicit:!0,optional:!0})],Go.prototype,"crls",void 0),Ce([he({type:Fo})],Go.prototype,"signerInfos",void 0);class Qo{constructor(t={}){this.attrId="",this.attrValues=[],Object.assign(t)}}Ce([he({type:Ot.ObjectIdentifier})],Qo.prototype,"attrId",void 0),Ce([he({type:Ot.Any,repeated:"set"})],Qo.prototype,"attrValues",void 0);let Wo=$o=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,$o.prototype)}};var qo;Wo=$o=Ce([ue({type:Rt.Sequence,itemType:Qo})],Wo);let zo=qo=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,qo.prototype)}};zo=qo=Ce([ue({type:Rt.Sequence,itemType:Bo})],zo);class Jo{constructor(t={}){this.certId="",this.certValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Jo.prototype,"certId",void 0),Ce([he({type:Ot.Any,context:0})],Jo.prototype,"certValue",void 0);class Zo{constructor(t={}){this.crlId="",this.crltValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],Zo.prototype,"crlId",void 0),Ce([he({type:Ot.Any,context:0})],Zo.prototype,"crltValue",void 0);class Xo extends ne{}class Yo{constructor(t={}){this.encryptionAlgorithm=new Fi,this.encryptedData=new Xo,Object.assign(this,t)}}var ta,ea;Ce([he({type:Fi})],Yo.prototype,"encryptionAlgorithm",void 0),Ce([he({type:Xo})],Yo.prototype,"encryptedData",void 0),function(t){t[t.v1=0]="v1"}(ea||(ea={}));class ia extends ne{}let ra=ta=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ta.prototype)}};ra=ta=Ce([ue({type:Rt.Sequence,itemType:xi})],ra);class sa{constructor(t={}){this.version=ea.v1,this.privateKeyAlgorithm=new Fi,this.privateKey=new ia,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],sa.prototype,"version",void 0),Ce([he({type:Fi})],sa.prototype,"privateKeyAlgorithm",void 0),Ce([he({type:ia})],sa.prototype,"privateKey",void 0),Ce([he({type:ra,implicit:!0,context:0,optional:!0})],sa.prototype,"attributes",void 0);let na=class extends sa{};na=Ce([ue({type:Rt.Sequence})],na);let oa=class extends Yo{};oa=Ce([ue({type:Rt.Sequence})],oa);class aa{constructor(t={}){this.secretTypeId="",this.secretValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],aa.prototype,"secretTypeId",void 0),Ce([he({type:Ot.Any,context:0})],aa.prototype,"secretValue",void 0);class ca{constructor(t={}){this.mac=new Pr,this.macSalt=new ne,this.iterations=1,Object.assign(this,t)}}Ce([he({type:Pr})],ca.prototype,"mac",void 0),Ce([he({type:ne})],ca.prototype,"macSalt",void 0),Ce([he({type:Ot.Integer,defaultValue:1})],ca.prototype,"iterations",void 0);class la{constructor(t={}){this.version=3,this.authSafe=new Bo,this.macData=new ca,Object.assign(this,t)}}var ua;Ce([he({type:Ot.Integer})],la.prototype,"version",void 0),Ce([he({type:Bo})],la.prototype,"authSafe",void 0),Ce([he({type:ca,optional:!0})],la.prototype,"macData",void 0);class ha{constructor(t={}){this.bagId="",this.bagValue=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:Ot.ObjectIdentifier})],ha.prototype,"bagId",void 0),Ce([he({type:Ot.Any,context:0})],ha.prototype,"bagValue",void 0),Ce([he({type:Qo,repeated:"set",optional:!0})],ha.prototype,"bagAttributes",void 0);let pa=ua=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ua.prototype)}};var da,fa,ya;pa=ua=Ce([ue({type:Rt.Sequence,itemType:ha})],pa);const Sa="1.2.840.113549.1.9",Ca=`${Sa}.2`,Aa=`${Sa}.7`,ma=`${Sa}.14`;let ga=class extends we{constructor(t={}){super(t)}toString(){return{}.toString(),this.ia5String||super.toString()}};Ce([he({type:Ot.IA5String})],ga.prototype,"ia5String",void 0),ga=Ce([ue({type:Rt.Choice})],ga);let va=class extends Bo{};va=Ce([ue({type:Rt.Sequence})],va);let Ea=class extends la{};Ea=Ce([ue({type:Rt.Sequence})],Ea);let wa=class extends Yo{};wa=Ce([ue({type:Rt.Sequence})],wa);let Pa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.IA5String})],Pa.prototype,"value",void 0),Pa=Ce([ue({type:Rt.Choice})],Pa);let Da=class extends ga{};Da=Ce([ue({type:Rt.Choice})],Da);let ba=class extends we{};ba=Ce([ue({type:Rt.Choice})],ba);let Ba=class{constructor(t=new Date){this.value=t}};Ce([he({type:Ot.GeneralizedTime})],Ba.prototype,"value",void 0),Ba=Ce([ue({type:Rt.Choice})],Ba);let Ia=class extends we{};Ia=Ce([ue({type:Rt.Choice})],Ia);let Ta=class{constructor(t="M"){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],Ta.prototype,"value",void 0),Ta=Ce([ue({type:Rt.Choice})],Ta);let xa=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.PrintableString})],xa.prototype,"value",void 0),xa=Ce([ue({type:Rt.Choice})],xa);let Ra=class extends xa{};Ra=Ce([ue({type:Rt.Choice})],Ra);let Oa=class extends we{};Oa=Ce([ue({type:Rt.Choice})],Oa);let Na=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.ObjectIdentifier})],Na.prototype,"value",void 0),Na=Ce([ue({type:Rt.Choice})],Na);let Ma=class extends Li{};Ma=Ce([ue({type:Rt.Choice})],Ma);let ka=class{constructor(t=0){this.value=t}toString(){return this.value.toString()}};Ce([he({type:Ot.Integer})],ka.prototype,"value",void 0),ka=Ce([ue({type:Rt.Choice})],ka);let Ka=class extends Uo{};Ka=Ce([ue({type:Rt.Sequence})],Ka);let Ha=class extends we{};Ha=Ce([ue({type:Rt.Choice})],Ha);let ja=da=class extends Wi{constructor(t){super(t),Object.setPrototypeOf(this,da.prototype)}};ja=da=Ce([ue({type:Rt.Sequence})],ja);let _a=fa=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,fa.prototype)}};_a=fa=Ce([ue({type:Rt.Set,itemType:Eo})],_a);let Ua=class{constructor(t=""){this.value=t}toString(){return this.value}};Ce([he({type:Ot.BmpString})],Ua.prototype,"value",void 0),Ua=Ce([ue({type:Rt.Choice})],Ua);let Fa=class extends Fi{};Fa=Ce([ue({type:Rt.Sequence})],Fa);let Va=ya=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,ya.prototype)}};var La;Va=ya=Ce([ue({type:Rt.Sequence,itemType:Fa})],Va);let Ga=La=class extends ye{constructor(t){super(t),Object.setPrototypeOf(this,La.prototype)}};Ga=La=Ce([ue({type:Rt.Sequence,itemType:xi})],Ga);class $a{constructor(t={}){this.version=0,this.subject=new Ie,this.subjectPKInfo=new Vi,this.attributes=new Ga,Object.assign(this,t)}}Ce([he({type:Ot.Integer})],$a.prototype,"version",void 0),Ce([he({type:Ie})],$a.prototype,"subject",void 0),Ce([he({type:Vi})],$a.prototype,"subjectPKInfo",void 0),Ce([he({type:Ga,implicit:!0,context:0})],$a.prototype,"attributes",void 0);class Qa{constructor(t={}){this.certificationRequestInfo=new $a,this.signatureAlgorithm=new Fi,this.signature=new ArrayBuffer(0),Object.assign(this,t)}}Ce([he({type:$a})],Qa.prototype,"certificationRequestInfo",void 0),Ce([he({type:Fi})],Qa.prototype,"signatureAlgorithm",void 0),Ce([he({type:Ot.BitString})],Qa.prototype,"signature",void 0);export{He as $,mn as A,tr as B,Ha as C,po as D,ja as E,ir as F,or as G,Ie as H,yo as I,xe as J,Qe as K,qe as L,Re as M,_r as N,kr as O,Kt as P,gi as Q,Tr as R,Ue as S,mo as T,Da as U,Co as V,vo as W,di as X,Ni as Y,_e as Z,oi as _,xi as a,Ui as a0,Ti as a1,Xe as a2,Vs as a3,wi as a4,is as a5,ss as a6,ns as a7,Zr as a8,Is as a9,Bs as aa,Ms as ab,Ns as ac,Gs as ad,Ls as ae,hi as af,Oi as ag,Mi as ah,ji as ai,Gr as aj,sn as ak,fn as al,Pi as am,Bi as an,xr as ao,Rr as ap,Or as aq,Nr as ar,Bn as as,de as b,gn as c,Se as d,Ca as e,Aa as f,So as g,fo as h,ma as i,go as j,io as k,ro as l,Ao as m,ho as n,lo as o,uo as p,ao as q,co as r,no as s,oo as t,Dn as u,Ln as v,bn as w,wn as x,Pn as y,Qa as z}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
3
3
|
*/
|
|
4
|
-
import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-
|
|
4
|
+
import{d as e,N as i,w as t,p as c,b as r}from"./p-f7683ba5.js";(()=>{const r=Array.from(e.querySelectorAll("script")).find((e=>new RegExp(`/${i}(\\.esm)?\\.js($|\\?|#)`).test(e.src)||e.getAttribute("data-stencil-namespace")===i)),s=r["data-opts"]||{};return s.resourcesUrl=new URL(".",new URL(r.getAttribute("data-resources-url")||r.src,t.location.href)).href,((c,r)=>{const s=`__sc_import_${i.replace(/\s|-/g,"_")}`;try{t[s]=new Function("w",`return import(w);//${Math.random()}`)}catch(i){const a=new Map;t[s]=i=>{const n=new URL(i,c).href;let l=a.get(n);if(!l){const i=e.createElement("script");i.type="module",i.crossOrigin=r.crossOrigin,i.src=URL.createObjectURL(new Blob([`import * as m from '${n}'; window.${s}.m = m;`],{type:"application/javascript"})),l=new Promise((e=>{i.onload=()=>{e(t[s].m),i.remove()}})),a.set(n,l),e.head.appendChild(i)}return l}}})(s.resourcesUrl,r),t.customElements?c(s):__sc_import_peculiar("./p-9f4ee110.js").then((()=>s))})().then((e=>r([["p-d0db9e70",[[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-b09a1f0b",[[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-7452b86e",[[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]}]]]],e)));
|
|
@@ -2,4 +2,4 @@ export declare const base64Clarify: (base64: string) => string;
|
|
|
2
2
|
export declare const hexFormat: (hex: string) => string;
|
|
3
3
|
export declare const base64Format: (base64: string) => string;
|
|
4
4
|
export declare const certificateRawToBuffer: (raw: string) => ArrayBuffer;
|
|
5
|
-
export declare const getCertificateThumbprint: (algorithm: globalThis.AlgorithmIdentifier, data: ArrayBuffer) => Promise<ArrayBuffer>;
|
|
5
|
+
export declare const getCertificateThumbprint: (algorithm: globalThis.AlgorithmIdentifier, data: ArrayBuffer) => Promise<ArrayBuffer | undefined>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peculiar/certificates-viewer",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Peculiar Certificate Viewer web-components makes it easy for you to display certificate related details in your web application.",
|
|
6
6
|
"keywords": [
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "b0e64f46e3d31cdc22fdff8f816b970b8175eb77"
|
|
75
75
|
}
|