@peculiar/certificates-viewer 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/dist/cjs/{certification_request-00bbfbc5.js → certification_request-6eb7ef37.js} +438 -428
  2. package/dist/cjs/{crl-de4e196b.js → crl-75106e2e.js} +1 -1
  3. package/dist/cjs/{miscellaneous-30c4aded.js → miscellaneous-0eade914.js} +203 -57
  4. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +3 -3
  5. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +3 -3
  6. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +3 -3
  7. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -2
  8. package/dist/cjs/{x509_certificate-2af9b990.js → x509_certificate-9e7652cf.js} +1 -1
  9. package/dist/collection/components/certificate-details-parts/extensions/biometric_syntax_extension.js +10 -9
  10. package/dist/collection/components/certificate-details-parts/extensions/certificate_policies_extension.js +24 -24
  11. package/dist/collection/components/certificate-details-parts/extensions/certificate_transparency_extension.js +11 -10
  12. package/dist/collection/components/certificate-details-parts/extensions/extended_key_usage_extension.js +6 -2
  13. package/dist/collection/components/certificate-details-parts/extensions/info_access_syntax_extension.js +7 -6
  14. package/dist/collection/components/certificate-details-parts/extensions/qc_statements_extension.js +37 -6
  15. package/dist/collection/components/certificate-details-parts/extensions/subject_directory_attributes_extension.js +7 -6
  16. package/dist/collection/constants/oids.js +14 -13
  17. package/dist/esm/{certification_request-8cc9d070.js → certification_request-4adeae0c.js} +18 -14
  18. package/dist/esm/{crl-f43a95b7.js → crl-2857d300.js} +1 -1
  19. package/dist/esm/{miscellaneous-b74d9eae.js → miscellaneous-91256fd3.js} +203 -57
  20. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +3 -3
  21. package/dist/esm/peculiar-certificate-decoder.entry.js +3 -3
  22. package/dist/esm/peculiar-certificate-viewer.entry.js +3 -3
  23. package/dist/esm/peculiar-certificates-viewer.entry.js +2 -2
  24. package/dist/esm/{x509_certificate-0fdd28aa.js → x509_certificate-e7b4d8d1.js} +1 -1
  25. package/dist/peculiar/{p-ec8787ed.js → p-05f4713f.js} +2 -2
  26. package/dist/peculiar/{p-4e9318fb.entry.js → p-22d8ae9c.entry.js} +1 -1
  27. package/dist/peculiar/{p-167fd2db.entry.js → p-40808c02.entry.js} +1 -1
  28. package/dist/peculiar/{p-05337212.entry.js → p-5fb5f008.entry.js} +1 -1
  29. package/dist/peculiar/p-77121cf7.js +69 -0
  30. package/dist/peculiar/{p-0868020d.entry.js → p-7de0bfb3.entry.js} +1 -1
  31. package/dist/peculiar/{p-c72f8e8f.js → p-b44dc7c9.js} +5 -5
  32. package/dist/peculiar/{p-ea9a6317.js → p-e7518804.js} +2 -2
  33. package/dist/peculiar/peculiar.esm.js +1 -1
  34. package/dist/types/constants/oids.d.ts +1 -0
  35. package/package.json +3 -2
  36. package/dist/peculiar/p-45336b4f.js +0 -69
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const certification_request = require('./certification_request-00bbfbc5.js');
6
+ const certification_request = require('./certification_request-6eb7ef37.js');
7
7
  const download = require('./download-a97f4cb2.js');
8
8
  const l10n = require('./l10n-17c96aba.js');
9
9
 
@@ -6,7 +6,7 @@
6
6
  const index = require('./index-064e95c7.js');
7
7
  const l10n = require('./l10n-17c96aba.js');
8
8
  const download = require('./download-a97f4cb2.js');
9
- const certification_request = require('./certification_request-00bbfbc5.js');
9
+ const certification_request = require('./certification_request-6eb7ef37.js');
10
10
 
11
11
  /**
12
12
  * @license
@@ -296,7 +296,11 @@ const BasicConstraintsExtension = (props) => {
296
296
  */
297
297
  const ExtendedKeyUsageExtension = (props) => {
298
298
  const { extension } = props;
299
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((usage, arrayIndex) => (index.h(RowValue, { name: `Purpose #${arrayIndex + 1}`, value: getStringByOID(usage) })))));
299
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
300
+ index.h(RowValue, { name: "Purposes:", value: "" }),
301
+ extension.value.map((usage) => (index.h(TableRowTable, null,
302
+ index.h(RowValue, { name: "Purpose", value: getStringByOID(usage) })))),
303
+ ])));
300
304
  };
