@peculiar/certificates-viewer 4.6.1 → 4.7.1-alpha.1

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 (252) hide show
  1. package/components/attribute-certificate-viewer.js +4 -2
  2. package/components/attribute-certificate-viewer.js.map +1 -1
  3. package/components/attribute.js +2 -1
  4. package/components/attribute.js.map +1 -1
  5. package/components/certificate-chain-viewer.js +1 -1
  6. package/components/certificate-viewer.js +3 -2
  7. package/components/certificate-viewer.js.map +1 -1
  8. package/components/crl-viewer.js +4 -2
  9. package/components/crl-viewer.js.map +1 -1
  10. package/components/csr-viewer.js +3 -3
  11. package/components/csr-viewer.js.map +1 -1
  12. package/components/download.js +2 -12760
  13. package/components/download.js.map +1 -1
  14. package/components/index.js +2 -1
  15. package/components/index.js.map +1 -1
  16. package/components/index2.js +51 -2
  17. package/components/index2.js.map +1 -1
  18. package/components/issuer_name.js +2 -2
  19. package/components/link.js +14335 -0
  20. package/components/link.js.map +1 -0
  21. package/components/miscellaneous.js +96 -72
  22. package/components/miscellaneous.js.map +1 -1
  23. package/components/peculiar-certificate-decoder.js +32 -16
  24. package/components/peculiar-certificate-decoder.js.map +1 -1
  25. package/components/peculiar-certificates-viewer.js +2 -1
  26. package/components/peculiar-certificates-viewer.js.map +1 -1
  27. package/components/peculiar-ssh-certificate-viewer.d.ts +11 -0
  28. package/components/peculiar-ssh-certificate-viewer.js +12 -0
  29. package/components/peculiar-ssh-certificate-viewer.js.map +1 -0
  30. package/components/peculiar-text-hider.js +1 -32
  31. package/components/peculiar-text-hider.js.map +1 -1
  32. package/components/pkcs10_certificate_request.js +2 -6
  33. package/components/pkcs10_certificate_request.js.map +1 -1
  34. package/components/row.js +87 -0
  35. package/components/row.js.map +1 -0
  36. package/components/ssh-certificate-viewer.js +193 -0
  37. package/components/ssh-certificate-viewer.js.map +1 -0
  38. package/components/subject_name.js +2 -2
  39. package/components/text-hider.js +40 -0
  40. package/components/text-hider.js.map +1 -0
  41. package/dist/cjs/extension-D8YKlAu4.js +110 -0
  42. package/dist/cjs/extension-D8YKlAu4.js.map +1 -0
  43. package/dist/cjs/index.cjs.js +4 -4
  44. package/dist/cjs/loader.cjs.js +1 -1
  45. package/dist/cjs/{miscellaneous-DeBEwLDy.js → miscellaneous-DvVSM5KJ.js} +187 -186
  46. package/dist/cjs/{miscellaneous-DeBEwLDy.js.map → miscellaneous-DvVSM5KJ.js.map} +1 -1
  47. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.cjs.js.map +1 -0
  48. package/dist/cjs/{peculiar-attribute-certificate-viewer_4.cjs.entry.js → peculiar-attribute-certificate-viewer_5.cjs.entry.js} +240 -38
  49. package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -0
  50. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +25 -20
  51. package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
  52. package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
  53. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -3
  54. package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js.map +1 -1
  55. package/dist/cjs/peculiar-certificate-viewer.entry.cjs.js.map +1 -1
  56. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +23 -22
  57. package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js.map +1 -1
  58. package/dist/cjs/peculiar-certificates-viewer.entry.cjs.js.map +1 -1
  59. package/dist/cjs/peculiar.cjs.js +1 -1
  60. package/dist/cjs/pkcs10_certificate_request-BoHhadiA.js +146 -0
  61. package/dist/cjs/pkcs10_certificate_request-BoHhadiA.js.map +1 -0
  62. package/dist/cjs/{certification_request-CxHe71zR.js → ssh_certificate-s3-rwdMT.js} +1734 -126
  63. package/dist/cjs/ssh_certificate-s3-rwdMT.js.map +1 -0
  64. package/dist/cjs/{x509_certificate-CzplJQ0X.js → x509_certificate-DfXuxxZp.js} +29 -28
  65. package/dist/cjs/{x509_certificate-CzplJQ0X.js.map → x509_certificate-DfXuxxZp.js.map} +1 -1
  66. package/dist/cjs/{x509_crl-B7kFbLDV.js → x509_crl-CxJ2lyGX.js} +32 -31
  67. package/dist/cjs/{x509_crl-B7kFbLDV.js.map → x509_crl-CxJ2lyGX.js.map} +1 -1
  68. package/dist/collection/collection-manifest.json +1 -0
  69. package/dist/collection/components/certificate-decoder/certificate-decoder.js +10 -6
  70. package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
  71. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js +25 -0
  72. package/dist/collection/components/certificate-details-parts/attributes/extension_request_attribute.js.map +1 -0
  73. package/dist/collection/components/certificate-details-parts/attributes/index.js +10 -1
  74. package/dist/collection/components/certificate-details-parts/attributes/index.js.map +1 -1
  75. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js +27 -0
  76. package/dist/collection/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.js.map +1 -0
  77. package/dist/collection/components/csr-viewer/csr-viewer.js +2 -2
  78. package/dist/collection/components/csr-viewer/csr-viewer.js.map +1 -1
  79. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +29 -0
  80. package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -0
  81. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js +26 -0
  82. package/dist/collection/components/ssh-certificate-viewer/-components/public_key.js.map +1 -0
  83. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js +26 -0
  84. package/dist/collection/components/ssh-certificate-viewer/-components/signature_key.js.map +1 -0
  85. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +193 -0
  86. package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -0
  87. package/dist/collection/constants/oids.js +2 -0
  88. package/dist/collection/constants/oids.js.map +1 -1
  89. package/dist/collection/crypto/attribute.js +2 -0
  90. package/dist/collection/crypto/attribute.js.map +1 -1
  91. package/dist/collection/crypto/index.js +1 -0
  92. package/dist/collection/crypto/index.js.map +1 -1
  93. package/dist/collection/crypto/pkcs10_certificate_request.js +0 -7
  94. package/dist/collection/crypto/pkcs10_certificate_request.js.map +1 -1
  95. package/dist/collection/crypto/ssh_certificate.js +68 -0
  96. package/dist/collection/crypto/ssh_certificate.js.map +1 -0
  97. package/dist/collection/locales/en.json +5 -1
  98. package/dist/esm/extension-oK2qpCU6.js +107 -0
  99. package/dist/esm/extension-oK2qpCU6.js.map +1 -0
  100. package/dist/esm/index.js +2 -2
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/esm/{miscellaneous-bVeJt-6m.js → miscellaneous-DrmTXljc.js} +4 -3
  103. package/dist/{esm-es5/miscellaneous-bVeJt-6m.js.map → esm/miscellaneous-DrmTXljc.js.map} +1 -1
  104. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  105. package/dist/esm/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +215 -14
  106. package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  107. package/dist/esm/peculiar-certificate-decoder.entry.js +14 -9
  108. package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
  109. package/dist/esm/peculiar-certificate-viewer.entry.js +4 -3
  110. package/dist/esm/peculiar-certificate-viewer.entry.js.map +1 -1
  111. package/dist/esm/peculiar-certificates-viewer.entry.js +3 -2
  112. package/dist/esm/peculiar-certificates-viewer.entry.js.map +1 -1
  113. package/dist/esm/peculiar.js +1 -1
  114. package/dist/esm/{pkcs10_certificate_request-CK8FH47X.js → pkcs10_certificate_request-Bdt_qA_g.js} +4 -8
  115. package/dist/esm/pkcs10_certificate_request-Bdt_qA_g.js.map +1 -0
  116. package/dist/esm/{certification_request-PeMaLTUD.js → ssh_certificate-Ct-r021h.js} +1682 -115
  117. package/dist/esm/ssh_certificate-Ct-r021h.js.map +1 -0
  118. package/dist/esm/{x509_certificate-CEEWtU_T.js → x509_certificate-5DEbrOA7.js} +4 -3
  119. package/dist/{esm-es5/x509_certificate-CEEWtU_T.js.map → esm/x509_certificate-5DEbrOA7.js.map} +1 -1
  120. package/dist/esm/{x509_crl-BcZd9KVn.js → x509_crl-CPgNUkh7.js} +5 -4
  121. package/dist/{esm-es5/x509_crl-BcZd9KVn.js.map → esm/x509_crl-CPgNUkh7.js.map} +1 -1
  122. package/dist/esm-es5/extension-oK2qpCU6.js +12 -0
  123. package/dist/esm-es5/extension-oK2qpCU6.js.map +1 -0
  124. package/dist/esm-es5/index.js +1 -1
  125. package/dist/esm-es5/loader.js +2 -2
  126. package/dist/esm-es5/{miscellaneous-bVeJt-6m.js → miscellaneous-DrmTXljc.js} +2 -2
  127. package/dist/{esm/miscellaneous-bVeJt-6m.js.map → esm-es5/miscellaneous-DrmTXljc.js.map} +1 -1
  128. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.js.map +1 -0
  129. package/dist/esm-es5/{peculiar-attribute-certificate-viewer_4.entry.js → peculiar-attribute-certificate-viewer_5.entry.js} +39 -4
  130. package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -0
  131. package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
  132. package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
  133. package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
  134. package/dist/esm-es5/peculiar-certificate-viewer.entry.js.map +1 -1
  135. package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
  136. package/dist/esm-es5/peculiar-certificates-viewer.entry.js.map +1 -1
  137. package/dist/esm-es5/peculiar.js +1 -1
  138. package/dist/esm-es5/pkcs10_certificate_request-Bdt_qA_g.js +19 -0
  139. package/dist/esm-es5/pkcs10_certificate_request-Bdt_qA_g.js.map +1 -0
  140. package/dist/esm-es5/{certification_request-PeMaLTUD.js → ssh_certificate-Ct-r021h.js} +7 -14
  141. package/dist/esm-es5/ssh_certificate-Ct-r021h.js.map +1 -0
  142. package/dist/esm-es5/{x509_certificate-CEEWtU_T.js → x509_certificate-5DEbrOA7.js} +4 -4
  143. package/dist/{esm/x509_certificate-CEEWtU_T.js.map → esm-es5/x509_certificate-5DEbrOA7.js.map} +1 -1
  144. package/dist/esm-es5/{x509_crl-BcZd9KVn.js → x509_crl-CPgNUkh7.js} +2 -2
  145. package/dist/{esm/x509_crl-BcZd9KVn.js.map → esm-es5/x509_crl-CPgNUkh7.js.map} +1 -1
  146. package/dist/peculiar/index.esm.js +1 -1
  147. package/dist/peculiar/locales/en.json +5 -1
  148. package/dist/peculiar/{p-5479a530.entry.js → p-0b895a8e.entry.js} +2 -2
  149. package/dist/peculiar/{p-84f69023.system.entry.js → p-11434880.system.entry.js} +2 -2
  150. package/dist/peculiar/{p-C9sY8yng.system.js → p-2GQYAR0v.system.js} +3 -3
  151. package/dist/peculiar/{p-C9sY8yng.system.js.map → p-2GQYAR0v.system.js.map} +1 -1
  152. package/dist/peculiar/p-364fd32b.system.entry.js +5 -0
  153. package/dist/peculiar/{p-14fcbc5c.system.entry.js.map → p-364fd32b.system.entry.js.map} +1 -1
  154. package/dist/peculiar/p-5df0f22b.system.entry.js +146 -0
  155. package/dist/peculiar/p-5df0f22b.system.entry.js.map +1 -0
  156. package/dist/peculiar/p-62b723f6.entry.js +145 -0
  157. package/dist/peculiar/p-62b723f6.entry.js.map +1 -0
  158. package/dist/peculiar/p-83a53b4f.entry.js +5 -0
  159. package/dist/peculiar/{p-0de4837d.entry.js.map → p-83a53b4f.entry.js.map} +1 -1
  160. package/dist/peculiar/p-B2G7qjfV.js +369 -0
  161. package/dist/peculiar/{p-CGRNSrHk.js.map → p-B2G7qjfV.js.map} +1 -1
  162. package/dist/peculiar/{p-BypepohK.system.js.map → p-BCsPspKr.system.js.map} +1 -1
  163. package/dist/peculiar/p-BGASC3UX.system.js +1 -1
  164. package/dist/peculiar/p-BGIWeG8l.js +12 -0
  165. package/dist/peculiar/p-BGIWeG8l.js.map +1 -0
  166. package/dist/peculiar/{p-DRvp86xt.system.js → p-BQiABBi1.system.js} +5 -5
  167. package/dist/peculiar/{p-DRvp86xt.system.js.map → p-BQiABBi1.system.js.map} +1 -1
  168. package/dist/peculiar/{p-CezfC5i1.system.js → p-BeVuAzsd.system.js} +42 -42
  169. package/dist/peculiar/{p-CezfC5i1.system.js.map → p-BeVuAzsd.system.js.map} +1 -1
  170. package/dist/peculiar/{p-CZwhKPgb.system.js → p-C31rbtuG.system.js} +2 -2
  171. package/dist/peculiar/p-C31rbtuG.system.js.map +1 -0
  172. package/dist/peculiar/p-Ce-IF7_R.system.js.map +1 -0
  173. package/dist/peculiar/p-ClkgAXnd.system.js +135 -0
  174. package/dist/peculiar/p-ClkgAXnd.system.js.map +1 -0
  175. package/dist/peculiar/p-Ct-r021h.js +135 -0
  176. package/dist/peculiar/p-Ct-r021h.js.map +1 -0
  177. package/dist/peculiar/{p-BaebEpW0.system.js.map → p-CxtUQdcj.system.js.map} +1 -1
  178. package/dist/peculiar/{p-DrmgUhyv.js → p-D9qq15zG.js} +4 -4
  179. package/dist/peculiar/{p-DrmgUhyv.js.map → p-D9qq15zG.js.map} +1 -1
  180. package/dist/peculiar/{p-CjWRKsN-.js → p-DOpiv0-8.js} +3 -3
  181. package/dist/peculiar/{p-CjWRKsN-.js.map → p-DOpiv0-8.js.map} +1 -1
  182. package/dist/peculiar/p-IOtHTzYC.system.js +12 -0
  183. package/dist/peculiar/p-IOtHTzYC.system.js.map +1 -0
  184. package/dist/peculiar/p-LmKU8Smy.system.js.map +1 -0
  185. package/dist/peculiar/p-RWPI76Dh.js +19 -0
  186. package/dist/peculiar/p-RWPI76Dh.js.map +1 -0
  187. package/dist/peculiar/p-da9eb1e7.entry.js +5 -0
  188. package/dist/peculiar/p-da9eb1e7.entry.js.map +1 -0
  189. package/dist/peculiar/p-fd98bb82.system.entry.js +5 -0
  190. package/dist/peculiar/p-fd98bb82.system.entry.js.map +1 -0
  191. package/dist/peculiar/{p-J1t5v5N3.system.js → p-zQwWLfga.system.js} +4 -4
  192. package/dist/peculiar/p-zQwWLfga.system.js.map +1 -0
  193. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.peculiar-ssh-certificate-viewer.entry.esm.js.map +1 -0
  194. package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
  195. package/dist/peculiar/peculiar-certificate-viewer.entry.esm.js.map +1 -1
  196. package/dist/peculiar/peculiar-certificates-viewer.entry.esm.js.map +1 -1
  197. package/dist/peculiar/peculiar.esm.js +1 -1
  198. package/dist/types/components/certificate-decoder/certificate-decoder.d.ts +4 -4
  199. package/dist/types/components/certificate-details-parts/attributes/extension_request_attribute.d.ts +15 -0
  200. package/dist/types/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.d.ts +15 -0
  201. package/dist/types/components/ssh-certificate-viewer/-components/basic_information.d.ts +21 -0
  202. package/dist/types/components/ssh-certificate-viewer/-components/public_key.d.ts +14 -0
  203. package/dist/types/components/ssh-certificate-viewer/-components/signature_key.d.ts +14 -0
  204. package/dist/types/components/ssh-certificate-viewer/ssh-certificate-viewer.d.ts +43 -0
  205. package/dist/types/components.d.ts +43 -0
  206. package/dist/types/constants/oids.d.ts +2 -0
  207. package/dist/types/crypto/attribute.d.ts +2 -0
  208. package/dist/types/crypto/index.d.ts +1 -0
  209. package/dist/types/crypto/pkcs10_certificate_request.d.ts +0 -2
  210. package/dist/types/crypto/ssh_certificate.d.ts +28 -0
  211. package/dist/types/utils/l10n.d.ts +4 -0
  212. package/hydrate/index.js +1908 -33
  213. package/hydrate/index.mjs +1908 -33
  214. package/package.json +4 -2
  215. package/dist/cjs/certification_request-CxHe71zR.js.map +0 -1
  216. package/dist/cjs/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.cjs.js.map +0 -1
  217. package/dist/cjs/peculiar-attribute-certificate-viewer_4.cjs.entry.js.map +0 -1
  218. package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js +0 -150
  219. package/dist/cjs/pkcs10_certificate_request-CHMDxe2Z.js.map +0 -1
  220. package/dist/esm/certification_request-PeMaLTUD.js.map +0 -1
  221. package/dist/esm/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  222. package/dist/esm/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  223. package/dist/esm/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
  224. package/dist/esm-es5/certification_request-PeMaLTUD.js.map +0 -1
  225. package/dist/esm-es5/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.js.map +0 -1
  226. package/dist/esm-es5/peculiar-attribute-certificate-viewer_4.entry.js.map +0 -1
  227. package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js +0 -19
  228. package/dist/esm-es5/pkcs10_certificate_request-CK8FH47X.js.map +0 -1
  229. package/dist/peculiar/p-00d6f11f.system.entry.js +0 -111
  230. package/dist/peculiar/p-00d6f11f.system.entry.js.map +0 -1
  231. package/dist/peculiar/p-0de4837d.entry.js +0 -5
  232. package/dist/peculiar/p-14fcbc5c.system.entry.js +0 -5
  233. package/dist/peculiar/p-315805ce.entry.js +0 -5
  234. package/dist/peculiar/p-315805ce.entry.js.map +0 -1
  235. package/dist/peculiar/p-591a9019.system.entry.js +0 -5
  236. package/dist/peculiar/p-591a9019.system.entry.js.map +0 -1
  237. package/dist/peculiar/p-BipKYW6e.system.js +0 -142
  238. package/dist/peculiar/p-BipKYW6e.system.js.map +0 -1
  239. package/dist/peculiar/p-BloT0Xj9.system.js.map +0 -1
  240. package/dist/peculiar/p-CGRNSrHk.js +0 -369
  241. package/dist/peculiar/p-CZwhKPgb.system.js.map +0 -1
  242. package/dist/peculiar/p-D1eNnGDF.js +0 -19
  243. package/dist/peculiar/p-D1eNnGDF.js.map +0 -1
  244. package/dist/peculiar/p-ITVWR0oT.system.js.map +0 -1
  245. package/dist/peculiar/p-J1t5v5N3.system.js.map +0 -1
  246. package/dist/peculiar/p-PeMaLTUD.js +0 -142
  247. package/dist/peculiar/p-PeMaLTUD.js.map +0 -1
  248. package/dist/peculiar/p-c8b3766a.entry.js +0 -110
  249. package/dist/peculiar/p-c8b3766a.entry.js.map +0 -1
  250. package/dist/peculiar/peculiar-attribute-certificate-viewer.peculiar-certificate-chain-viewer.peculiar-crl-viewer.peculiar-csr-viewer.entry.esm.js.map +0 -1
  251. /package/dist/peculiar/{p-5479a530.entry.js.map → p-0b895a8e.entry.js.map} +0 -0
  252. /package/dist/peculiar/{p-84f69023.system.entry.js.map → p-11434880.system.entry.js.map} +0 -0
