@peculiar/certificates-viewer 3.5.0 → 3.7.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 (191) hide show
  1. package/dist/cjs/{certification_request-ea440617.js → certification_request-00bbfbc5.js} +6714 -6604
  2. package/dist/cjs/{crl-fd60d923.js → crl-de4e196b.js} +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{public_key-14290c77.js → miscellaneous-30c4aded.js} +185 -169
  5. package/dist/cjs/peculiar-attribute-certificate-viewer_3.cjs.entry.js +87 -90
  6. package/dist/cjs/{peculiar-certificate-summary_3.cjs.entry.js → peculiar-button-split_4.cjs.entry.js} +35 -0
  7. package/dist/cjs/peculiar-button.cjs.entry.js +40 -0
  8. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +3 -3
  9. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +5 -5
  10. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +2 -2
  11. package/dist/cjs/peculiar-link.cjs.entry.js +29 -0
  12. package/dist/cjs/peculiar-text-hider.cjs.entry.js +33 -0
  13. package/dist/cjs/peculiar-typography.cjs.entry.js +38 -0
  14. package/dist/cjs/peculiar.cjs.js +1 -1
  15. package/dist/cjs/{x509_certificate-262bac06.js → x509_certificate-2af9b990.js} +18 -4
  16. package/dist/collection/components/attribute-certificate-viewer/attribute-certificate-viewer.js +1 -8
  17. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/basic_attribute.js +1 -1
  18. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/basic_extension.js +1 -2
  19. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/biometric_syntax_extension.js +1 -1
  20. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/certificate_policies_extension.js +1 -1
  21. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/extended_key_usage_extension.js +1 -1
  22. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/general_name_part.js +1 -1
  23. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/info_access_syntax_extension.js +1 -1
  24. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/logotype_extension.js +1 -1
  25. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/policy_mappings_extension.js +1 -1
  26. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/qc_statements_extension.js +1 -1
  27. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/subject_directory_attributes_extension.js +1 -1
  28. package/dist/collection/components/{attribute-certificate-viewer → certificate-details-parts}/holder.js +3 -4
  29. package/dist/collection/components/certificate-details-parts/index.js +15 -0
  30. package/dist/collection/components/{attribute-certificate-viewer → certificate-details-parts}/issuer.js +2 -2
  31. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/public_key.js +14 -9
  32. package/dist/collection/components/{crl-viewer → certificate-details-parts}/revoked_certificates.js +3 -7
  33. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/row.js +3 -0
  34. package/dist/collection/components/certificate-details-parts/signature.js +31 -0
  35. package/dist/collection/components/certificate-viewer/certificate-viewer.css +4 -0
  36. package/dist/collection/components/certificate-viewer/certificate-viewer.js +1 -8
  37. package/dist/collection/components/crl-viewer/crl-viewer.js +1 -7
  38. package/dist/collection/components/csr-viewer/csr-viewer.js +1 -8
  39. package/dist/collection/constants/oids.js +10 -0
  40. package/dist/collection/crypto/x509_certificate.js +18 -3
  41. package/dist/collection/{components/certificate-viewer → utils}/get_string_by_oid.js +1 -1
  42. package/dist/collection/utils/index.js +1 -0
  43. package/dist/esm/{certification_request-0ecd0af1.js → certification_request-8cc9d070.js} +6713 -6605
  44. package/dist/esm/{crl-c09357a9.js → crl-f43a95b7.js} +1 -1
  45. package/dist/esm/loader.js +1 -1
  46. package/dist/esm/{public_key-e6d12f27.js → miscellaneous-b74d9eae.js} +185 -170
  47. package/dist/esm/peculiar-attribute-certificate-viewer_3.entry.js +54 -57
  48. package/dist/esm/{peculiar-certificate-summary_3.entry.js → peculiar-button-split_4.entry.js} +35 -1
  49. package/dist/esm/peculiar-button.entry.js +36 -0
  50. package/dist/esm/peculiar-certificate-decoder.entry.js +3 -3
  51. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
  52. package/dist/esm/peculiar-certificates-viewer.entry.js +2 -2
  53. package/dist/esm/peculiar-link.entry.js +25 -0
  54. package/dist/esm/peculiar-text-hider.entry.js +29 -0
  55. package/dist/esm/peculiar-typography.entry.js +34 -0
  56. package/dist/esm/peculiar.js +1 -1
  57. package/dist/esm/{x509_certificate-59d7a03c.js → x509_certificate-0fdd28aa.js} +18 -4
  58. package/dist/peculiar/p-05337212.entry.js +18 -0
  59. package/dist/peculiar/p-0868020d.entry.js +4 -0
  60. package/dist/peculiar/{p-1d6d0160.entry.js → p-167fd2db.entry.js} +1 -1
  61. package/dist/peculiar/p-45336b4f.js +69 -0
  62. package/dist/peculiar/{p-e7d81a43.entry.js → p-4e9318fb.entry.js} +1 -1
  63. package/dist/peculiar/p-57b89412.entry.js +4 -0
  64. package/dist/peculiar/p-610b85e3.entry.js +4 -0
  65. package/dist/peculiar/p-6d37c8b5.entry.js +4 -0
  66. package/dist/peculiar/p-893659f4.entry.js +4 -0
  67. package/dist/peculiar/p-918aeee4.entry.js +4 -0
  68. package/dist/peculiar/p-c72f8e8f.js +79 -0
  69. package/dist/peculiar/{p-7321a8d6.js → p-ea9a6317.js} +3 -3
  70. package/dist/peculiar/p-ec8787ed.js +11 -0
  71. package/dist/peculiar/peculiar.esm.js +1 -1
  72. package/dist/types/components/certificate-details-parts/index.d.ts +12 -0
  73. package/dist/types/components/{certificate-viewer → certificate-details-parts}/row.d.ts +1 -0
  74. package/dist/types/constants/oids.d.ts +8 -0
  75. package/dist/types/crypto/x509_certificate.d.ts +6 -1
  76. package/dist/types/utils/index.d.ts +1 -0
  77. package/package.json +20 -19
  78. package/dist/cjs/peculiar-button_5.cjs.entry.js +0 -148
  79. package/dist/collection/components/certificate-viewer/signature.js +0 -26
  80. package/dist/esm/peculiar-button_5.entry.js +0 -140
  81. package/dist/peculiar/p-1b11aa24.js +0 -63
  82. package/dist/peculiar/p-37c38f22.entry.js +0 -4
  83. package/dist/peculiar/p-3a4556ef.js +0 -87
  84. package/dist/peculiar/p-7a31bffb.entry.js +0 -26
  85. package/dist/peculiar/p-870c3592.entry.js +0 -4
  86. package/dist/peculiar/p-c9f01b83.js +0 -11
  87. package/dist/peculiar/p-dafae164.entry.js +0 -4
  88. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/activity_description_attribute.js +1 -1
  89. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/as_string_attribute.js +1 -1
  90. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/challenge_password_attribute.js +1 -1
  91. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/index.js +0 -0
  92. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/insurance_value_attribute.js +1 -1
  93. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/name_attribute.js +0 -0
  94. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/name_part.js +0 -0
  95. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/type_relationship_attribute.js +1 -1
  96. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/unstructured_name_attribute.js +1 -1
  97. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/valuation_ranking_attribute.js +1 -1
  98. package/dist/collection/components/{certificate-viewer → certificate-details-parts}/attributes/web_gdpr_attribute.js +1 -1
  99. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/basic_information.js +0 -0
  100. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/archive_rev_info_extension.js +0 -0
  101. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/as_string_extension.js +0 -0
  102. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/attribute_value.js +0 -0
  103. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/authority_key_identifier_extension.js +0 -0
  104. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/basic_constraints_extension.js +0 -0
  105. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/ca_version_extension.js +0 -0
  106. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/certificate_template_extension.js +0 -0
  107. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/certificate_transparency_extension.js +0 -0
  108. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/crl_distribution_points_extension.js +0 -0
  109. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/crl_number_extension.js +0 -0
  110. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/crl_reason_extension.js +0 -0
  111. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/enroll_cert_type_extension.js +0 -0
  112. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/entrust_version_info_extension.js +0 -0
  113. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/index.js +0 -0
  114. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/issuing_distribution_point_extension.js +0 -0
  115. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/key_usage_extension.js +0 -0
  116. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/lei_extension.js +0 -0
  117. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/lei_role_extennsion.js +0 -0
  118. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/name_constraints_extension.js +0 -0
  119. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/netscape_cert_type_extension.js +0 -0
  120. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/netscape_comment_extension.js +0 -0
  121. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/policy_constraints_extension.js +0 -0
  122. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/private_key_usage_period_extension.js +0 -0
  123. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/subject_alternative_name_extension.js +0 -0
  124. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/subject_key_identifier_extension.js +0 -0
  125. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/timestamp_extension.js +0 -0
  126. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/extensions/tn_auth_list_extension.js +0 -0
  127. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/issuer_name.js +0 -0
  128. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/miscellaneous.js +0 -0
  129. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/subject_name.js +0 -0
  130. /package/dist/collection/components/{certificate-viewer → certificate-details-parts}/thumbprints.js +0 -0
  131. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/activity_description_attribute.d.ts +0 -0
  132. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/as_string_attribute.d.ts +0 -0
  133. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/basic_attribute.d.ts +0 -0
  134. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/challenge_password_attribute.d.ts +0 -0
  135. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/index.d.ts +0 -0
  136. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/insurance_value_attribute.d.ts +0 -0
  137. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/name_attribute.d.ts +0 -0
  138. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/name_part.d.ts +0 -0
  139. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/type_relationship_attribute.d.ts +0 -0
  140. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/unstructured_name_attribute.d.ts +0 -0
  141. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/valuation_ranking_attribute.d.ts +0 -0
  142. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/attributes/web_gdpr_attribute.d.ts +0 -0
  143. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/basic_information.d.ts +0 -0
  144. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/archive_rev_info_extension.d.ts +0 -0
  145. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/as_string_extension.d.ts +0 -0
  146. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/attribute_value.d.ts +0 -0
  147. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/authority_key_identifier_extension.d.ts +0 -0
  148. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/basic_constraints_extension.d.ts +0 -0
  149. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/basic_extension.d.ts +0 -0
  150. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/biometric_syntax_extension.d.ts +0 -0
  151. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/ca_version_extension.d.ts +0 -0
  152. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/certificate_policies_extension.d.ts +0 -0
  153. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/certificate_template_extension.d.ts +0 -0
  154. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/certificate_transparency_extension.d.ts +0 -0
  155. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/crl_distribution_points_extension.d.ts +0 -0
  156. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/crl_number_extension.d.ts +0 -0
  157. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/crl_reason_extension.d.ts +0 -0
  158. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/enroll_cert_type_extension.d.ts +0 -0
  159. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/entrust_version_info_extension.d.ts +0 -0
  160. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/extended_key_usage_extension.d.ts +0 -0
  161. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/general_name_part.d.ts +0 -0
  162. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/index.d.ts +0 -0
  163. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/info_access_syntax_extension.d.ts +0 -0
  164. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/issuing_distribution_point_extension.d.ts +0 -0
  165. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/key_usage_extension.d.ts +0 -0
  166. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/lei_extension.d.ts +0 -0
  167. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/lei_role_extennsion.d.ts +0 -0
  168. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/logotype_extension.d.ts +0 -0
  169. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/name_constraints_extension.d.ts +0 -0
  170. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/netscape_cert_type_extension.d.ts +0 -0
  171. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/netscape_comment_extension.d.ts +0 -0
  172. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/policy_constraints_extension.d.ts +0 -0
  173. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/policy_mappings_extension.d.ts +0 -0
  174. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/private_key_usage_period_extension.d.ts +0 -0
  175. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/qc_statements_extension.d.ts +0 -0
  176. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/subject_alternative_name_extension.d.ts +0 -0
  177. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/subject_directory_attributes_extension.d.ts +0 -0
  178. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/subject_key_identifier_extension.d.ts +0 -0
  179. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/timestamp_extension.d.ts +0 -0
  180. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/extensions/tn_auth_list_extension.d.ts +0 -0
  181. /package/dist/types/components/{attribute-certificate-viewer → certificate-details-parts}/holder.d.ts +0 -0
  182. /package/dist/types/components/{attribute-certificate-viewer → certificate-details-parts}/issuer.d.ts +0 -0
  183. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/issuer_name.d.ts +0 -0
  184. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/miscellaneous.d.ts +0 -0
  185. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/public_key.d.ts +0 -0
  186. /package/dist/types/components/{crl-viewer → certificate-details-parts}/revoked_certificates.d.ts +0 -0
  187. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/signature.d.ts +0 -0
  188. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/subject_name.d.ts +0 -0
  189. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/thumbprints.d.ts +0 -0
  190. /package/dist/types/components/{certificate-viewer → certificate-details-parts}/types.d.ts +0 -0
  191. /package/dist/types/{components/certificate-viewer → utils}/get_string_by_oid.d.ts +0 -0