301
305
 
302
306
  /**
@@ -442,11 +446,12 @@ const CRLDistributionPointsExtension = (props) => {
442
446
  */
443
447
  const InfoAccessSyntaxExtension = (props) => {
444
448
  const { extension } = props;
445
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((description, arrayIndex) => ([
446
- index.h(RowValue, { name: `Description #${arrayIndex + 1}`, value: "" }),
447
- index.h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
448
- index.h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props)),
449
- ]))));
449
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
450
+ index.h(RowValue, { name: "Descriptions:", value: "" }),
451
+ extension.value.map((description) => (index.h(TableRowTable, null,
452
+ index.h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
453
+ index.h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props))))),
454
+ ])));
450
455
  };
451
456
 
452
457
  /**
@@ -470,30 +475,30 @@ const SubjectAlternativeNameExtension = (props) => {
470
475
  */
471
476
  const CertificatePoliciesExtension = (props) => {
472
477
  const { extension } = props;
473
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => {
474
- var _a;
475
- return ([
476
- index.h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
477
- index.h(RowValue, { name: "ID", value: getStringByOID(policy.policyIdentifier) }),
478
- (_a = policy.policyQualifiers) === null || _a === void 0 ? void 0 : _a.map((qualifierInfo, indexInfo) => {
479
- const data = [
480
- index.h(RowValue, { name: `Qualifier #${arrayIndex + 1}.${indexInfo + 1}`, value: "" }),
481
- index.h(RowValue, { name: "ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
482
- ];
483
- if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
484
- const value = certification_request.AsnParser.parse(qualifierInfo.qualifier, certification_request.DisplayText);
485
- data.push(index.h(RowValue, { name: "Value", value: value.toString() }));
486
- }
487
- if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
488
- const value = certification_request.AsnParser.parse(qualifierInfo.qualifier, certification_request.UserNotice);
489
- if (value.explicitText) {
490
- data.push(index.h(RowValue, { name: "Value", value: value.explicitText.toString() }));
478
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
479
+ index.h(RowValue, { name: "Policies:", value: "" }),
480
+ extension.value.map((policy) => (index.h(TableRowTable, null,
481
+ index.h(RowValue, { name: "Policy ID", value: getStringByOID(policy.policyIdentifier) }),
482
+ policy.policyQualifiers && Boolean(policy.policyQualifiers.length) && ([
483
+ index.h(RowValue, { name: "Qualifiers:", value: "" }),
484
+ policy.policyQualifiers.map((qualifierInfo) => {
485
+ const data = [
486
+ index.h(RowValue, { name: "Qualifier ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
487
+ ];
488
+ if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
489
+ const value = certification_request.AsnParser.parse(qualifierInfo.qualifier, certification_request.DisplayText);
490
+ data.push(index.h(RowValue, { name: "Value", value: value.toString() }));
491
491
  }
492
- }
493
- return data;
494
- }),
495
- ]);
496
- })));
492
+ if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
493
+ const value = certification_request.AsnParser.parse(qualifierInfo.qualifier, certification_request.UserNotice);
494
+ if (value.explicitText) {
495
+ data.push(index.h(RowValue, { name: "Value", value: value.explicitText.toString() }));
496
+ }
497
+ }
498
+ return (index.h(TableRowTable, null, data));
499
+ }),
500
+ ])))),
501
+ ])));
497
502
  };
498
503
 
499
504
  /**
@@ -591,15 +596,16 @@ const logs = {
591
596
  */
592
597
  const CertificateTransparencyExtension = (props) => {
593
598
  const { extension } = props;
594
- return (index.h(BasicExtension, { extension: extension }, extension.value.toJSON().map((signedCertificateTimestamp, arrayIndex) => ([
595
- index.h(RowValue, { name: `SCT #${arrayIndex + 1}`, value: "" }),
596
- index.h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
597
- index.h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
598
- index.h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
599
- index.h(RowValue, { name: "Timestamp", value: l10n.dateShort(signedCertificateTimestamp.timestamp) }),
600
- index.h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }),
601
- index.h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true }),
602
- ]))));
599
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.items.length) && ([
600
+ index.h(RowValue, { name: "Signed Certificate Timestamps:", value: "" }),
601
+ extension.value.toJSON().map((signedCertificateTimestamp) => (index.h(TableRowTable, null,
602
+ index.h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
603
+ index.h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
604
+ index.h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
605
+ index.h(RowValue, { name: "Timestamp", value: l10n.dateShort(signedCertificateTimestamp.timestamp) }),
606
+ index.h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }),
607
+ index.h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true })))),
608
+ ])));
603
609
  };