@@ -11,7 +11,8 @@
11
11
  import { h } from "@stencil/core";
12
12
  import { Name } from "@peculiar/asn1-x509";
13
13
  import { TypeRelationship, ActivityDescription, WebGDPR, InsuranceValue, ValuationRanking, } from "@peculiar/asn1-ntqwac";
14
- import { UnstructuredName, ChallengePassword, } from "@peculiar/asn1-pkcs9";
14
+ import { UnstructuredName, ChallengePassword, ExtensionRequest, } from "@peculiar/asn1-pkcs9";
15
+ import { PrivateKeyPossessionStatement } from "@peculiar/asn1-private-key-stmt";
15
16
  import { RowTitle } from "../row";
16
17
  import { NameAttribute } from "./name_attribute";
17
18
  import { ActivityDescriptionAttribute } from "./activity_description_attribute";
@@ -23,6 +24,8 @@ import { BasicAttribute } from "./basic_attribute";
23
24
  import { AsStringAttribute } from "./as_string_attribute";
24
25
  import { UnstructuredNameAttribute } from "./unstructured_name_attribute";
25
26
  import { ChallengePasswordAttribute } from "./challenge_password_attribute";
27
+ import { ExtensionRequestAttribute } from "./extension_request_attribute";
28
+ import { PrivateKeyPossessionStatementAttribute } from "./private_key_possession_statement_attribute";
26
29
  export const Attributes = (props) => {
27
30
  const { attributes } = props;
28
31
  if (!attributes || !attributes.length) {
@@ -35,6 +38,9 @@ export const Attributes = (props) => {
35
38
  if (attribute.value instanceof Name) {
36
39
  return (h(NameAttribute, { attribute: attribute }));
37
40
  }
41
+ if (attribute.value instanceof ExtensionRequest) {
42
+ return (h(ExtensionRequestAttribute, { attribute: attribute }));
43
+ }
38
44
  if (attribute.value instanceof ActivityDescription) {
39
45
  return (h(ActivityDescriptionAttribute, { attribute: attribute }));
40
46
  }
@@ -56,6 +62,9 @@ export const Attributes = (props) => {
56
62
  if (attribute.value instanceof ChallengePassword) {
57
63
  return (h(ChallengePasswordAttribute, { attribute: attribute }));
58
64
  }
65
+ if (attribute.value instanceof PrivateKeyPossessionStatement) {
66
+ return (h(PrivateKeyPossessionStatementAttribute, { attribute: attribute }));
67
+ }
59
68
  if (typeof attribute.value === 'string') {
60
69
  return (h(AsStringAttribute, { attribute: attribute }));
61
70
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,4BAA4B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ED,IAAI,SAAS,CAAC,KAAK,YAAY,cAAc,EAAE,CAAC;oBAC9C,OAAO,CACL,EAAC,uBAAuB,IACtB,SAAS,EAAE,SAAiD,GAC5D,CACH,CAAC;gBACJ,CAAC;gBAED,IAAI,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE,CAAC;oBAChD,OAAO,CACL,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAmD,GAC9D,CACH,CAAC;gBACJ,CAAC;gBAED,IAAI,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE,CAAC;oBAChD,OAAO,CACL,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAmD,GAC9D,CACH,CAAC;gBACJ,CAAC;gBAED,IAAI,SAAS,CAAC,KAAK,YAAY,gBAAgB,EAAE,CAAC;oBAChD,OAAO,CACL,EAAC,yBAAyB,IACxB,SAAS,EAAE,SAAmD,GAC9D,CACH,CAAC;gBACJ,CAAC;gBAED,IAAI,SAAS,CAAC,KAAK,YAAY,iBAAiB,EAAE,CAAC;oBACjD,OAAO,CACL,EAAC,0BAA0B,IACzB,SAAS,EAAE,SAAoD,GAC/D,CACH,CAAC;gBACJ,CAAC;gBAED,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;oBACxC,OAAO,CACL,EAAC,iBAAiB,IAChB,SAAS,EAAE,SAAyC,GACpD,CACH,CAAC;gBACJ,CAAC;gBAED,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;YACJ,CAAC;YAAC,WAAM,CAAC;gBACP,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE7D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n} from '@peculiar/asn1-pkcs9';\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as unknown as Attribute<Name>}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as unknown as Attribute<ActivityDescription>}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as unknown as Attribute<WebGDPR>}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as unknown as Attribute<InsuranceValue>}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as unknown as Attribute<TypeRelationship>}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as unknown as Attribute<ValuationRanking>}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as unknown as Attribute<UnstructuredName>}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as unknown as Attribute<ChallengePassword>}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as unknown as Attribute<string>}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\n }\n }),\n ]);\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAEhF,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,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SAAS,GACpB,CACH,CAAC;YACJ,CAAC;YAAC,WAAM,CAAC;gBACP,OAAO,CAAC,KAAK,CAAC,yBAAyB,EAAE,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;gBAE7D,OAAO,IAAI,CAAC;YACd,CAAC;QACH,CAAC,CAAC;KACH,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { Name } from '@peculiar/asn1-x509';\nimport {\n TypeRelationship,\n ActivityDescription,\n WebGDPR,\n InsuranceValue,\n ValuationRanking,\n} from '@peculiar/asn1-ntqwac';\nimport {\n UnstructuredName,\n ChallengePassword,\n ExtensionRequest,\n} from '@peculiar/asn1-pkcs9';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\nimport type { Attribute, TAttributeValue } from '../../../crypto/attribute';\nimport { RowTitle } from '../row';\nimport { NameAttribute } from './name_attribute';\nimport { ActivityDescriptionAttribute } from './activity_description_attribute';\nimport { WebGdprAttribute } from './web_gdpr_attribute';\nimport { InsuranceValueAttribute } from './insurance_value_attribute';\nimport { TypeRelationshipAttribute } from './type_relationship_attribute';\nimport { ValuationRankingAttribute } from './valuation_ranking_attribute';\nimport { BasicAttribute } from './basic_attribute';\nimport { AsStringAttribute } from './as_string_attribute';\nimport { UnstructuredNameAttribute } from './unstructured_name_attribute';\nimport { ChallengePasswordAttribute } from './challenge_password_attribute';\nimport { ExtensionRequestAttribute } from './extension_request_attribute';\nimport { PrivateKeyPossessionStatementAttribute } from './private_key_possession_statement_attribute';\n\ninterface IAttributesPtops extends\n IGeneralNameOptions,\n ILeiOptions,\n IAuthorityKeyIdentifierOptions,\n ISubjectKeyIdentifierOptions {\n attributes: Attribute<TAttributeValue>[];\n}\n\nexport const Attributes: FunctionalComponent<IAttributesPtops> = (props) => {\n const { attributes } = props;\n\n if (!attributes || !attributes.length) {\n return null;\n }\n\n return ([\n <RowTitle\n value=\"Attributes\"\n />,\n attributes.map((attribute) => {\n try {\n if (attribute.value instanceof Name) {\n return (\n <NameAttribute\n attribute={attribute as unknown as Attribute<Name>}\n />\n );\n }\n\n if (attribute.value instanceof ExtensionRequest) {\n return (\n <ExtensionRequestAttribute\n attribute={attribute as unknown as Attribute<ExtensionRequest>}\n />\n );\n }\n\n if (attribute.value instanceof ActivityDescription) {\n return (\n <ActivityDescriptionAttribute\n attribute={attribute as unknown as Attribute<ActivityDescription>}\n />\n );\n }\n\n if (attribute.value instanceof WebGDPR) {\n return (\n <WebGdprAttribute\n attribute={attribute as unknown as Attribute<WebGDPR>}\n />\n );\n }\n\n if (attribute.value instanceof InsuranceValue) {\n return (\n <InsuranceValueAttribute\n attribute={attribute as unknown as Attribute<InsuranceValue>}\n />\n );\n }\n\n if (attribute.value instanceof TypeRelationship) {\n return (\n <TypeRelationshipAttribute\n attribute={attribute as unknown as Attribute<TypeRelationship>}\n />\n );\n }\n\n if (attribute.value instanceof ValuationRanking) {\n return (\n <ValuationRankingAttribute\n attribute={attribute as unknown as Attribute<ValuationRanking>}\n />\n );\n }\n\n if (attribute.value instanceof UnstructuredName) {\n return (\n <UnstructuredNameAttribute\n attribute={attribute as unknown as Attribute<UnstructuredName>}\n />\n );\n }\n\n if (attribute.value instanceof ChallengePassword) {\n return (\n <ChallengePasswordAttribute\n attribute={attribute as unknown as Attribute<ChallengePassword>}\n />\n );\n }\n\n if (attribute.value instanceof PrivateKeyPossessionStatement) {\n return (\n <PrivateKeyPossessionStatementAttribute\n attribute={attribute as unknown as Attribute<PrivateKeyPossessionStatement>}\n />\n );\n }\n\n if (typeof attribute.value === 'string') {\n return (\n <AsStringAttribute\n attribute={attribute as unknown as Attribute<string>}\n />\n );\n }\n\n return (\n <BasicAttribute\n attribute={attribute}\n />\n );\n } catch {\n console.error('Error render attribute:', attribute.asn.type);\n\n return null;\n }\n }),\n ]);\n};\n"]}
@@ -0,0 +1,27 @@
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 { AsnConvert } from "@peculiar/asn1-schema";
12
+ import { h } from "@stencil/core";
13
+ import { Convert } from "pvtsutils";
14
+ import { RowValue, TableRowTable } from "../row";
15
+ import { BasicAttribute } from "./basic_attribute";
16
+ import { NamePart } from "./name_part";
17
+ export const PrivateKeyPossessionStatementAttribute = (props) => {
18
+ const { attribute } = props;
19
+ const certificateRaw = attribute.value.cert
20
+ ? AsnConvert.serialize(attribute.value.cert)
21
+ : null;
22
+ return (h(BasicAttribute, { attribute: attribute }, h(RowValue, { name: "Serial Number", value: Convert.ToHex(attribute.value.signer.serialNumber), monospace: true }), h(RowValue, { name: "Issuer", value: "" }), h(TableRowTable, null, h(NamePart, { name: attribute.value.signer.issuer })), certificateRaw && [
23
+ h(RowValue, { name: "Certificate", value: "" }),
24
+ h(TableRowTable, null, h("peculiar-certificate-viewer", { certificate: Convert.ToBase64(certificateRaw) })),
25
+ ]));
26
+ };
27
+ //# sourceMappingURL=private_key_possession_statement_attribute.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"private_key_possession_statement_attribute.js","sourceRoot":"","sources":["../../../../src/components/certificate-details-parts/attributes/private_key_possession_statement_attribute.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC,MAAM,CAAC,MAAM,sCAAsC,GACiB,CAAC,KAAK,EAAE,EAAE;IAC5E,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5B,MAAM,cAAc,GAAG,SAAS,CAAC,KAAK,CAAC,IAAI;QACzC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC;QAC5C,CAAC,CAAC,IAAI,CAAC;IAET,OAAO,CACL,EAAC,cAAc,IACb,SAAS,EAAE,SAAS;QAEpB,EAAC,QAAQ,IACP,IAAI,EAAC,eAAe,EACpB,KAAK,EAAE,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,YAAY,CAAC,EACzD,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAC,QAAQ,EACb,KAAK,EAAC,EAAE,GACR;QACF,EAAC,aAAa;YACZ,EAAC,QAAQ,IACP,IAAI,EAAE,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,GACnC,CACY;QACf,cAAc,IAAI;YACjB,EAAC,QAAQ,IACP,IAAI,EAAC,aAAa,EAClB,KAAK,EAAC,EAAE,GACR;YACF,EAAC,aAAa;gBACZ,mCACE,WAAW,EAAE,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAC,GAC7C,CACY;SACjB,CACc,CAClB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { PrivateKeyPossessionStatement } from '@peculiar/asn1-private-key-stmt';\nimport { Convert } from 'pvtsutils';\nimport { Attribute } from '../../../crypto/attribute';\nimport { RowValue, TableRowTable } from '../row';\nimport { BasicAttribute } from './basic_attribute';\nimport { NamePart } from './name_part';\n\ninterface IPrivateKeyPossessionStatementAttributeProps {\n attribute: Attribute<PrivateKeyPossessionStatement>;\n}\n\nexport const PrivateKeyPossessionStatementAttribute:\nFunctionalComponent<IPrivateKeyPossessionStatementAttributeProps> = (props) => {\n const { attribute } = props;\n const certificateRaw = attribute.value.cert\n ? AsnConvert.serialize(attribute.value.cert)\n : null;\n\n return (\n <BasicAttribute\n attribute={attribute}\n >\n <RowValue\n name=\"Serial Number\"\n value={Convert.ToHex(attribute.value.signer.serialNumber)}\n monospace\n />\n <RowValue\n name=\"Issuer\"\n value=\"\"\n />\n <TableRowTable>\n <NamePart\n name={attribute.value.signer.issuer}\n />\n </TableRowTable>\n {certificateRaw && [\n <RowValue\n name=\"Certificate\"\n value=\"\"\n />,\n <TableRowTable>\n <peculiar-certificate-viewer\n certificate={Convert.ToBase64(certificateRaw)}\n />\n </TableRowTable>,\n ]}\n </BasicAttribute>\n );\n};\n"]}
@@ -11,7 +11,7 @@
11
11
  import { Host, h, Build, } from "@stencil/core";
12
12
  import { Pkcs10CertificateRequest } from "../../crypto";
13
13
  import { getDNSNameLink, getIPAddressLink, getLEILink, } from "../../utils/third_party_links";
14
- import { BasicInformation, SubjectName, Signature, Thumbprints, Extensions, Miscellaneous, PublicKey, Attributes, } from "../certificate-details-parts";
14
+ import { BasicInformation, SubjectName, Signature, Thumbprints, Miscellaneous, PublicKey, Attributes, } from "../certificate-details-parts";
15
15
  import { Typography } from "../typography";
16
16
  export class CsrViewer {
17
17
  constructor() {
@@ -102,7 +102,7 @@ export class CsrViewer {
102
102
  if (!this.certificateDecoded) {
103
103
  return this.renderEmptyState();
104
104
  }
105
- return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(SubjectName, { name: this.certificateDecoded.subject }), h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), h(Extensions, { extensions: this.certificateDecoded.extensions, title: "Extension Request", getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
105
+ return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(BasicInformation, Object.assign({}, this.certificateDecoded)), h(SubjectName, { name: this.certificateDecoded.subject }), h(PublicKey, { publicKey: this.certificateDecoded.publicKey }), h(Signature, { signature: this.certificateDecoded.signature }), h(Thumbprints, { thumbprints: this.certificateDecoded.thumbprints }), h(Attributes, { attributes: this.certificateDecoded.attributes, getLEILink: getLEILink, getDNSNameLink: getDNSNameLink, getIPAddressLink: getIPAddressLink, getAuthKeyIdParentLink: this.getAuthKeyIdParentLink, getAuthKeyIdSiblingsLink: this.getAuthKeyIdSiblingsLink, getSubjectKeyIdChildrenLink: this.getSubjectKeyIdChildrenLink, getSubjectKeyIdSiblingsLink: this.getSubjectKeyIdSiblingsLink }), this.download && (h(Miscellaneous, { certificate: this.certificateDecoded })))));
106
106
  }
107
107
  static get is() { return "peculiar-csr-viewer"; }
108
108
  static get encapsulation() { return "shadow"; }
@@ -1 +1 @@
1
- {"version":3,"file":"csr-viewer.js","s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,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,GAC5C;gBAEF,EAAC,SAAS,IACR,SAAS,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,GAC5C;gBAEF,EAAC,WAAW,IACV,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,WAAW,GAChD;gBAEF,EAAC,UAAU,IACT,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAC9C,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;gBAEF,EAAC,UAAU,IACT,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAC9C,KAAK,EAAC,mBAAmB,EACzB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;gBAED,IAAI,CAAC,QAAQ,IAAI,CAChB,EAAC,aAAa,IACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC,CACH,CACK,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { Pkcs10CertificateRequest } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Extensions,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCsrProp = string | Pkcs10CertificateRequest;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: Pkcs10CertificateRequest;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof Pkcs10CertificateRequest) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new Pkcs10CertificateRequest(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TCsrProp,\n oldValue: TCsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof Pkcs10CertificateRequest\n && oldValue instanceof Pkcs10CertificateRequest\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => value;\n\n private getAuthKeyIdSiblingsLink = (value: string) => value;\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate request.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate request available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n <Extensions\n extensions={this.certificateDecoded.extensions}\n title=\"Extension Request\"\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"csr-viewer.js","sourceRoot":"","sources":["../../../src/components/csr-viewer/csr-viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EAC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AC,SAAS,GAC5C;gBAEF,EAAC,WAAW,IACV,WAAW,EAAE,IAAI,CAAC,kBAAkB,CAAC,WAAW,GAChD;gBAEF,EAAC,UAAU,IACT,UAAU,EAAE,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAC9C,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,sBAAsB,EAAE,IAAI,CAAC,sBAAsB,EACnD,wBAAwB,EAAE,IAAI,CAAC,wBAAwB,EACvD,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,EAC7D,2BAA2B,EAAE,IAAI,CAAC,2BAA2B,GAC7D;gBAED,IAAI,CAAC,QAAQ,IAAI,CAChB,EAAC,aAAa,IACZ,WAAW,EAAE,IAAI,CAAC,kBAAkB,GACpC,CACH,CACK,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n Host,\n h,\n Prop,\n State,\n Watch,\n Build,\n} from '@stencil/core';\nimport { Pkcs10CertificateRequest } from '../../crypto';\nimport {\n getDNSNameLink, getIPAddressLink, getLEILink,\n} from '../../utils/third_party_links';\nimport {\n BasicInformation,\n SubjectName,\n Signature,\n Thumbprints,\n Miscellaneous,\n PublicKey,\n Attributes,\n} from '../certificate-details-parts';\nimport { Typography } from '../typography';\n\nexport type TCsrProp = string | Pkcs10CertificateRequest;\n\n@Component({\n tag: 'peculiar-csr-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class CsrViewer {\n private certificateDecoded: Pkcs10CertificateRequest;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TCsrProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop() download?: boolean;\n\n /**\n * Subject Key Identifier extension children link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://censys.io/certificates?q=parsed.extensions.authority_key_id:%20{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdChildrenLink?: string;\n\n /**\n * Subject Key Identifier extension siblings link.\n * <br />\n * **NOTE**: `{{subjectKeyId}}` will be replaced to value from the extension.\n * @example\n * https://some.com/{{subjectKeyId}}\n */\n @Prop({ reflect: true }) subjectKeyIdSiblingsLink?: string;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TCsrProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof Pkcs10CertificateRequest) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new Pkcs10CertificateRequest(certificate);\n } else {\n return;\n }\n\n this.certificateDecoded.parseAttributes();\n await this.certificateDecoded.getThumbprint('SHA-1');\n await this.certificateDecoded.getThumbprint('SHA-256');\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(\n newValue: TCsrProp,\n oldValue: TCsrProp,\n ) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (\n newValue instanceof Pkcs10CertificateRequest\n && oldValue instanceof Pkcs10CertificateRequest\n ) {\n if (newValue.commonName !== oldValue.commonName) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private getAuthKeyIdParentLink = (value: string) => value;\n\n private getAuthKeyIdSiblingsLink = (value: string) => value;\n\n private getSubjectKeyIdChildrenLink = (value: string) => this.subjectKeyIdChildrenLink\n ?.replace('{{subjectKeyId}}', value);\n\n private getSubjectKeyIdSiblingsLink = (value: string) => this.subjectKeyIdSiblingsLink\n ?.replace('{{subjectKeyId}}', value);\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate request.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate request available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <BasicInformation\n {...this.certificateDecoded}\n />\n\n <SubjectName\n name={this.certificateDecoded.subject}\n />\n\n <PublicKey\n publicKey={this.certificateDecoded.publicKey}\n />\n\n <Signature\n signature={this.certificateDecoded.signature}\n />\n\n <Thumbprints\n thumbprints={this.certificateDecoded.thumbprints}\n />\n\n <Attributes\n attributes={this.certificateDecoded.attributes}\n getLEILink={getLEILink}\n getDNSNameLink={getDNSNameLink}\n getIPAddressLink={getIPAddressLink}\n getAuthKeyIdParentLink={this.getAuthKeyIdParentLink}\n getAuthKeyIdSiblingsLink={this.getAuthKeyIdSiblingsLink}\n getSubjectKeyIdChildrenLink={this.getSubjectKeyIdChildrenLink}\n getSubjectKeyIdSiblingsLink={this.getSubjectKeyIdSiblingsLink}\n />\n\n {this.download && (\n <Miscellaneous\n certificate={this.certificateDecoded}\n />\n )}\n </table>\n </Host>\n );\n }\n}\n"]}
@@ -0,0 +1,29 @@
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 { RowTitle, RowValue } from "../../certificate-details-parts/row";
13
+ import { dateShort, l10n } from "../../../utils";
14
+ export const SshBasicInformation = (props) => {
15
+ const { serialNumber, validity, notBefore, notAfter, type, keyId, principals, extensions, criticalOptions, } = props;
16
+ return [
17
+ h(RowTitle, { value: l10n.getString('basicInformation') }),
18
+ h(RowValue, { name: l10n.getString('type'), value: type }),
19
+ h(RowValue, { name: l10n.getString('serialNumber'), value: serialNumber, monospace: true }),
20
+ h(RowValue, { name: l10n.getString('validity'), value: validity }),
21
+ h(RowValue, { name: l10n.getString('issued'), value: notBefore ? dateShort(notBefore) : undefined }),
22
+ h(RowValue, { name: l10n.getString('expired'), value: notAfter ? dateShort(notAfter) : undefined }),
23
+ h(RowValue, { name: l10n.getString('keyId'), value: keyId }),
24
+ h(RowValue, { name: l10n.getString('principals'), value: principals.join(', ') }),
25
+ h(RowValue, { name: l10n.getString('criticalOptions'), value: Object.keys(criticalOptions).join(', ') }),
26
+ h(RowValue, { name: l10n.getString('extensions'), value: Object.keys(extensions).join(', ') }),
27
+ ];
28
+ };
29
+ //# sourceMappingURL=basic_information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"basic_information.js","sourceRoot":"","sources":["../../../../src/components/ssh-certificate-viewer/-components/basic_information.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAcjD,MAAM,CAAC,MAAM,mBAAmB,GAAmD,CAAC,KAAK,EAAE,EAAE;IAC3F,MAAM,EACJ,YAAY,EACZ,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,IAAI,EACJ,KAAK,EACL,UAAU,EACV,UAAU,EACV,eAAe,GAChB,GAAG,KAAK,CAAC;IAEV,OAAO;QACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,kBAAkB,CAAC,GACzC;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,EAC5B,KAAK,EAAE,IAAI,GACX;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,EACpC,KAAK,EAAE,YAAY,EACnB,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,EAChC,KAAK,EAAE,QAAQ,GACf;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,EAC9B,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,GACnD;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,EAC/B,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,GACjD;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,KAAK,GACZ;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAClC,KAAK,EAAE,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAC5B;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,iBAAiB,CAAC,EACvC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAC9C;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAClC,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GACzC;KACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { RowTitle, RowValue } from '../../certificate-details-parts/row';\nimport { dateShort, l10n } from '../../../utils';\n\ninterface ISshBasicInformationProps {\n serialNumber: string;\n validity: string;\n notBefore: Date;\n notAfter: Date;\n type: string;\n keyId: string;\n principals: string[];\n extensions: Record<string, string>;\n criticalOptions: Record<string, string>;\n}\n\nexport const SshBasicInformation: FunctionalComponent<ISshBasicInformationProps> = (props) => {\n const {\n serialNumber,\n validity,\n notBefore,\n notAfter,\n type,\n keyId,\n principals,\n extensions,\n criticalOptions,\n } = props;\n\n return [\n <RowTitle\n value={l10n.getString('basicInformation')}\n />,\n <RowValue\n name={l10n.getString('type')}\n value={type}\n />,\n <RowValue\n name={l10n.getString('serialNumber')}\n value={serialNumber}\n monospace\n />,\n <RowValue\n name={l10n.getString('validity')}\n value={validity}\n />,\n <RowValue\n name={l10n.getString('issued')}\n value={notBefore ? dateShort(notBefore) : undefined}\n />,\n <RowValue\n name={l10n.getString('expired')}\n value={notAfter ? dateShort(notAfter) : undefined}\n />,\n <RowValue\n name={l10n.getString('keyId')}\n value={keyId}\n />,\n <RowValue\n name={l10n.getString('principals')}\n value={principals.join(', ')}\n />,\n <RowValue\n name={l10n.getString('criticalOptions')}\n value={Object.keys(criticalOptions).join(', ')}\n />,\n <RowValue\n name={l10n.getString('extensions')}\n value={Object.keys(extensions).join(', ')}\n />,\n ];\n};\n"]}
@@ -0,0 +1,26 @@
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 { l10n, getStringByOID } from "../../../utils";
13
+ import { RowTitle, RowValue, } from "../../certificate-details-parts/row";
14
+ export const SshPublicKey = (props) => {
15
+ const { key } = props;
16
+ if (!key) {
17
+ return null;
18
+ }
19
+ return [
20
+ h(RowTitle, { value: l10n.getString('publicKeyInfo') }),
21
+ h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
22
+ h(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
23
+ h(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
24
+ ];
25
+ };
26
+ //# sourceMappingURL=public_key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public_key.js","sourceRoot":"","sources":["../../../../src/components/ssh-certificate-viewer/-components/public_key.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,QAAQ,GACT,MAAM,qCAAqC,CAAC;AAM7C,MAAM,CAAC,MAAM,YAAY,GAA4C,CAAC,KAAK,EAAE,EAAE;IAC7E,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAEtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,GACtC;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EACjC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,GACpC;QACF,EAAC,QAAQ,IACP,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAE,GAAG,CAAC,UAAU,EACrB,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,SAAS,QACT,QAAQ,SACR;KACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshPublicKeyProps {\n key: SshCertificate['publicKey'];\n}\n\nexport const SshPublicKey: FunctionalComponent<ISshPublicKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('publicKeyInfo')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\n />,\n ];\n};\n"]}
@@ -0,0 +1,26 @@
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 { l10n, getStringByOID } from "../../../utils";
13
+ import { RowTitle, RowValue, } from "../../certificate-details-parts/row";
14
+ export const SshSignatureKey = (props) => {
15
+ const { key } = props;
16
+ if (!key) {
17
+ return null;
18
+ }
19
+ return [
20
+ h(RowTitle, { value: l10n.getString('signingCA') }),
21
+ h(RowValue, { name: l10n.getString('algorithm'), value: getStringByOID(key.algorithm) }),
22
+ h(RowValue, { name: "Thumbprint (SHA-256)", value: key.thumbprint, monospace: true }),
23
+ h(RowValue, { name: l10n.getString('value'), value: key.value, monospace: true, collapse: true }),
24
+ ];
25
+ };
26
+ //# sourceMappingURL=signature_key.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signature_key.js","sourceRoot":"","sources":["../../../../src/components/ssh-certificate-viewer/-components/signature_key.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,CAAC,EAAuB,MAAM,eAAe,CAAC;AAEvD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EACL,QAAQ,EACR,QAAQ,GACT,MAAM,qCAAqC,CAAC;AAM7C,MAAM,CAAC,MAAM,eAAe,GAA+C,CAAC,KAAK,EAAE,EAAE;IACnF,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IAEtB,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,EAAC,QAAQ,IACP,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,GAClC;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EACjC,KAAK,EAAE,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,GACpC;QACF,EAAC,QAAQ,IACP,IAAI,EAAC,sBAAsB,EAC3B,KAAK,EAAE,GAAG,CAAC,UAAU,EACrB,SAAS,SACT;QACF,EAAC,QAAQ,IACP,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAC7B,KAAK,EAAE,GAAG,CAAC,KAAK,EAChB,SAAS,QACT,QAAQ,SACR;KACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { h, FunctionalComponent } from '@stencil/core';\nimport { SshCertificate } from '../../../crypto';\nimport { l10n, getStringByOID } from '../../../utils';\nimport {\n RowTitle,\n RowValue,\n} from '../../certificate-details-parts/row';\n\ninterface ISshSignatureKeyProps {\n key: SshCertificate['signatureKey'];\n}\n\nexport const SshSignatureKey: FunctionalComponent<ISshSignatureKeyProps> = (props) => {\n const { key } = props;\n\n if (!key) {\n return null;\n }\n\n return [\n <RowTitle\n value={l10n.getString('signingCA')}\n />,\n <RowValue\n name={l10n.getString('algorithm')}\n value={getStringByOID(key.algorithm)}\n />,\n <RowValue\n name=\"Thumbprint (SHA-256)\"\n value={key.thumbprint}\n monospace\n />,\n <RowValue\n name={l10n.getString('value')}\n value={key.value}\n monospace\n collapse\n />,\n ];\n};\n"]}
@@ -0,0 +1,193 @@
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, Host, Build, } from "@stencil/core";
12
+ import { SshCertificate } from "../../crypto";
13
+ import { Typography } from "../typography";
14
+ import { SshBasicInformation } from "./-components/basic_information";
15
+ import { SshPublicKey } from "./-components/public_key";
16
+ import { SshSignatureKey } from "./-components/signature_key";
17
+ export class SshCertificateViewer {
18
+ constructor() {
19
+ /**
20
+ * Mobile media query string to control screen view change.
21
+ * <br />
22
+ * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.
23
+ * @example
24
+ * (max-width: 900px)
25
+ */
26
+ this.mobileMediaQueryString = '(max-width: 900px)';
27
+ this.mobileScreenView = false;
28
+ this.isDecodeInProcess = true;
29
+ }
30
+ handleMediaQueryChange(event) {
31
+ this.mobileScreenView = event.matches;
32
+ }
33
+ componentWillLoad() {
34
+ this.decodeCertificate(this.certificate);
35
+ if (Build.isBrowser) {
36
+ this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);
37
+ this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));
38
+ this.mobileScreenView = this.mobileMediaQuery.matches;
39
+ }
40
+ }
41
+ disconnectedCallback() {
42
+ this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));
43
+ }
44
+ async decodeCertificate(certificate) {
45
+ this.isDecodeInProcess = true;
46
+ try {
47
+ if (certificate instanceof SshCertificate) {
48
+ this.certificateDecoded = certificate;
49
+ }
50
+ else if (typeof certificate === 'string') {
51
+ this.certificateDecoded = new SshCertificate(certificate);
52
+ }
53
+ else {
54
+ return;
55
+ }
56
+ // this.certificateDecoded.parseExtensions();
57
+ await this.certificateDecoded.parsePublicKey();
58
+ await this.certificateDecoded.parseSignatureKey();
59
+ }
60
+ catch (error) {
61
+ this.certificateDecodeError = error;
62
+ console.error('Error certificate parse:', error);
63
+ }
64
+ this.isDecodeInProcess = false;
65
+ }
66
+ /**
67
+ * Rerun decodeCertificate if previuos value not equal current value
68
+ */
69
+ watchCertificateAndDecode(newValue, oldValue) {
70
+ if (typeof newValue === 'string' && typeof oldValue === 'string') {
71
+ if (newValue !== oldValue) {
72
+ this.decodeCertificate(newValue);
73
+ }
74
+ return;
75
+ }
76
+ if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {
77
+ if (newValue.serialNumber !== oldValue.serialNumber) {
78
+ this.decodeCertificate(newValue);
79
+ }
80
+ }
81
+ }
82
+ renderErrorState() {
83
+ return (h("div", { class: "status_wrapper" }, h(Typography, null, "There was an error decoding this certificate.")));
84
+ }
85
+ renderEmptyState() {
86
+ return (h("div", { class: "status_wrapper" }, h(Typography, null, "There is no certificate available.")));
87
+ }
88
+ render() {
89
+ if (this.certificateDecodeError) {
90
+ return this.renderErrorState();
91
+ }
92
+ if (!this.certificateDecoded) {
93
+ return this.renderEmptyState();
94
+ }
95
+ return (h(Host, { "data-mobile-screen-view": String(this.mobileScreenView) }, h("table", null, h(SshBasicInformation, Object.assign({}, this.certificateDecoded)), h(SshPublicKey, { key: this.certificateDecoded.publicKey }), h(SshSignatureKey, { key: this.certificateDecoded.signatureKey }))));
96
+ }
97
+ static get is() { return "peculiar-ssh-certificate-viewer"; }
98
+ static get encapsulation() { return "shadow"; }
99
+ static get originalStyleUrls() {
100
+ return {
101
+ "$": ["../certificate-viewer/certificate-viewer.scss"]
102
+ };
103
+ }
104
+ static get styleUrls() {
105
+ return {
106
+ "$": ["../certificate-viewer/certificate-viewer.css"]
107
+ };
108
+ }
109
+ static get properties() {
110
+ return {
111
+ "certificate": {
112
+ "type": "string",
113
+ "attribute": "certificate",
114
+ "mutable": false,
115
+ "complexType": {
116
+ "original": "TSshCertificateProp",
117
+ "resolved": "SshCertificate | string",
118
+ "references": {
119
+ "TSshCertificateProp": {
120
+ "location": "local",
121
+ "path": "/Users/donskov/Documents/work/pv/pv-certificates-viewer/packages/webcomponents/src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx",
122
+ "id": "src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx::TSshCertificateProp"
123
+ }
124
+ }
125
+ },
126
+ "required": false,
127
+ "optional": false,
128
+ "docs": {
129
+ "tags": [],
130
+ "text": "The certificate value for decode and show details. Use PEM or DER."
131
+ },
132
+ "getter": false,
133
+ "setter": false,
134
+ "reflect": true
135
+ },
136
+ "download": {
137
+ "type": "boolean",
138
+ "attribute": "download",
139
+ "mutable": false,
140
+ "complexType": {
141
+ "original": "boolean",
142
+ "resolved": "boolean",
143
+ "references": {}
144
+ },
145
+ "required": false,
146
+ "optional": true,
147
+ "docs": {
148
+ "tags": [],
149
+ "text": "If `true` - component will show split-button to download certificate as PEM or DER."
150
+ },
151
+ "getter": false,
152
+ "setter": false,
153
+ "reflect": true
154
+ },
155
+ "mobileMediaQueryString": {
156
+ "type": "string",
157
+ "attribute": "mobile-media-query-string",
158
+ "mutable": false,
159
+ "complexType": {
160
+ "original": "string",
161
+ "resolved": "string",
162
+ "references": {}
163
+ },
164
+ "required": false,
165
+ "optional": true,
166
+ "docs": {
167
+ "tags": [{
168
+ "name": "example",
169
+ "text": " (max-width: 900px)"
170
+ }],
171
+ "text": "Mobile media query string to control screen view change.\n<br />\n**NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia."
172
+ },
173
+ "getter": false,
174
+ "setter": false,
175
+ "reflect": false,
176
+ "defaultValue": "'(max-width: 900px)'"
177
+ }
178
+ };
179
+ }
180
+ static get states() {
181
+ return {
182
+ "mobileScreenView": {},
183
+ "isDecodeInProcess": {}
184
+ };
185
+ }
186
+ static get watchers() {
187
+ return [{
188
+ "propName": "certificate",
189
+ "methodName": "watchCertificateAndDecode"
190
+ }];
191
+ }
192
+ }
193
+ //# sourceMappingURL=ssh-certificate-viewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ssh-certificate-viewer.js","sourceRoot":"","sources":["../../../src/components/ssh-certificate-viewer/ssh-certificate-viewer.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EACL,SAAS,EACT,CAAC,EACD,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ACP,CAAC;IACJ,CAAC;IAEO,gBAAgB;QACtB,OAAO,CACL,WAAK,KAAK,EAAC,gBAAgB;YACzB,EAAC,UAAU,6CAEE,CACT,CACP,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,IAAI,IAAI,CAAC,sBAAsB,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACjC,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC7B,OAAO,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACjC,CAAC;QAED,OAAO,CACL,EAAC,IAAI,+BACsB,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC;YAEtD;gBACE,EAAC,mBAAmB,oBACd,IAAI,CAAC,kBAAkB,EAC3B;gBAEF,EAAC,YAAY,IACX,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,SAAS,GACtC;gBAEF,EAAC,eAAe,IACd,GAAG,EAAE,IAAI,CAAC,kBAAkB,CAAC,YAAY,GACzC,CACI,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["/**\n * @license\n * Copyright (c) Peculiar Ventures, LLC.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport {\n Component,\n h,\n Prop,\n State,\n Watch,\n Host,\n Build,\n} from '@stencil/core';\nimport { SshCertificate } from '../../crypto';\nimport { Typography } from '../typography';\nimport { SshBasicInformation } from './-components/basic_information';\nimport { SshPublicKey } from './-components/public_key';\nimport { SshSignatureKey } from './-components/signature_key';\n\nexport type TSshCertificateProp = string | SshCertificate;\n\n@Component({\n tag: 'peculiar-ssh-certificate-viewer',\n styleUrl: '../certificate-viewer/certificate-viewer.scss',\n shadow: true,\n})\nexport class SshCertificateViewer {\n private certificateDecoded: SshCertificate;\n\n private certificateDecodeError: Error;\n\n private mobileMediaQuery: MediaQueryList;\n\n /**\n * The certificate value for decode and show details. Use PEM or DER.\n */\n @Prop({ reflect: true }) certificate: TSshCertificateProp;\n\n /**\n * If `true` - component will show split-button to download certificate as PEM or DER.\n */\n @Prop({ reflect: true }) download?: boolean;\n\n /**\n * Mobile media query string to control screen view change.\n * <br />\n * **NOTE**: Based on https://developer.mozilla.org/en-US/docs/Web/API/Window/matchMedia.\n * @example\n * (max-width: 900px)\n */\n @Prop({ reflect: false }) mobileMediaQueryString?: string = '(max-width: 900px)';\n\n @State() mobileScreenView = false;\n\n @State() isDecodeInProcess = true;\n\n private handleMediaQueryChange(event: MediaQueryListEvent) {\n this.mobileScreenView = event.matches;\n }\n\n componentWillLoad() {\n this.decodeCertificate(this.certificate);\n\n if (Build.isBrowser) {\n this.mobileMediaQuery = window.matchMedia(this.mobileMediaQueryString);\n this.mobileMediaQuery.addEventListener('change', this.handleMediaQueryChange.bind(this));\n this.mobileScreenView = this.mobileMediaQuery.matches;\n }\n }\n\n disconnectedCallback() {\n this.mobileMediaQuery.removeEventListener('change', this.handleMediaQueryChange.bind(this));\n }\n\n private async decodeCertificate(certificate: TSshCertificateProp) {\n this.isDecodeInProcess = true;\n\n try {\n if (certificate instanceof SshCertificate) {\n this.certificateDecoded = certificate;\n } else if (typeof certificate === 'string') {\n this.certificateDecoded = new SshCertificate(certificate);\n } else {\n return;\n }\n\n // this.certificateDecoded.parseExtensions();\n await this.certificateDecoded.parsePublicKey();\n await this.certificateDecoded.parseSignatureKey();\n } catch (error) {\n this.certificateDecodeError = error;\n\n console.error('Error certificate parse:', error);\n }\n\n this.isDecodeInProcess = false;\n }\n\n /**\n * Rerun decodeCertificate if previuos value not equal current value\n */\n @Watch('certificate')\n watchCertificateAndDecode(newValue: TSshCertificateProp, oldValue: TSshCertificateProp) {\n if (typeof newValue === 'string' && typeof oldValue === 'string') {\n if (newValue !== oldValue) {\n this.decodeCertificate(newValue);\n }\n\n return;\n }\n\n if (newValue instanceof SshCertificate && oldValue instanceof SshCertificate) {\n if (newValue.serialNumber !== oldValue.serialNumber) {\n this.decodeCertificate(newValue);\n }\n }\n }\n\n private renderErrorState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There was an error decoding this certificate.\n </Typography>\n </div>\n );\n }\n\n private renderEmptyState() {\n return (\n <div class=\"status_wrapper\">\n <Typography>\n There is no certificate available.\n </Typography>\n </div>\n );\n }\n\n render() {\n if (this.certificateDecodeError) {\n return this.renderErrorState();\n }\n\n if (!this.certificateDecoded) {\n return this.renderEmptyState();\n }\n\n return (\n <Host\n data-mobile-screen-view={String(this.mobileScreenView)}\n >\n <table>\n <SshBasicInformation\n {...this.certificateDecoded}\n />\n\n <SshPublicKey\n key={this.certificateDecoded.publicKey}\n />\n\n <SshSignatureKey\n key={this.certificateDecoded.signatureKey}\n />\n </table>\n </Host>\n );\n }\n}\n"]}
@@ -1235,6 +1235,7 @@ export const OIDs = {
1235
1235
  '1.3.6.1.4.1.16334.509.2.3': 'Ngc Class3',
1236
1236
  '1.3.6.1.4.1.17326.10.8.12.1.2': 'Camerfirma EV policy',
1237
1237
  '1.3.6.1.4.1.17326.10.14.2.1.2': 'Camerfirma EV policy',
1238
+ '1.3.6.1.4.1.22112.2.1': 'Private Key Possession Statement',
1238
1239
  '1.3.6.1.4.1.22234.2.5.2.3.1': 'Cert Plus EV policy',
1239
1240
  '1.3.6.1.4.1.23223.1.1.1': 'Start Com EV policy',
1240
1241
  '1.3.6.1.4.1.23629.1.4.2.1.1': 'Safenet Usage Limit',
@@ -1628,6 +1629,7 @@ export const OIDs = {
1628
1629
  '1.3.132.0.37': 'Sect409r1',
1629
1630
  '1.3.132.0.38': 'Sect571k1',
1630
1631
  '1.3.132.0.39': 'Sect571r1',
1632
+ '1.3.132.1.12': 'ECDH',
1631
1633
  '1.3.133.16.840.9.84': 'x984',
1632
1634
  '1.3.133.16.840.9.84.0': 'x984 Module',
1633
1635
  '1.3.133.16.840.9.84.0.1': 'x984 Biometrics',