@@ -0,0 +1,38 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ 'use strict';
5
+
6
+ Object.defineProperty(exports, '__esModule', { value: true });
7
+
8
+ const index = require('./index-064e95c7.js');
9
+
10
+ const typographyCss = ":host{-webkit-box-sizing:border-box;box-sizing:border-box}:host *,:host *:before,:host *:after{-webkit-box-sizing:inherit;box-sizing:inherit}:host{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;-ms-touch-action:manipulation;touch-action:manipulation;-webkit-user-drag:none;-ms-content-zooming:none;word-wrap:break-word;-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;display:block}.typography{font-family:\"Open Sans\", \"Arial\", sans-serif;font-family:var(--pv-font-family);letter-spacing:0.03em;letter-spacing:var(--pv-letter-spacing-normal);line-height:1.4;line-height:var(--pv-line-height-normal);font-weight:400;margin:0;padding:0;display:block}.typography_type_h4{font-size:17px;font-size:var(--pv-font-size-h4);font-weight:600}.typography_type_h6{font-size:15px;font-size:var(--pv-font-size-h6);font-weight:600}.typography_type_h7{font-size:14px;font-size:var(--pv-font-size-h7);font-weight:600}.typography_type_b1{font-size:15px;font-size:var(--pv-font-size-b1)}.typography_type_b3{font-size:13px;font-size:var(--pv-font-size-b3)}.typography_color_dark{color:#2a3134;color:rgba(var(--pv-color-dark-rgb), 1)}.typography_color_light{color:white;color:rgba(var(--pv-color-light-rgb), 1)}.typography_color_grey_3{color:#d1d5d9;color:rgba(var(--pv-color-grey_3-rgb), 1)}.typography_color_grey_5{color:#869196;color:rgba(var(--pv-color-grey_5-rgb), 1)}.typography_color_attention{color:#f7a831;color:rgba(var(--pv-color-attention-rgb), 1)}.typography_color_primary{color:#3584f7;color:rgba(var(--pv-color-primary-rgb), 1)}.typography_ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.typography_monospace{font-family:monospace}.typography_align_left{text-align:left}.typography_align_center{text-align:center}.typography_align_right{text-align:right}";
11
+
12
+ const PeculiarTypography = class {
13
+ constructor(hostRef) {
14
+ index.registerInstance(this, hostRef);
15
+ /**
16
+ * Typography type.
17
+ */
18
+ this.type = 'b3';
19
+ /**
20
+ * Component color from theme.
21
+ */
22
+ this.color = 'dark';
23
+ }
24
+ render() {
25
+ const TagType = this.type && this.type.includes('h') ? this.type : 'p';
26
+ return (index.h(TagType, { class: {
27
+ typography: true,
28
+ [`typography_type_${this.type || 'b3'}`]: true,
29
+ [`typography_color_${this.color || 'dark'}`]: true,
30
+ [`typography_align_${this.align}`]: !!this.align,
31
+ typography_ellipsis: this.ellipsis,
32
+ typography_monospace: this.monospace,
33
+ } }, index.h("slot", null)));
34
+ }
35
+ };
36
+ PeculiarTypography.style = typographyCss;
37
+
38
+ exports.peculiar_typography = PeculiarTypography;
@@ -71,5 +71,5 @@ const patchDynamicImport = (base, orgScriptElm) => {
71
71
  };