604
610
 
605
611
  /**
@@ -660,6 +666,116 @@ const CaVersionExtension = (props) => {
660
666
  index.h(RowValue, { name: "Key Index", value: version.keyIndex })));
661
667
  };
662
668
 
669
+ var PdsLocations_1, QcEuPDS_1, QcType_1, QcCClegislation_1;
670
+ let Iso4217CurrencyCode = class Iso4217CurrencyCode {
671
+ constructor(value) {
672
+ if (typeof value === "string") {
673
+ this.alphabetic = value;
674
+ }
675
+ else if (typeof value === "number") {
676
+ this.numeric = value;
677
+ }
678
+ }
679
+ };
680
+ certification_request.__decorate([
681
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.PrintableString })
682
+ ], Iso4217CurrencyCode.prototype, "alphabetic", void 0);
683
+ certification_request.__decorate([
684
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.PrintableString })
685
+ ], Iso4217CurrencyCode.prototype, "numeric", void 0);
686
+ Iso4217CurrencyCode = certification_request.__decorate([
687
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Choice })
688
+ ], Iso4217CurrencyCode);
689
+ class MonetaryValue {
690
+ constructor(params = {}) {
691
+ this.currency = new Iso4217CurrencyCode();
692
+ this.amount = 0;
693
+ this.exponent = 0;
694
+ Object.assign(this, params);
695
+ }
696
+ }
697
+ certification_request.__decorate([
698
+ certification_request.AsnProp({ type: Iso4217CurrencyCode })
699
+ ], MonetaryValue.prototype, "currency", void 0);
700
+ certification_request.__decorate([
701
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.Integer })
702
+ ], MonetaryValue.prototype, "amount", void 0);
703
+ certification_request.__decorate([
704
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.Integer })
705
+ ], MonetaryValue.prototype, "exponent", void 0);
706
+ let QcEuLimitValue = class QcEuLimitValue extends MonetaryValue {
707
+ };
708
+ QcEuLimitValue = certification_request.__decorate([
709
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Sequence })
710
+ ], QcEuLimitValue);
711
+ let QcEuRetentionPeriod = class QcEuRetentionPeriod {
712
+ constructor(value = 0) {
713
+ this.value = value;
714
+ }
715
+ };
716
+ certification_request.__decorate([
717
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.Integer })
718
+ ], QcEuRetentionPeriod.prototype, "value", void 0);
719
+ QcEuRetentionPeriod = certification_request.__decorate([
720
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Choice })
721
+ ], QcEuRetentionPeriod);
722
+ let PdsLocation = class PdsLocation {
723
+ constructor(params = {}) {
724
+ this.url = "";
725
+ this.language = "";
726
+ Object.assign(this, params);
727
+ }
728
+ };
729
+ certification_request.__decorate([
730
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.IA5String })
731
+ ], PdsLocation.prototype, "url", void 0);
732
+ certification_request.__decorate([
733
+ certification_request.AsnProp({ type: certification_request.AsnPropTypes.PrintableString })
734
+ ], PdsLocation.prototype, "language", void 0);
735
+ PdsLocation = certification_request.__decorate([
736
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Sequence })
737
+ ], PdsLocation);
738
+ let PdsLocations = PdsLocations_1 = class PdsLocations extends certification_request.AsnArray {
739
+ constructor(items) {
740
+ super(items);
741
+ Object.setPrototypeOf(this, PdsLocations_1.prototype);
742
+ }
743
+ };
744
+ PdsLocations = PdsLocations_1 = certification_request.__decorate([
745
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Sequence, itemType: PdsLocation })
746
+ ], PdsLocations);
747
+ let QcEuPDS = QcEuPDS_1 = class QcEuPDS extends PdsLocations {
748
+ constructor(items) {
749
+ super(items);
750
+ Object.setPrototypeOf(this, QcEuPDS_1.prototype);
751
+ }
752
+ };
753
+ QcEuPDS = QcEuPDS_1 = certification_request.__decorate([
754
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Sequence, itemType: PdsLocation })
755
+ ], QcEuPDS);
756
+ let QcType = QcType_1 = class QcType extends certification_request.AsnArray {
757
+ constructor(items) {
758
+ super(items);
759
+ Object.setPrototypeOf(this, QcType_1.prototype);
760
+ }
761
+ };
762
+ QcType = QcType_1 = certification_request.__decorate([
763
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Sequence, itemType: certification_request.AsnPropTypes.ObjectIdentifier })
764
+ ], QcType);
765
+ let QcCClegislation = QcCClegislation_1 = class QcCClegislation extends certification_request.AsnArray {
766
+ constructor(items) {
767
+ super(items);
768
+ Object.setPrototypeOf(this, QcCClegislation_1.prototype);
769
+ }
770
+ };
771
+ QcCClegislation = QcCClegislation_1 = certification_request.__decorate([
772
+ certification_request.AsnType({ type: certification_request.AsnTypeTypes.Sequence, itemType: certification_request.AsnPropTypes.PrintableString })
773
+ ], QcCClegislation);
774
+ const id_etsi_qcs = "0.4.0.1862.1";
775
+ const id_etsi_qcs_qcRetentionPeriod = `${id_etsi_qcs}.3`;
776
+ const id_etsi_qcs_qcPDS = `${id_etsi_qcs}.5`;
777
+ const id_etsi_qcs_qcType = `${id_etsi_qcs}.6`;
778
+
663
779
  /**
664
780
  * @license
665
781
  * Copyright (c) Peculiar Ventures, LLC.
@@ -669,11 +785,39 @@ const CaVersionExtension = (props) => {
669
785
  */
670
786
  const QCStatementsExtension = (props) => {
671
787
  const { extension } = props;
672
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((statement, arrayIndex) => ([
673
- index.h(RowValue, { name: `Statement #${arrayIndex + 1}`, value: "" }),
674
- index.h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
675
- index.h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? download.build.Convert.ToHex(statement.statementInfo) : null, monospace: true }),
676
- ]))));
788
+ function renderStatementInfo(statementId, statementInfo) {
789
+ if (!statementInfo.byteLength) {
790
+ return null;
791
+ }
792
+ if (statementId === certification_request.id_qcs_pkixQCSyntax_v2) {
793
+ const semanticsInformation = certification_request.AsnParser.parse(statementInfo, certification_request.SemanticsInformation);
794
+ return (index.h(RowValue, { name: "Semantics Identifier", value: getStringByOID(semanticsInformation.semanticsIdentifier) }));
795
+ }
796
+ if (statementId === id_etsi_qcs_qcType) {
797
+ const qcTypes = certification_request.AsnParser.parse(statementInfo, QcType);
798
+ return (index.h(RowValue, { name: "QC Types", value: qcTypes.map((type) => getStringByOID(type)).join(', ') }));
799
+ }
800
+ if (statementId === id_etsi_qcs_qcRetentionPeriod) {
801
+ const retentionPeriod = certification_request.AsnParser.parse(statementInfo, QcEuRetentionPeriod);
802
+ return (index.h(RowValue, { name: "Retention Period", value: `${retentionPeriod.value} years` }));
803
+ }
804
+ if (statementId === id_etsi_qcs_qcPDS) {
805
+ const pdsLocations = certification_request.AsnParser.parse(statementInfo, PdsLocations);
806
+ return ([
807
+ index.h(RowValue, { name: "PDS Locations:", value: "" }),
808
+ pdsLocations.map((location) => (index.h(TableRowTable, null,
809
+ index.h(RowValue, { name: "URL", value: location.url }),
810
+ index.h(RowValue, { name: "Language", value: location.language })))),
811
+ ]);
812
+ }
813
+ return (index.h(RowValue, { name: "Info", value: download.build.Convert.ToHex(statementInfo), monospace: true }));
814
+ }
815
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
816
+ index.h(RowValue, { name: "Statements:", value: "" }),
817
+ extension.value.map((statement) => (index.h(TableRowTable, null,
818
+ index.h(RowValue, { name: "Statement ID", value: getStringByOID(statement.statementId) }),
819
+ renderStatementInfo(statement.statementId, statement.statementInfo)))),
820
+ ])));
677
821
  };
678
822
 
679
823
  /**
@@ -789,11 +933,12 @@ function getAttributeValue(attribute) {
789
933
  */
790
934
  const SubjectDirectoryAttributesExtension = (props) => {
791
935
  const { extension } = props;
792
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((attribute, arrayIndex) => ([
793
- index.h(RowValue, { name: `Attribute #${arrayIndex + 1}`, value: "" }),
794
- index.h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }),
795
- index.h(RowValue, { name: "Value", value: getAttributeValue(attribute) }),
796
- ]))));
936
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
937
+ index.h(RowValue, { name: "Attributes:", value: "" }),
938
+ extension.value.map((attribute) => (index.h(TableRowTable, null,
939
+ index.h(RowValue, { name: "Type", value: getStringByOID(attribute.type) }),
940
+ index.h(RowValue, { name: "Value", value: getAttributeValue(attribute) })))),
941
+ ])));
797
942
  };