72
72
 
73
73
  patchBrowser().then(options => {
74
- return index.bootstrapLazy([["peculiar-button_5.cjs",[[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]}]]],["peculiar-certificate-viewer.cjs",[[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]}]]],["peculiar-certificate-decoder.cjs",[[1,"peculiar-certificate-decoder",{"certificateExample":[1,"certificate-example"],"defaultCertificate":[1,"default-certificate"],"certificateDecoded":[32]}]]],["peculiar-certificates-viewer.cjs",[[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]}]]],["peculiar-attribute-certificate-viewer_3.cjs",[[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-crl-viewer",{"certificate":[513],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"view":[513],"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]}]]],["peculiar-certificate-summary_3.cjs",[[1,"peculiar-certificate-summary",{"certificate":[16],"showIssuer":[4,"show-issuer"]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]]], options);
74
+ return index.bootstrapLazy([["peculiar-certificates-viewer.cjs",[[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]}]]],["peculiar-certificate-decoder.cjs",[[1,"peculiar-certificate-decoder",{"certificateExample":[1,"certificate-example"],"defaultCertificate":[1,"default-certificate"],"certificateDecoded":[32]}]]],["peculiar-text-hider.cjs",[[1,"peculiar-text-hider",{"opened":[1540]},[[0,"textExpand","textExpandHandler"]]]]],["peculiar-link.cjs",[[1,"peculiar-link",{"href":[513],"type":[513]}]]],["peculiar-typography.cjs",[[1,"peculiar-typography",{"type":[513],"color":[1],"align":[1],"ellipsis":[4],"monospace":[4]}]]],["peculiar-certificate-viewer.cjs",[[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]}]]],["peculiar-attribute-certificate-viewer_3.cjs",[[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-crl-viewer",{"certificate":[513],"download":[4],"authKeyIdParentLink":[513,"auth-key-id-parent-link"],"authKeyIdSiblingsLink":[513,"auth-key-id-siblings-link"],"issuerDnLink":[513,"issuer-dn-link"],"view":[513],"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]}]]],["peculiar-button.cjs",[[1,"peculiar-button",{"fill":[1],"disabled":[516],"href":[1],"target":[1],"onClick":[16]}]]],["peculiar-button-split_4.cjs",[[1,"peculiar-button-split",{"onClick":[16],"fill":[1],"actions":[16],"open":[32]}],[1,"peculiar-certificate-summary",{"certificate":[16],"showIssuer":[4,"show-issuer"]}],[1,"peculiar-circular-progress",{"size":[2],"width":[2]}],[1,"peculiar-highlight-words",{"search":[1]}]]]], options);
75
75
  });