798
943
 
799
944
  /**
@@ -846,14 +991,15 @@ const EntrustVersionInfoExtension = (props) => {
846
991
  */
847
992
  const BiometricSyntaxExtension = (props) => {
848
993
  const { extension } = props;
849
- return (index.h(BasicExtension, { extension: extension }, extension.value.map((data, arrayIndex) => ([
850
- index.h(RowValue, { name: `Biometric #${arrayIndex + 1}`, value: "" }),
851
- index.h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
852
- index.h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
853
- index.h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
854
- index.h(RowValue, { name: "Hash", value: download.build.Convert.ToHex(data.biometricDataHash.buffer), monospace: true }),
855
- index.h(RowValue, { name: "Source Uri", value: data.sourceDataUri }),
856
- ]))));
994
+ return (index.h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
995
+ index.h(RowValue, { name: "Biometrics:", value: "" }),
996
+ extension.value.map((data) => (index.h(TableRowTable, null,
997
+ index.h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
998
+ index.h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
999
+ index.h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
1000
+ index.h(RowValue, { name: "Hash", value: download.build.Convert.ToHex(data.biometricDataHash.buffer), monospace: true }),
1001
+ index.h(RowValue, { name: "Source Uri", value: data.sourceDataUri })))),
1002
+ ])));
857
1003
  };
858
1004
 
859
1005
  /**
@@ -6,11 +6,11 @@
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-00bbfbc5.js');
9
+ const certification_request = require('./certification_request-6eb7ef37.js');
10
10
  const download = require('./download-a97f4cb2.js');
11
11
  const l10n = require('./l10n-17c96aba.js');
12
- const crl = require('./crl-de4e196b.js');
13
- const miscellaneous = require('./miscellaneous-30c4aded.js');
12
+ const crl = require('./crl-75106e2e.js');
13
+ const miscellaneous = require('./miscellaneous-0eade914.js');
14
14
 
15
15
  /**
16
16
  * @license
@@ -6,11 +6,11 @@
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-00bbfbc5.js');
9
+ const certification_request = require('./certification_request-6eb7ef37.js');
10
10
  require('./l10n-17c96aba.js');
11
11
  require('./download-a97f4cb2.js');
12
- const x509_certificate = require('./x509_certificate-2af9b990.js');
13
- const crl = require('./crl-de4e196b.js');
12
+ const x509_certificate = require('./x509_certificate-9e7652cf.js');
13
+ const crl = require('./crl-75106e2e.js');
14
14
 
15
15
  /**
16
16
  * @license
@@ -6,11 +6,11 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-064e95c7.js');
9
- const x509_certificate = require('./x509_certificate-2af9b990.js');
10
- require('./certification_request-00bbfbc5.js');
9
+ const x509_certificate = require('./x509_certificate-9e7652cf.js');
10
+ require('./certification_request-6eb7ef37.js');
11
11
  require('./download-a97f4cb2.js');
12
12
  require('./l10n-17c96aba.js');
13
- const miscellaneous = require('./miscellaneous-30c4aded.js');
13
+ const miscellaneous = require('./miscellaneous-0eade914.js');
14
14
 
15
15
  const certificateViewerCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{display:block;width:100%;word-wrap:break-word;position:relative;min-width:280px;min-height:300px;background:white;background:rgba(var(--pv-color-light-rgb), 1)}th,td{border:none}table{width:100%;margin-bottom:30px;border-spacing:0;border-collapse:collapse}table table{margin-bottom:0}table .title td{border-color:rgba(209, 213, 217, 0.5);border-color:rgba(var(--pv-color-grey_3-rgb), 0.5);padding-top:60px;padding-bottom:15px;border-bottom-width:1px;border-bottom-style:solid}table td:first-child{padding-left:30px;width:130px;padding-right:10px}table td:last-child{padding-right:30px;width:calc(100% - 130px)}table td{vertical-align:top;padding-top:5px;padding-bottom:5px}table td.vertical_align_middle{vertical-align:middle}table .title:first-child td{padding-top:15px}table .title+tr td{padding-top:15px}table td.monospace{max-width:0}table .divider{padding-top:15px;padding-bottom:15px}.divider .bg_fill{background-color:rgba(209, 213, 217, 0.5);background-color:rgba(var(--pv-color-grey_3-rgb), 0.5)}table tr:last-child .divider{padding-top:0;opacity:0}.divider span{display:block;height:1px}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.interaction_text{padding:15px 0;width:300px;margin:auto;text-align:center}@media (max-width: 900px){table,tr,td{display:block}table td:last-child,table td:first-child{padding-right:15px;padding-left:15px;width:100%}table .title+tr td{padding-top:5px}table .title+tr td:first-child{padding-top:15px}table td.monospace{width:100%;max-width:none}}:host([data-view=mobile]) table,:host([data-view=mobile]) tr,:host([data-view=mobile]) td{display:block}:host([data-view=mobile]) table td:last-child,:host([data-view=mobile]) table td:first-child{padding-right:15px;padding-left:15px;width:100%}:host([data-view=mobile]) table .title+tr td{padding-top:5px}:host([data-view=mobile]) table .title+tr td:first-child{padding-top:15px}:host([data-view=mobile]) table td.monospace{width:100%;max-width:none}";
16
16
 
@@ -6,8 +6,8 @@
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
8
  const index = require('./index-064e95c7.js');
9
- const x509_certificate = require('./x509_certificate-2af9b990.js');
10
- const certification_request = require('./certification_request-00bbfbc5.js');
9
+ const x509_certificate = require('./x509_certificate-9e7652cf.js');
10
+ const certification_request = require('./certification_request-6eb7ef37.js');
11
11
  require('./download-a97f4cb2.js');
12
12
  const l10n = require('./l10n-17c96aba.js');
13
13
 
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const certification_request = require('./certification_request-00bbfbc5.js');
6
+ const certification_request = require('./certification_request-6eb7ef37.js');
7
7
  const download = require('./download-a97f4cb2.js');
8
8
  const l10n = require('./l10n-17c96aba.js');
9
9
 
@@ -11,16 +11,17 @@
11
11
  import { h } from '@stencil/core';
12
12
  import { Convert } from 'pvtsutils';
13
13
  import { getStringByOID } from '../../../utils';
14
- import { RowValue } from '../row';
14
+ import { RowValue, TableRowTable } from '../row';
15
15
  import { BasicExtension } from './basic_extension';
16
16
  export const BiometricSyntaxExtension = (props) => {
17
17
  const { extension } = props;
18
- return (h(BasicExtension, { extension: extension }, extension.value.map((data, arrayIndex) => ([
19
- h(RowValue, { name: `Biometric #${arrayIndex + 1}`, value: "" }),
20
- h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
21
- h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
22
- h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
23
- h(RowValue, { name: "Hash", value: Convert.ToHex(data.biometricDataHash.buffer), monospace: true }),
24
- h(RowValue, { name: "Source Uri", value: data.sourceDataUri }),
25
- ]))));
18
+ return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
19
+ h(RowValue, { name: "Biometrics:", value: "" }),
20
+ extension.value.map((data) => (h(TableRowTable, null,
21
+ h(RowValue, { name: "OID", value: getStringByOID(data.typeOfBiometricData.biometricDataOid) }),
22
+ h(RowValue, { name: "Type", value: data.typeOfBiometricData.predefinedBiometricType }),
23
+ h(RowValue, { name: "Algorithm", value: getStringByOID(data.hashAlgorithm.algorithm) }),
24
+ h(RowValue, { name: "Hash", value: Convert.ToHex(data.biometricDataHash.buffer), monospace: true }),
25
+ h(RowValue, { name: "Source Uri", value: data.sourceDataUri })))),
26
+ ])));
26
27
  };
@@ -12,32 +12,32 @@ import { h } from '@stencil/core';
12
12
  import { UserNotice, DisplayText } from '@peculiar/asn1-x509';
13
13
  import { AsnParser } from '@peculiar/asn1-schema';
14
14
  import { getStringByOID } from '../../../utils';
15
- import { RowValue } from '../row';
15
+ import { RowValue, TableRowTable } from '../row';
16
16
  import { BasicExtension } from './basic_extension';
17
17
  export const CertificatePoliciesExtension = (props) => {
18
18
  const { extension } = props;
19
- return (h(BasicExtension, { extension: extension }, extension.value.map((policy, arrayIndex) => {
20
- var _a;
21
- return ([
22
- h(RowValue, { name: `Policy #${arrayIndex + 1}`, value: "" }),
23
- h(RowValue, { name: "ID", value: getStringByOID(policy.policyIdentifier) }),
24
- (_a = policy.policyQualifiers) === null || _a === void 0 ? void 0 : _a.map((qualifierInfo, indexInfo) => {
25
- const data = [
26
- h(RowValue, { name: `Qualifier #${arrayIndex + 1}.${indexInfo + 1}`, value: "" }),
27
- h(RowValue, { name: "ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
28
- ];
29
- if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
30
- const value = AsnParser.parse(qualifierInfo.qualifier, DisplayText);
31
- data.push(h(RowValue, { name: "Value", value: value.toString() }));
32
- }
33
- if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
34
- const value = AsnParser.parse(qualifierInfo.qualifier, UserNotice);
35
- if (value.explicitText) {
36
- data.push(h(RowValue, { name: "Value", value: value.explicitText.toString() }));
19
+ return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
20
+ h(RowValue, { name: "Policies:", value: "" }),
21
+ extension.value.map((policy) => (h(TableRowTable, null,
22
+ h(RowValue, { name: "Policy ID", value: getStringByOID(policy.policyIdentifier) }),
23
+ policy.policyQualifiers && Boolean(policy.policyQualifiers.length) && ([
24
+ h(RowValue, { name: "Qualifiers:", value: "" }),
25
+ policy.policyQualifiers.map((qualifierInfo) => {
26
+ const data = [
27
+ h(RowValue, { name: "Qualifier ID", value: getStringByOID(qualifierInfo.policyQualifierId) }),
28
+ ];
29
+ if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.1') {
30
+ const value = AsnParser.parse(qualifierInfo.qualifier, DisplayText);
31
+ data.push(h(RowValue, { name: "Value", value: value.toString() }));
37
32
  }
38
- }
39
- return data;
40
- }),
41
- ]);
42
- })));
33
+ if (qualifierInfo.policyQualifierId === '1.3.6.1.5.5.7.2.2') {
34
+ const value = AsnParser.parse(qualifierInfo.qualifier, UserNotice);
35
+ if (value.explicitText) {
36
+ data.push(h(RowValue, { name: "Value", value: value.explicitText.toString() }));
37
+ }
38
+ }
39
+ return (h(TableRowTable, null, data));
40
+ }),
41
+ ])))),
42
+ ])));
43
43
  };
@@ -9,19 +9,20 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
- import { RowValue } from '../row';
13
12
  import logs from '../../../constants/logs';
14
13
  import { dateShort } from '../../../utils';
14
+ import { RowValue, TableRowTable } from '../row';
15
15
  import { BasicExtension } from './basic_extension';
16
16
  export const CertificateTransparencyExtension = (props) => {
17
17
  const { extension } = props;
18
- return (h(BasicExtension, { extension: extension }, extension.value.toJSON().map((signedCertificateTimestamp, arrayIndex) => ([
19
- h(RowValue, { name: `SCT #${arrayIndex + 1}`, value: "" }),
20
- h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
21
- h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
22
- h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
23
- h(RowValue, { name: "Timestamp", value: dateShort(signedCertificateTimestamp.timestamp) }),
24
- h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }),
25
- h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true }),
26
- ]))));
18
+ return (h(BasicExtension, { extension: extension }, Boolean(extension.value.items.length) && ([
19
+ h(RowValue, { name: "Signed Certificate Timestamps:", value: "" }),
20
+ extension.value.toJSON().map((signedCertificateTimestamp) => (h(TableRowTable, null,
21
+ h(RowValue, { name: "Version", value: signedCertificateTimestamp.version + 1 }),
22
+ h(RowValue, { name: "Log Operator", value: logs[signedCertificateTimestamp.logId] || signedCertificateTimestamp.logId }),
23
+ h(RowValue, { name: "Log Key ID", value: signedCertificateTimestamp.logId, monospace: true }),
24
+ h(RowValue, { name: "Timestamp", value: dateShort(signedCertificateTimestamp.timestamp) }),
25
+ h(RowValue, { name: "Signature Algorithm", value: `${signedCertificateTimestamp.hashAlgorithm} ${signedCertificateTimestamp.signatureAlgorithm}`.toUpperCase() }),
26
+ h(RowValue, { name: "Signature", value: signedCertificateTimestamp.signature, monospace: true })))),
27
+ ])));
27
28
  };
@@ -10,9 +10,13 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { getStringByOID } from '../../../utils';
13
- import { RowValue } from '../row';
13
+ import { RowValue, TableRowTable } from '../row';
14
14
  import { BasicExtension } from './basic_extension';
15
15
  export const ExtendedKeyUsageExtension = (props) => {
16
16
  const { extension } = props;
17
- return (h(BasicExtension, { extension: extension }, extension.value.map((usage, arrayIndex) => (h(RowValue, { name: `Purpose #${arrayIndex + 1}`, value: getStringByOID(usage) })))));
17
+ return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
18
+ h(RowValue, { name: "Purposes:", value: "" }),
19
+ extension.value.map((usage) => (h(TableRowTable, null,
20
+ h(RowValue, { name: "Purpose", value: getStringByOID(usage) })))),
21
+ ])));
18
22
  };
@@ -10,14 +10,15 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { getStringByOID } from '../../../utils';
13
- import { RowValue } from '../row';
13
+ import { RowValue, TableRowTable } from '../row';
14
14
  import { BasicExtension } from './basic_extension';
15
15
  import { GeneralNamePart } from './general_name_part';
16
16
  export const InfoAccessSyntaxExtension = (props) => {
17
17
  const { extension } = props;
18
- return (h(BasicExtension, { extension: extension }, extension.value.map((description, arrayIndex) => ([
19
- h(RowValue, { name: `Description #${arrayIndex + 1}`, value: "" }),
20
- h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
21
- h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props)),
22
- ]))));
18
+ return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
19
+ h(RowValue, { name: "Descriptions:", value: "" }),
20
+ extension.value.map((description) => (h(TableRowTable, null,
21
+ h(RowValue, { name: "Method", value: getStringByOID(description.accessMethod) }),
22
+ h(GeneralNamePart, Object.assign({ generalName: description.accessLocation }, props))))),
23
+ ])));
23
24
  };
@@ -9,15 +9,46 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
+ import { id_qcs_pkixQCSyntax_v2, SemanticsInformation, } from '@peculiar/asn1-x509-qualified';
13
+ import { id_etsi_qcs_qcType, QcType, id_etsi_qcs_qcPDS, PdsLocations, id_etsi_qcs_qcRetentionPeriod, QcEuRetentionPeriod, } from '@peculiar/asn1-x509-qualified-etsi';
14
+ import { AsnParser } from '@peculiar/asn1-schema';
12
15
  import { Convert } from 'pvtsutils';
13
16
  import { getStringByOID } from '../../../utils';
14
- import { RowValue } from '../row';
17
+ import { RowValue, TableRowTable } from '../row';
15
18
  import { BasicExtension } from './basic_extension';
16
19
  export const QCStatementsExtension = (props) => {
17
20
  const { extension } = props;
18
- return (h(BasicExtension, { extension: extension }, extension.value.map((statement, arrayIndex) => ([
19
- h(RowValue, { name: `Statement #${arrayIndex + 1}`, value: "" }),
20
- h(RowValue, { name: "ID", value: getStringByOID(statement.statementId) }),
21
- h(RowValue, { name: "Info", value: statement.statementInfo.byteLength ? Convert.ToHex(statement.statementInfo) : null, monospace: true }),
22
- ]))));
21
+ function renderStatementInfo(statementId, statementInfo) {
22
+ if (!statementInfo.byteLength) {
23
+ return null;
24
+ }
25
+ if (statementId === id_qcs_pkixQCSyntax_v2) {
26
+ const semanticsInformation = AsnParser.parse(statementInfo, SemanticsInformation);
27
+ return (h(RowValue, { name: "Semantics Identifier", value: getStringByOID(semanticsInformation.semanticsIdentifier) }));
28
+ }
29
+ if (statementId === id_etsi_qcs_qcType) {
30
+ const qcTypes = AsnParser.parse(statementInfo, QcType);
31
+ return (h(RowValue, { name: "QC Types", value: qcTypes.map((type) => getStringByOID(type)).join(', ') }));
32
+ }
33
+ if (statementId === id_etsi_qcs_qcRetentionPeriod) {
34
+ const retentionPeriod = AsnParser.parse(statementInfo, QcEuRetentionPeriod);
35
+ return (h(RowValue, { name: "Retention Period", value: `${retentionPeriod.value} years` }));
36
+ }
37
+ if (statementId === id_etsi_qcs_qcPDS) {
38
+ const pdsLocations = AsnParser.parse(statementInfo, PdsLocations);
39
+ return ([
40
+ h(RowValue, { name: "PDS Locations:", value: "" }),
41
+ pdsLocations.map((location) => (h(TableRowTable, null,
42
+ h(RowValue, { name: "URL", value: location.url }),
43
+ h(RowValue, { name: "Language", value: location.language })))),
44
+ ]);
45
+ }
46
+ return (h(RowValue, { name: "Info", value: Convert.ToHex(statementInfo), monospace: true }));
47
+ }
48
+ return (h(BasicExtension, { extension: extension }, Boolean(extension.value.length) && ([
49
+ h(RowValue, { name: "Statements:", value: "" }),
50
+ extension.value.map((statement) => (h(TableRowTable, null,
51
+ h(RowValue, { name: "Statement ID", value: getStringByOID(statement.statementId) }),
52
+ renderStatementInfo(statement.statementId, statement.statementInfo)))),
53
+ ])));
23
54
  };