@@ -3,7 +3,7 @@
3
3
  */
4
4
  'use strict';
5
5
 
6
- const certification_request = require('./certification_request-ea440617.js');
6
+ const certification_request = require('./certification_request-00bbfbc5.js');
7
7
  const download = require('./download-a97f4cb2.js');
8
8
  const l10n = require('./l10n-17c96aba.js');
9
9
 
@@ -45,8 +45,8 @@ class X509Certificate extends certification_request.AsnData {
45
45
  .map((e) => new certification_request.Extension(certification_request.AsnConvert.serialize(e)));
46
46
  }
47
47
  }
48
- get publicKey() {
49
- const { subjectPublicKey, algorithm } = this.asn.tbsCertificate.subjectPublicKeyInfo;
48
+ getPublicKeyInfo(publicKeyInfo) {
49
+ const { subjectPublicKey, algorithm } = publicKeyInfo;
50
50
  let params;
51
51
  if (algorithm.algorithm === certification_request.id_ecPublicKey && algorithm.parameters) {
52
52
  params = certification_request.AsnConvert.parse(algorithm.parameters, certification_request.ECParameters);
@@ -54,16 +54,30 @@ class X509Certificate extends certification_request.AsnData {
54
54
  if (algorithm.algorithm === certification_request.id_rsaEncryption) {
55
55
  params = certification_request.AsnConvert.parse(subjectPublicKey, certification_request.RSAPublicKey);
56
56
  }
57
- const spki = certification_request.AsnConvert.serialize(this.asn.tbsCertificate.subjectPublicKeyInfo);
57
+ if (algorithm.algorithm === certification_request.id_composite_key) {
58
+ params = certification_request.AsnConvert.parse(subjectPublicKey, certification_request.CompositePublicKey);
59
+ params = params.map((param) => this.getPublicKeyInfo(param));
60
+ }
61
+ const spki = certification_request.AsnConvert.serialize(publicKeyInfo);
58
62
  return {
59
63
  params,
60
64
  value: spki,
61
65
  algorithm: algorithm.algorithm,
62
66
  };
63
67
  }
68
+ get publicKey() {
69
+ return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);
70
+ }
64
71
  get signature() {
65
72
  const { signatureValue, signatureAlgorithm } = this.asn;
73
+ let params;
74
+ if (signatureAlgorithm.algorithm === certification_request.id_alg_composite) {
75
+ const compositeSignatureValues = certification_request.AsnConvert.parse(signatureValue, certification_request.CompositeSignatureValue);
76
+ const compositeParams = certification_request.AsnConvert.parse(signatureAlgorithm.parameters, certification_request.CompositeParams);
77
+ params = compositeParams.map((param, index) => (Object.assign(Object.assign({}, param), { value: compositeSignatureValues[index] })));
78
+ }
66
79
  return {
80
+ params,
67
81
  value: signatureValue,
68
82
  algorithm: signatureAlgorithm.algorithm,
69
83
  };
@@ -10,15 +10,8 @@
10
10
  */
11
11
  import { Component, Host, h, Prop, State, Watch, } from '@stencil/core';
12
12
  import { X509AttributeCertificate } from '../../crypto';
13
- import { Signature } from '../certificate-viewer/signature';
14
- import { Attributes } from '../certificate-viewer/attributes';
15
- import { Thumbprints } from '../certificate-viewer/thumbprints';
16
- import { Extensions } from '../certificate-viewer/extensions';
17
- import { BasicInformation } from '../certificate-viewer/basic_information';
18
- import { Miscellaneous } from '../certificate-viewer/miscellaneous';
19
13
  import { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';
20
- import { Issuer } from './issuer';
21
- import { Holder } from './holder';
14
+ import { BasicInformation, Signature, Thumbprints, Extensions, Miscellaneous, Attributes, Holder, Issuer, } from '../certificate-details-parts';
22
15
  export class AttributeCertificateViewer {
23
16
  constructor() {
24
17
  this.isDecodeInProcess = true;
@@ -9,7 +9,7 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
- import { getStringByOID } from '../get_string_by_oid';
12
+ import { getStringByOID } from '../../../utils';
13
13
  import { RowValue } from '../row';
14
14
  export const BasicAttribute = (props, children) => {
15
15
  const { attribute } = props;
@@ -9,9 +9,8 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
- import { getStringByOID } from '../get_string_by_oid';
12
+ import { l10n, getStringByOID } from '../../../utils';
13
13
  import { RowValue } from '../row';
14
- import { l10n } from '../../../utils';
15
14
  export const BasicExtension = (props, children) => {
16
15
  const { extension } = props;
17
16
  return ([
@@ -10,8 +10,8 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { Convert } from 'pvtsutils';
13
+ import { getStringByOID } from '../../../utils';
13
14
  import { RowValue } from '../row';
14
- import { getStringByOID } from '../get_string_by_oid';
15
15
  import { BasicExtension } from './basic_extension';
16
16
  export const BiometricSyntaxExtension = (props) => {
17
17
  const { extension } = props;
@@ -11,8 +11,8 @@
11
11
  import { h } from '@stencil/core';
12
12
  import { UserNotice, DisplayText } from '@peculiar/asn1-x509';
13
13
  import { AsnParser } from '@peculiar/asn1-schema';
14
+ import { getStringByOID } from '../../../utils';
14
15
  import { RowValue } from '../row';
15
- import { getStringByOID } from '../get_string_by_oid';
16
16
  import { BasicExtension } from './basic_extension';
17
17
  export const CertificatePoliciesExtension = (props) => {
18
18
  const { extension } = props;
@@ -9,8 +9,8 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
+ import { getStringByOID } from '../../../utils';
12
13
  import { RowValue } from '../row';
13
- import { getStringByOID } from '../get_string_by_oid';
14
14
  import { BasicExtension } from './basic_extension';
15
15
  export const ExtendedKeyUsageExtension = (props) => {
16
16
  const { extension } = props;
@@ -61,7 +61,7 @@ export const GeneralNamePart = (props) => {
61
61
  return (h(RowValue, { name: names[name] || name, value: Convert.ToString(value) }));
62
62
  }
63
63
  if (value instanceof EDIPartyName) {
64
- return (h(RowValue, { name: names[name] || name, value: Convert.ToString(value.partyName) }));
64
+ return (h(RowValue, { name: names[name] || name, value: value.partyName.toString() }));
65
65
  }
66
66
  if (name === 'dNSName') {
67
67
  return (h(RowValue, { name: names[name] || name, value: value, href: getDNSNameLink(value) }));
@@ -9,8 +9,8 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
+ import { getStringByOID } from '../../../utils';
12
13
  import { RowValue } from '../row';
13
- import { getStringByOID } from '../get_string_by_oid';
14
14
  import { BasicExtension } from './basic_extension';
15
15
  import { GeneralNamePart } from './general_name_part';
16
16
  export const InfoAccessSyntaxExtension = (props) => {
@@ -10,8 +10,8 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { Convert } from 'pvtsutils';
13
+ import { getStringByOID } from '../../../utils';
13
14
  import { RowValue } from '../row';
14
- import { getStringByOID } from '../get_string_by_oid';
15
15
  import { BasicExtension } from './basic_extension';
16
16
  export const LogotypeExtension = (props) => {
17
17
  const { extension } = props;
@@ -9,8 +9,8 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
+ import { getStringByOID } from '../../../utils';
12
13
  import { RowValue } from '../row';
13
- import { getStringByOID } from '../get_string_by_oid';
14
14
  import { BasicExtension } from './basic_extension';
15
15
  export const PolicyMappingsExtension = (props) => {
16
16
  const { extension } = props;
@@ -10,8 +10,8 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { Convert } from 'pvtsutils';
13
+ import { getStringByOID } from '../../../utils';
13
14
  import { RowValue } from '../row';
14
- import { getStringByOID } from '../get_string_by_oid';
15
15
  import { BasicExtension } from './basic_extension';
16
16
  export const QCStatementsExtension = (props) => {
17
17
  const { extension } = props;
@@ -9,8 +9,8 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
+ import { getStringByOID } from '../../../utils';
12
13
  import { RowValue } from '../row';
13
- import { getStringByOID } from '../get_string_by_oid';
14
14
  import { BasicExtension } from './basic_extension';
15
15
  import { getAttributeValue } from './attribute_value';
16
16
  export const SubjectDirectoryAttributesExtension = (props) => {
@@ -10,10 +10,9 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { Convert } from 'pvtsutils';
13
- import { RowTitle, RowValue } from '../certificate-viewer/row';
14
- import { getStringByOID } from '../certificate-viewer/get_string_by_oid';
15
- import { GeneralNamePart } from '../certificate-viewer/extensions/general_name_part';
16
- import { l10n } from '../../utils';
13
+ import { l10n, getStringByOID } from '../../utils';
14
+ import { RowTitle, RowValue } from './row';
15
+ import { GeneralNamePart } from './extensions/general_name_part';
17
16
  export const Holder = (props) => {
18
17
  const { holder } = props;
19
18
  if (!holder) {
@@ -0,0 +1,15 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ export { BasicInformation } from './basic_information';
5
+ export { PublicKey } from './public_key';
6
+ export { SubjectName } from './subject_name';
7
+ export { IssuerName } from './issuer_name';
8
+ export { Signature } from './signature';
9
+ export { Thumbprints } from './thumbprints';
10
+ export { Extensions } from './extensions';
11
+ export { Attributes } from './attributes';
12
+ export { Miscellaneous } from './miscellaneous';
13
+ export { RevokedCertificates } from './revoked_certificates';
14
+ export { Holder } from './holder';
15
+ export { Issuer } from './issuer';
@@ -9,9 +9,9 @@
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
11
  import { h } from '@stencil/core';
12
- import { RowTitle } from '../certificate-viewer/row';
13
- import { GeneralNamePart } from '../certificate-viewer/extensions/general_name_part';
14
12
  import { l10n } from '../../utils';
13
+ import { RowTitle } from './row';
14
+ import { GeneralNamePart } from './extensions/general_name_part';
15
15
  export const Issuer = (props) => {
16
16
  const { issuer } = props;
17
17
  if (!issuer) {
@@ -10,9 +10,8 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import { Convert } from 'pvtsutils';
13
- import { l10n } from '../../utils';
14
- import { getStringByOID } from './get_string_by_oid';
15
- import { RowTitle, RowValue } from './row';
13
+ import { l10n, getStringByOID } from '../../utils';
14
+ import { RowTitle, RowValue, TableRowTable } from './row';
16
15
  function getPublicKeyModulus(publicKey) {
17
16
  var _a;
18
17
  if ((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['modulus']) {
@@ -34,17 +33,23 @@ function getPublicKeyExponent(publicKey) {
34
33
  return null;
35
34
  }
36
35
  export const PublicKey = (props) => {
37
- var _a;
38
36
  const { publicKey } = props;
39
37
  if (!publicKey) {
40
38
  return null;
41
39
  }
40
+ function renderKeyDetails(key) {
41
+ var _a;
42
+ return [
43
+ h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
44
+ h(RowValue, { name: l10n.getString('namedCurve'), value: getStringByOID((_a = key.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
45
+ h(RowValue, { name: l10n.getString('exponent'), value: getPublicKeyExponent(key) }),
46
+ h(RowValue, { name: l10n.getString('modulus'), value: getPublicKeyModulus(key) }),
47
+ h(RowValue, { name: l10n.getString('value'), value: Convert.ToHex(key.value), monospace: true, collapse: true }),
48
+ ];
49
+ }
42
50
  return [
43
51
  h(RowTitle, { value: l10n.getString('publicKeyInfo') }),
44
- h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(publicKey.algorithm) }),
45
- h(RowValue, { name: l10n.getString('namedCurve'), value: getStringByOID((_a = publicKey.params) === null || _a === void 0 ? void 0 : _a['namedCurve']) }),
46
- h(RowValue, { name: l10n.getString('exponent'), value: getPublicKeyExponent(publicKey) }),
47
- h(RowValue, { name: l10n.getString('modulus'), value: getPublicKeyModulus(publicKey) }),
48
- h(RowValue, { name: l10n.getString('value'), value: Convert.ToHex(publicKey.value), monospace: true, collapse: true }),
52
+ renderKeyDetails(publicKey),
53
+ (Array.isArray(publicKey.params) && publicKey.params.length && publicKey.params.map((param) => (h(TableRowTable, null, renderKeyDetails(param))))),
49
54
  ];
50
55
  };
@@ -11,13 +11,9 @@
11
11
  import { h } from '@stencil/core';
12
12
  import { CRLReason, InvalidityDate, CertificateIssuer } from '@peculiar/asn1-x509';
13
13
  import { Convert } from 'pvtsutils';
14
- import { dateShort, l10n } from '../../utils';
15
- import { getStringByOID } from '../certificate-viewer/get_string_by_oid';
16
- import { GeneralNamePart } from '../certificate-viewer/extensions/general_name_part';
17
- import { RowTitle, RowValue } from '../certificate-viewer/row';
18
- const TableRowTable = (_, children) => (h("tr", null,
19
- h("td", { colSpan: 2 },
20
- h("table", null, children))));
14
+ import { dateShort, l10n, getStringByOID } from '../../utils';
15
+ import { GeneralNamePart } from './extensions/general_name_part';
16
+ import { RowTitle, RowValue, TableRowTable } from './row';
21
17
  export const RevokedCertificates = (props) => {
22
18
  const { revokedCertificates, getDNSNameLink, getIPAddressLink, } = props;
23
19
  if (!revokedCertificates || !revokedCertificates.length) {
@@ -10,6 +10,9 @@
10
10
  */
11
11
  import { h } from '@stencil/core';
12
12
  import isLink from '../../utils/is_link';
13
+ export const TableRowTable = (_, children) => (h("tr", null,
14
+ h("td", { colSpan: 2 },
15
+ h("table", null, children))));
13
16
  export const RowTitle = (props) => {
14
17
  const { value } = props;
15
18
  if (!value) {
@@ -0,0 +1,31 @@
1
+ /*!
2
+ * © Peculiar Ventures https://peculiarventures.com/ - MIT License
3
+ */
4
+ /**
5
+ * @license
6
+ * Copyright (c) Peculiar Ventures, LLC.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */
11
+ import { h } from '@stencil/core';
12
+ import { Convert } from 'pvtsutils';
13
+ import { l10n, getStringByOID } from '../../utils';
14
+ import { RowTitle, RowValue, TableRowTable } from './row';
15
+ export const Signature = (props) => {
16
+ const { signature } = props;
17
+ if (!signature) {
18
+ return null;
19
+ }
20
+ function renderSignatureDetails(data) {
21
+ return [
22
+ h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(data.algorithm) }),
23
+ h(RowValue, { name: l10n.getString('value'), value: Convert.ToHex(data.value), monospace: true, collapse: true }),
24
+ ];
25
+ }
26
+ return [
27
+ h(RowTitle, { value: l10n.getString('signature') }),
28
+ renderSignatureDetails(signature),
29
+ (signature.params && signature.params.length && signature.params.map((param) => (h(TableRowTable, null, renderSignatureDetails(param))))),
30
+ ];
31
+ };
@@ -27,6 +27,10 @@ table {
27
27
  border-collapse: collapse;
28
28
  }
29
29
 
30
+ table table {
31
+ margin-bottom: 0;
32
+ }
33
+
30
34
  table .title td {
31
35
  border-color: rgba(209, 213, 217, 0.5);
32
36
  border-color: rgba(var(--pv-color-grey_3-rgb), 0.5);
@@ -11,14 +11,7 @@
11
11
  import { Component, h, Prop, State, Watch, Host, } from '@stencil/core';
12
12
  import { X509Certificate, } from '../../crypto';
13
13
  import { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';
14
- import { PublicKey } from './public_key';
15
- import { Signature } from './signature';
16
- import { Thumbprints } from './thumbprints';
17
- import { Extensions } from './extensions';
18
- import { Miscellaneous } from './miscellaneous';
19
- import { SubjectName } from './subject_name';
20
- import { IssuerName } from './issuer_name';
21
- import { BasicInformation } from './basic_information';
14
+ import { BasicInformation, SubjectName, IssuerName, PublicKey, Signature, Thumbprints, Extensions, Miscellaneous, } from '../certificate-details-parts';
22
15
  export class CertificateViewer {
23
16
  constructor() {
24
17
  this.isDecodeInProcess = true;
@@ -11,13 +11,7 @@
11
11
  import { Component, Host, h, Prop, State, Watch, } from '@stencil/core';
12
12
  import { CRL } from '../../crypto';
13
13
  import { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';
14
- import { Signature } from '../certificate-viewer/signature';
15
- import { IssuerName } from '../certificate-viewer/issuer_name';
16
- import { Thumbprints } from '../certificate-viewer/thumbprints';
17
- import { Extensions } from '../certificate-viewer/extensions';
18
- import { Miscellaneous } from '../certificate-viewer/miscellaneous';
19
- import { BasicInformation } from '../certificate-viewer/basic_information';
20
- import { RevokedCertificates } from './revoked_certificates';
14
+ import { BasicInformation, IssuerName, Signature, Thumbprints, Extensions, Miscellaneous, RevokedCertificates, } from '../certificate-details-parts';
21
15
  export class CrlViewer {
22
16
  constructor() {
23
17
  this.isDecodeInProcess = true;
@@ -11,14 +11,7 @@
11
11
  import { Component, Host, h, Prop, State, Watch, } from '@stencil/core';
12
12
  import { CSR } from '../../crypto';
13
13
  import { getDNSNameLink, getIPAddressLink, getLEILink } from '../../utils/third_party_links';
14
- import { SubjectName } from '../certificate-viewer/subject_name';
15
- import { PublicKey } from '../certificate-viewer/public_key';
16
- import { Signature } from '../certificate-viewer/signature';
17
- import { Thumbprints } from '../certificate-viewer/thumbprints';
18
- import { Attributes } from '../certificate-viewer/attributes';
19
- import { Extensions } from '../certificate-viewer/extensions';
20
- import { Miscellaneous } from '../certificate-viewer/miscellaneous';
21
- import { BasicInformation } from '../certificate-viewer/basic_information';
14
+ import { BasicInformation, SubjectName, Signature, Thumbprints, Extensions, Miscellaneous, PublicKey, Attributes, } from '../certificate-details-parts';
22
15
  export class CsrViewer {
23
16
  constructor() {
24
17
  this.isDecodeInProcess = true;
@@ -2310,4 +2310,14 @@ export const OIDs = {
2310
2310
  '0.4.0.9496.7': 'GDPR compliance attestation reference',
2311
2311
  '0.4.0.9496.8': 'Insurance coverage attestation',
2312
2312
  '0.4.0.9496.9': 'Valuation ranking',
2313
+ // https://cookie-daily.life/src/matter/matter_html/Chapter%206.%20Device%20Attestation%20and%20Operational%20Credentials.html
2314
+ '1.3.6.1.4.1.37244.2.1': 'Matter Vendor ID',
2315
+ '1.3.6.1.4.1.37244.2.2': 'Matter Product ID',
2316
+ // https://github.com/IETF-Hackathon/pqc-certificates/blob/master/docs/oid_mapping.md
2317
+ '1.3.6.1.4.1.18227.2.1': 'Composite With No Hash',
2318
+ '2.16.840.1.114027.80.4.1': 'Composite Key',
2319
+ '1.3.6.1.4.1.2.267.7.6.5': 'Dilithium3',
2320
+ '1.3.6.1.4.1.18227.999.1.2.1': 'Dilithium3 With SHA256',
2321
+ '1.3.6.1.4.1.18227.999.1.2.2': 'Dilithium3 With SHA384',
2322
+ '1.3.6.1.4.1.18227.999.1.2.3': 'Dilithium3 With SHA512',
2313
2323
  };
@@ -11,6 +11,7 @@
11
11
  import { AsnConvert } from '@peculiar/asn1-schema';
12
12
  import { ECParameters, id_ecPublicKey } from '@peculiar/asn1-ecc';
13
13
  import { id_rsaEncryption, RSAPublicKey } from '@peculiar/asn1-rsa';
14
+ import { id_composite_key, id_alg_composite, CompositePublicKey, CompositeSignatureValue, CompositeParams, } from '@peculiar/asn1-x509-post-quantum';
14
15
  import { Certificate } from '@peculiar/asn1-x509';
15
16
  import { Convert } from 'pvtsutils';
16
17
  import { dateDiff, Download } from '../utils';
@@ -49,8 +50,8 @@ export class X509Certificate extends AsnData {
49
50
  .map((e) => new Extension(AsnConvert.serialize(e)));
50
51
  }
51
52
  }
52
- get publicKey() {
53
- const { subjectPublicKey, algorithm } = this.asn.tbsCertificate.subjectPublicKeyInfo;
53
+ getPublicKeyInfo(publicKeyInfo) {
54
+ const { subjectPublicKey, algorithm } = publicKeyInfo;
54
55
  let params;
55
56
  if (algorithm.algorithm === id_ecPublicKey && algorithm.parameters) {
56
57
  params = AsnConvert.parse(algorithm.parameters, ECParameters);
@@ -58,16 +59,30 @@ export class X509Certificate extends AsnData {
58
59
  if (algorithm.algorithm === id_rsaEncryption) {
59
60
  params = AsnConvert.parse(subjectPublicKey, RSAPublicKey);
60
61
  }
61
- const spki = AsnConvert.serialize(this.asn.tbsCertificate.subjectPublicKeyInfo);
62
+ if (algorithm.algorithm === id_composite_key) {
63
+ params = AsnConvert.parse(subjectPublicKey, CompositePublicKey);
64
+ params = params.map((param) => this.getPublicKeyInfo(param));
65
+ }
66
+ const spki = AsnConvert.serialize(publicKeyInfo);
62
67
  return {
63
68
  params,
64
69
  value: spki,
65
70
  algorithm: algorithm.algorithm,
66
71
  };
67
72
  }
73
+ get publicKey() {
74
+ return this.getPublicKeyInfo(this.asn.tbsCertificate.subjectPublicKeyInfo);
75
+ }
68
76
  get signature() {
69
77
  const { signatureValue, signatureAlgorithm } = this.asn;
78
+ let params;
79
+ if (signatureAlgorithm.algorithm === id_alg_composite) {
80
+ const compositeSignatureValues = AsnConvert.parse(signatureValue, CompositeSignatureValue);
81
+ const compositeParams = AsnConvert.parse(signatureAlgorithm.parameters, CompositeParams);
82
+ params = compositeParams.map((param, index) => (Object.assign(Object.assign({}, param), { value: compositeSignatureValues[index] })));
83
+ }
70
84
  return {
85
+ params,
71
86
  value: signatureValue,
72
87
  algorithm: signatureAlgorithm.algorithm,
73
88
  };
@@ -8,7 +8,7 @@
8
8
  * This source code is licensed under the MIT license found in the
9
9
  * LICENSE file in the root directory of this source tree.
10
10
  */
11
- import { OIDs } from '../../constants/oids';
11
+ import { OIDs } from '../constants/oids';
12
12
  export function getStringByOID(value) {
13
13
  const oid = OIDs[value];
14
14
  if (oid) {
@@ -6,4 +6,5 @@ export * from './read_file';
6
6
  export * from './date_formatter';
7
7
  export * from './l10n';
8
8
  export * from './download';
9
+ export * from './get_string_by_oid';
9
10
  export { validator, };