@peculiar/certificates-viewer 4.7.1-alpha.1 → 4.7.1-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/attribute-certificate-viewer.js +2 -2
- package/components/attribute.js +1 -1
- package/components/certificate-chain-viewer.js +1 -1
- package/components/certificate-viewer.js +2 -2
- package/components/crl-viewer.js +2 -2
- package/components/csr-viewer.js +1 -1
- package/components/download.js +14323 -17
- package/components/download.js.map +1 -1
- package/components/index.js +1 -2
- package/components/index.js.map +1 -1
- package/components/index2.js +1 -1
- package/components/issuer_name.js +1 -1
- package/components/miscellaneous.js +1 -2
- package/components/miscellaneous.js.map +1 -1
- package/components/peculiar-certificate-decoder.js +2 -2
- package/components/peculiar-certificate-decoder.js.map +1 -1
- package/components/peculiar-certificates-viewer.js +1 -2
- package/components/peculiar-certificates-viewer.js.map +1 -1
- package/components/pkcs10_certificate_request.js +2 -2
- package/components/row.js +1 -1
- package/components/ssh-certificate-viewer.js +23 -6
- package/components/ssh-certificate-viewer.js.map +1 -1
- package/components/subject_name.js +1 -1
- package/components/utils.js +39 -0
- package/components/utils.js.map +1 -0
- package/dist/cjs/{extension-D8YKlAu4.js → extension-CjXYQXbF.js} +3 -3
- package/dist/cjs/{extension-D8YKlAu4.js.map → extension-CjXYQXbF.js.map} +1 -1
- package/dist/cjs/index.cjs.js +2 -2
- package/dist/cjs/{miscellaneous-DvVSM5KJ.js → miscellaneous-7gtHz795.js} +4 -4
- package/dist/cjs/{miscellaneous-DvVSM5KJ.js.map → miscellaneous-7gtHz795.js.map} +1 -1
- 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 -1
- package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js +27 -10
- package/dist/cjs/peculiar-attribute-certificate-viewer_5.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js +6 -6
- package/dist/cjs/peculiar-certificate-decoder.cjs.entry.js.map +1 -1
- package/dist/cjs/peculiar-certificate-decoder.entry.cjs.js.map +1 -1
- package/dist/cjs/peculiar-certificate-viewer.cjs.entry.js +4 -4
- package/dist/cjs/peculiar-certificates-viewer.cjs.entry.js +3 -3
- package/dist/cjs/{pkcs10_certificate_request-BoHhadiA.js → pkcs10_certificate_request-CIOxDu_Z.js} +3 -3
- package/dist/cjs/{pkcs10_certificate_request-BoHhadiA.js.map → pkcs10_certificate_request-CIOxDu_Z.js.map} +1 -1
- package/dist/cjs/{ssh_certificate-s3-rwdMT.js → ssh_certificate-DnXj2sM0.js} +13 -2
- package/dist/cjs/ssh_certificate-DnXj2sM0.js.map +1 -0
- package/dist/cjs/{x509_certificate-DfXuxxZp.js → x509_certificate-DPgu-mwG.js} +4 -4
- package/dist/cjs/{x509_certificate-DfXuxxZp.js.map → x509_certificate-DPgu-mwG.js.map} +1 -1
- package/dist/cjs/{x509_crl-CxJ2lyGX.js → x509_crl-D_DKkGcn.js} +5 -5
- package/dist/cjs/{x509_crl-CxJ2lyGX.js.map → x509_crl-D_DKkGcn.js.map} +1 -1
- package/dist/collection/components/certificate-decoder/certificate-decoder.js +1 -1
- package/dist/collection/components/certificate-decoder/certificate-decoder.js.map +1 -1
- package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js +3 -3
- package/dist/collection/components/ssh-certificate-viewer/-components/basic_information.js.map +1 -1
- package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js +23 -0
- package/dist/collection/components/ssh-certificate-viewer/-components/miscellaneous.js.map +1 -0
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js +2 -1
- package/dist/collection/components/ssh-certificate-viewer/ssh-certificate-viewer.js.map +1 -1
- package/dist/collection/crypto/ssh_certificate.js +7 -1
- package/dist/collection/crypto/ssh_certificate.js.map +1 -1
- package/dist/collection/utils/download.js +5 -0
- package/dist/collection/utils/download.js.map +1 -1
- package/dist/esm/{extension-oK2qpCU6.js → extension-B3br1_Py.js} +3 -3
- package/dist/esm/{extension-oK2qpCU6.js.map → extension-B3br1_Py.js.map} +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/{miscellaneous-DrmTXljc.js → miscellaneous-phHcBJWR.js} +4 -4
- package/dist/esm/{miscellaneous-DrmTXljc.js.map → miscellaneous-phHcBJWR.js.map} +1 -1
- 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 -1
- package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js +28 -11
- package/dist/esm/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-decoder.entry.js +6 -6
- package/dist/esm/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm/peculiar-certificate-viewer.entry.js +4 -4
- package/dist/esm/peculiar-certificates-viewer.entry.js +3 -3
- package/dist/esm/{pkcs10_certificate_request-Bdt_qA_g.js → pkcs10_certificate_request-HIoLPXGQ.js} +3 -3
- package/dist/esm/{pkcs10_certificate_request-Bdt_qA_g.js.map → pkcs10_certificate_request-HIoLPXGQ.js.map} +1 -1
- package/dist/esm/{ssh_certificate-Ct-r021h.js → ssh_certificate-rmToyzuK.js} +13 -2
- package/dist/esm/ssh_certificate-rmToyzuK.js.map +1 -0
- package/dist/esm/{x509_certificate-5DEbrOA7.js → x509_certificate-C1VvfHQ5.js} +4 -4
- package/dist/{esm-es5/x509_certificate-5DEbrOA7.js.map → esm/x509_certificate-C1VvfHQ5.js.map} +1 -1
- package/dist/esm/{x509_crl-CPgNUkh7.js → x509_crl-rfnWQkGD.js} +5 -5
- package/dist/esm/{x509_crl-CPgNUkh7.js.map → x509_crl-rfnWQkGD.js.map} +1 -1
- package/dist/esm-es5/{extension-oK2qpCU6.js → extension-B3br1_Py.js} +2 -2
- package/dist/esm-es5/{extension-oK2qpCU6.js.map → extension-B3br1_Py.js.map} +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/esm-es5/{miscellaneous-DrmTXljc.js → miscellaneous-phHcBJWR.js} +2 -2
- package/dist/esm-es5/{miscellaneous-DrmTXljc.js.map → miscellaneous-phHcBJWR.js.map} +1 -1
- 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 -1
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js +10 -3
- package/dist/esm-es5/peculiar-attribute-certificate-viewer_5.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificate-decoder.entry.js.map +1 -1
- package/dist/esm-es5/peculiar-certificate-viewer.entry.js +1 -1
- package/dist/esm-es5/peculiar-certificates-viewer.entry.js +1 -1
- package/dist/esm-es5/{pkcs10_certificate_request-Bdt_qA_g.js → pkcs10_certificate_request-HIoLPXGQ.js} +2 -2
- package/dist/esm-es5/{pkcs10_certificate_request-Bdt_qA_g.js.map → pkcs10_certificate_request-HIoLPXGQ.js.map} +1 -1
- package/dist/esm-es5/{ssh_certificate-Ct-r021h.js → ssh_certificate-rmToyzuK.js} +3 -3
- package/dist/esm-es5/ssh_certificate-rmToyzuK.js.map +1 -0
- package/dist/esm-es5/{x509_certificate-5DEbrOA7.js → x509_certificate-C1VvfHQ5.js} +2 -2
- package/dist/{esm/x509_certificate-5DEbrOA7.js.map → esm-es5/x509_certificate-C1VvfHQ5.js.map} +1 -1
- package/dist/esm-es5/{x509_crl-CPgNUkh7.js → x509_crl-rfnWQkGD.js} +2 -2
- package/dist/esm-es5/{x509_crl-CPgNUkh7.js.map → x509_crl-rfnWQkGD.js.map} +1 -1
- package/dist/peculiar/index.esm.js +1 -1
- package/dist/peculiar/{p-83a53b4f.entry.js → p-019339d6.entry.js} +2 -2
- package/dist/peculiar/{p-0b895a8e.entry.js → p-04422929.entry.js} +2 -2
- package/dist/peculiar/{p-da9eb1e7.entry.js → p-154dd0da.entry.js} +2 -2
- package/dist/peculiar/{p-da9eb1e7.entry.js.map → p-154dd0da.entry.js.map} +1 -1
- package/dist/peculiar/{p-11434880.system.entry.js → p-3685975d.system.entry.js} +2 -2
- package/dist/peculiar/{p-fd98bb82.system.entry.js → p-6f0f2749.system.entry.js} +3 -3
- package/dist/peculiar/{p-fd98bb82.system.entry.js.map → p-6f0f2749.system.entry.js.map} +1 -1
- package/dist/peculiar/{p-62b723f6.entry.js → p-7385d0bb.entry.js} +29 -22
- package/dist/peculiar/p-7385d0bb.entry.js.map +1 -0
- package/dist/peculiar/{p-5df0f22b.system.entry.js → p-872f7312.system.entry.js} +29 -22
- package/dist/peculiar/p-872f7312.system.entry.js.map +1 -0
- package/dist/peculiar/{p-DOpiv0-8.js → p-B1eGYq5U.js} +3 -3
- package/dist/peculiar/{p-DOpiv0-8.js.map → p-B1eGYq5U.js.map} +1 -1
- package/dist/peculiar/{p-C31rbtuG.system.js → p-B2GW-g6v.system.js} +2 -2
- package/dist/peculiar/p-B2GW-g6v.system.js.map +1 -0
- package/dist/peculiar/{p-B2G7qjfV.js → p-B8_0p5ke.js} +40 -40
- package/dist/peculiar/{p-B2G7qjfV.js.map → p-B8_0p5ke.js.map} +1 -1
- package/dist/peculiar/p-BGASC3UX.system.js +1 -1
- package/dist/peculiar/{p-BCsPspKr.system.js.map → p-BdfvItQB.system.js.map} +1 -1
- package/dist/peculiar/p-BtqN4pgo.js +12 -0
- package/dist/peculiar/{p-BGIWeG8l.js.map → p-BtqN4pgo.js.map} +1 -1
- package/dist/peculiar/{p-2GQYAR0v.system.js → p-CTksa0ml.system.js} +2 -2
- package/dist/peculiar/{p-2GQYAR0v.system.js.map → p-CTksa0ml.system.js.map} +1 -1
- package/dist/peculiar/{p-RWPI76Dh.js → p-CYFfXlCT.js} +4 -4
- package/dist/peculiar/{p-RWPI76Dh.js.map → p-CYFfXlCT.js.map} +1 -1
- package/dist/peculiar/{p-D9qq15zG.js → p-CkePJXWQ.js} +4 -4
- package/dist/peculiar/{p-D9qq15zG.js.map → p-CkePJXWQ.js.map} +1 -1
- package/dist/peculiar/{p-LmKU8Smy.system.js.map → p-CuX3t1Hg.system.js.map} +1 -1
- package/dist/peculiar/{p-CxtUQdcj.system.js.map → p-Cv-b9S6H.system.js.map} +1 -1
- package/dist/peculiar/p-D0w6miI2.system.js +12 -0
- package/dist/peculiar/{p-IOtHTzYC.system.js.map → p-D0w6miI2.system.js.map} +1 -1
- package/dist/peculiar/p-DOFJd-ye.system.js.map +1 -0
- package/dist/peculiar/{p-zQwWLfga.system.js → p-DkshB-5z.system.js} +4 -4
- package/dist/peculiar/{p-zQwWLfga.system.js.map → p-DkshB-5z.system.js.map} +1 -1
- package/dist/peculiar/{p-BeVuAzsd.system.js → p-DorRvFf7.system.js} +39 -39
- package/dist/peculiar/{p-BeVuAzsd.system.js.map → p-DorRvFf7.system.js.map} +1 -1
- package/dist/peculiar/{p-BQiABBi1.system.js → p-ZxTK29QB.system.js} +2 -2
- package/dist/peculiar/{p-BQiABBi1.system.js.map → p-ZxTK29QB.system.js.map} +1 -1
- package/dist/peculiar/{p-364fd32b.system.entry.js → p-a4454e2d.system.entry.js} +2 -2
- package/dist/peculiar/{p-ClkgAXnd.system.js → p-kq9wAWxW.system.js} +3 -3
- package/dist/peculiar/p-kq9wAWxW.system.js.map +1 -0
- package/dist/peculiar/{p-Ct-r021h.js → p-rmToyzuK.js} +3 -3
- package/dist/peculiar/p-rmToyzuK.js.map +1 -0
- 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 -1
- package/dist/peculiar/peculiar-certificate-decoder.entry.esm.js.map +1 -1
- package/dist/peculiar/peculiar.esm.js +1 -1
- package/dist/types/components/ssh-certificate-viewer/-components/miscellaneous.d.ts +14 -0
- package/dist/types/crypto/ssh_certificate.d.ts +2 -0
- package/dist/types/utils/download.d.ts +3 -0
- package/hydrate/index.js +33 -5
- package/hydrate/index.mjs +33 -5
- package/package.json +2 -2
- package/components/link.js +0 -14335
- package/components/link.js.map +0 -1
- package/dist/cjs/ssh_certificate-s3-rwdMT.js.map +0 -1
- package/dist/esm/ssh_certificate-Ct-r021h.js.map +0 -1
- package/dist/esm-es5/ssh_certificate-Ct-r021h.js.map +0 -1
- package/dist/peculiar/p-5df0f22b.system.entry.js.map +0 -1
- package/dist/peculiar/p-62b723f6.entry.js.map +0 -1
- package/dist/peculiar/p-BGIWeG8l.js +0 -12
- package/dist/peculiar/p-C31rbtuG.system.js.map +0 -1
- package/dist/peculiar/p-Ce-IF7_R.system.js.map +0 -1
- package/dist/peculiar/p-ClkgAXnd.system.js.map +0 -1
- package/dist/peculiar/p-Ct-r021h.js.map +0 -1
- package/dist/peculiar/p-IOtHTzYC.system.js +0 -12
- /package/dist/peculiar/{p-83a53b4f.entry.js.map → p-019339d6.entry.js.map} +0 -0
- /package/dist/peculiar/{p-0b895a8e.entry.js.map → p-04422929.entry.js.map} +0 -0
- /package/dist/peculiar/{p-11434880.system.entry.js.map → p-3685975d.system.entry.js.map} +0 -0
- /package/dist/peculiar/{p-364fd32b.system.entry.js.map → p-a4454e2d.system.entry.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var __extends=this&&this.__extends||function(){var t=function(n,e){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)if(Object.prototype.hasOwnProperty.call(n,e))t[e]=n[e]};return t(n,e)};return function(n,e){if(typeof e!=="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");t(n,e);function r(){this.constructor=n}n.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}}();var __awaiter=this&&this.__awaiter||function(t,n,e,r){function i(t){return t instanceof e?t:new e((function(n){n(t)}))}return new(e||(e=Promise))((function(e,u){function o(t){try{s(r.next(t))}catch(t){u(t)}}function c(t){try{s(r["throw"](t))}catch(t){u(t)}}function s(t){t.done?e(t.value):i(t.value).then(o,c)}s((r=r.apply(t,n||[])).next())}))};var __generator=this&&this.__generator||function(t,n){var e={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]},r,i,u,o;return o={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function c(t){return function(n){return s([t,n])}}function s(c){if(r)throw new TypeError("Generator is already executing.");while(o&&(o=0,c[0]&&(e=0)),e)try{if(r=1,i&&(u=c[0]&2?i["return"]:c[0]?i["throw"]||((u=i["return"])&&u.call(i),0):i.next)&&!(u=u.call(i,c[1])).done)return u;if(i=0,u)c=[c[0]&2,u.value];switch(c[0]){case 0:case 1:u=c;break;case 4:e.label++;return{value:c[1],done:false};case 5:e.label++;i=c[1];c=[0];continue;case 7:c=e.ops.pop();e.trys.pop();continue;default:if(!(u=e.trys,u=u.length>0&&u[u.length-1])&&(c[0]===6||c[0]===2)){e=0;continue}if(c[0]===3&&(!u||c[1]>u[0]&&c[1]<u[3])){e.label=c[1];break}if(c[0]===6&&e.label<u[1]){e.label=u[1];u=c;break}if(u&&e.label<u[2]){e.label=u[2];e.ops.push(c);break}if(u[2])e.ops.pop();e.trys.pop();continue}c=n.call(t,e)}catch(t){c=[6,t];i=0}finally{r=u=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
-
*/System.register(["./p-
|
|
4
|
+
*/System.register(["./p-kq9wAWxW.system.js","./p-D0w6miI2.system.js","./p-DkshB-5z.system.js"],(function(t){"use strict";var n,e,r,i,u,o,c,s,a,f,h,l,v;return{setters:[function(t){n=t.A;e=t.c;r=t.n;i=t.P;u=t.b;o=t.a;c=t.e;s=t.m;a=t.D;f=t.o;h=t.N},function(t){l=t.E},function(t){v=t.A}],execute:function(){
|
|
5
5
|
/**
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright (c) Peculiar Ventures, LLC.
|
|
@@ -17,4 +17,4 @@ var w=function(t){__extends(n,t);function n(n){var c;var s=t.call(this,e(n),r)||
|
|
|
17
17
|
* This source code is licensed under the MIT license found in the
|
|
18
18
|
* LICENSE file in the root directory of this source tree.
|
|
19
19
|
*/var b=function(t){__extends(n,t);function n(n){var r=t.call(this,e(n),f)||this;r.thumbprints={};r.type="X.509 Certificate Revocation List";r.tag=i.CrlTag;var u=r.asn.tbsCertList;r.issuer=new h(u.issuer).toJSON();r.version=u.version+1;r.lastUpdate=u.thisUpdate.getTime();r.nextUpdate=u.nextUpdate.getTime();r.revokedCertificates=(u.revokedCertificates||[]).map((function(t){var n;return{revocationDate:t.revocationDate,userCertificate:t.userCertificate,crlEntryExtensions:(n=t.crlEntryExtensions)===null||n===void 0?void 0:n.map((function(t){return new l(c.serialize(t))}))}}));return r}n.prototype.getThumbprint=function(){return __awaiter(this,arguments,void 0,(function(t){var n,e;if(t===void 0){t="SHA-1"}return __generator(this,(function(r){switch(r.label){case 0:r.trys.push([0,2,,3]);return[4,s(t,this.raw)];case 1:n=r.sent();if(n){this.thumbprints[t]=u.Convert.ToHex(n)}return[3,3];case 2:e=r.sent();console.error("Error thumbprint get:",e);return[3,3];case 3:return[2]}}))}))};Object.defineProperty(n.prototype,"signature",{get:function(){var t=this.asn,n=t.signature,e=t.signatureAlgorithm;return{value:n,algorithm:e.algorithm}},enumerable:false,configurable:true});Object.defineProperty(n.prototype,"commonName",{get:function(){if(!this.issuer){return""}for(var t=0;t<this.issuer.length;t+=1){var n=this.issuer[t];if(n.shortName==="CN"||n.shortName==="E"||n.shortName==="O"){return n.value}}return""},enumerable:false,configurable:true});n.prototype.parseExtensions=function(){var t=this.asn.tbsCertList;if(t.crlExtensions){this.extensions=t.crlExtensions.map((function(t){return new l(c.serialize(t))}))}};n.prototype.toString=function(t){if(t===void 0){t="pem"}switch(t){case"pem":return i.encode(this.raw,this.tag);case"base64url":return u.Convert.ToBase64Url(this.raw);default:return u.Convert.ToBase64(this.raw)}};n.prototype.downloadAsPEM=function(t){a.crl.asPEM(this.toString("pem"),t||this.commonName)};n.prototype.downloadAsDER=function(t){a.crl.asDER(this.raw,t||this.commonName)};return n}(n);t("a",b)}}}));
|
|
20
|
-
//# sourceMappingURL=p-
|
|
20
|
+
//# sourceMappingURL=p-ZxTK29QB.system.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"p-BQiABBi1.system.js","sources":["src/crypto/x509_attribute_certificate.ts","src/crypto/x509_crl.ts"],"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 type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public readonly type = 'X.509 Attribute Certificate';\n\n public readonly tag = PemConverter.AttributeCertificateTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error('Cannot get \\'notBefore\\' value');\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error('Cannot get \\'notAfter\\' value');\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n","/**\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 */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class X509Crl extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'X.509 Certificate Revocation List';\n\n public readonly tag = PemConverter.CrlTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["Convert"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"p-ZxTK29QB.system.js","sources":["src/crypto/x509_attribute_certificate.ts","src/crypto/x509_crl.ts"],"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 type { GeneralName } from '@peculiar/asn1-x509';\nimport { AttributeCertificate, Holder } from '@peculiar/asn1-x509-attr';\nimport { Convert } from 'pvtsutils';\nimport { dateDiff, Download } from '../utils';\nimport { AsnData } from './asn_data';\nimport { Extension, TExtensionValue } from './extension';\nimport { Attribute, TAttributeValue } from './attribute';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport class X509AttributeCertificate extends AsnData<AttributeCertificate> {\n public readonly serialNumber: string;\n\n public readonly version: number;\n\n public readonly notBefore: Date;\n\n public readonly notAfter: Date;\n\n public readonly validity: string;\n\n public extensions: Extension<TExtensionValue>[];\n\n public attributes: Attribute<TAttributeValue>[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly issuer: GeneralName[];\n\n public holder: Holder;\n\n public readonly type = 'X.509 Attribute Certificate';\n\n public readonly tag = PemConverter.AttributeCertificateTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), AttributeCertificate);\n\n const { acinfo } = this.asn;\n\n this.serialNumber = Convert.ToHex(acinfo.serialNumber);\n this.version = acinfo.version;\n\n const notBefore = acinfo.attrCertValidityPeriod.notBeforeTime;\n\n if (!notBefore) {\n throw new Error('Cannot get \\'notBefore\\' value');\n }\n\n this.notBefore = notBefore;\n\n const notAfter = acinfo.attrCertValidityPeriod.notAfterTime;\n\n if (!notAfter) {\n throw new Error('Cannot get \\'notAfter\\' value');\n }\n\n this.notAfter = notAfter;\n this.validity = dateDiff(this.notBefore, this.notAfter);\n this.issuer = acinfo.issuer.v1Form || acinfo.issuer.v2Form?.issuerName;\n this.holder = acinfo.holder;\n }\n\n public get signature(): ISignature {\n const { signatureValue, signatureAlgorithm } = this.asn;\n\n return {\n value: signatureValue,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public parseExtensions() {\n const { acinfo } = this.asn;\n\n if (acinfo.extensions) {\n this.extensions = acinfo.extensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public parseAttributes() {\n const { acinfo } = this.asn;\n\n if (acinfo.attributes) {\n this.attributes = acinfo.attributes\n .map((e) => new Attribute(AsnConvert.serialize(e)));\n }\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get commonName(): string {\n return `attribute-certificate-${this.thumbprints['SHA-1']}`;\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.attrCert.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.attrCert.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n","/**\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 */\nimport { AsnConvert } from '@peculiar/asn1-schema';\nimport { CertificateList, Time } from '@peculiar/asn1-x509';\nimport { Convert } from 'pvtsutils';\nimport { Download } from '../utils';\nimport { Extension, TExtensionValue } from './extension';\nimport { AsnData } from './asn_data';\nimport { Name, INameJSON } from './name';\nimport { PemConverter } from './pem_converter';\nimport {\n certificateRawToBuffer,\n getCertificateThumbprint,\n} from './utils';\n\ninterface ISignature {\n algorithm: string;\n value: BufferSource;\n}\n\nexport interface IRevokedCertificate {\n userCertificate: ArrayBuffer;\n revocationDate: Time;\n crlEntryExtensions?: Extension<TExtensionValue>[];\n}\n\nexport class X509Crl extends AsnData<CertificateList> {\n public readonly issuer: INameJSON[];\n\n public readonly version: number;\n\n public readonly lastUpdate: Date;\n\n public readonly nextUpdate: Date;\n\n public extensions: Extension<TExtensionValue>[];\n\n public revokedCertificates: IRevokedCertificate[];\n\n public thumbprints: Record<string, string> = {};\n\n public readonly type = 'X.509 Certificate Revocation List';\n\n public readonly tag = PemConverter.CrlTag;\n\n constructor(raw: string) {\n super(certificateRawToBuffer(raw), CertificateList);\n\n const { tbsCertList } = this.asn;\n\n this.issuer = new Name(tbsCertList.issuer).toJSON();\n this.version = tbsCertList.version + 1;\n this.lastUpdate = tbsCertList.thisUpdate.getTime();\n this.nextUpdate = tbsCertList.nextUpdate.getTime();\n\n this.revokedCertificates = (tbsCertList.revokedCertificates || [])\n .map((revokedCertificate) => ({\n revocationDate: revokedCertificate.revocationDate,\n userCertificate: revokedCertificate.userCertificate,\n crlEntryExtensions: revokedCertificate.crlEntryExtensions\n ?.map((e) => new Extension(AsnConvert.serialize(e))),\n }));\n }\n\n public async getThumbprint(\n algorithm = 'SHA-1',\n ): Promise<void> {\n try {\n const thumbprint = await getCertificateThumbprint(algorithm, this.raw);\n\n if (thumbprint) {\n this.thumbprints[algorithm] = Convert.ToHex(thumbprint);\n }\n } catch (error) {\n console.error('Error thumbprint get:', error);\n }\n }\n\n public get signature(): ISignature {\n const { signature, signatureAlgorithm } = this.asn;\n\n return {\n value: signature,\n algorithm: signatureAlgorithm.algorithm,\n };\n }\n\n public get commonName(): string {\n if (!this.issuer) {\n return '';\n }\n\n for (let i = 0; i < this.issuer.length; i += 1) {\n const name = this.issuer[i];\n\n if (name.shortName === 'CN' || name.shortName === 'E' || name.shortName === 'O') {\n return name.value;\n }\n }\n\n return '';\n }\n\n public parseExtensions() {\n const { tbsCertList } = this.asn;\n\n if (tbsCertList.crlExtensions) {\n this.extensions = tbsCertList.crlExtensions\n .map((e) => new Extension(AsnConvert.serialize(e)));\n }\n }\n\n public toString(format: 'pem' | 'base64' | 'base64url' = 'pem'): string {\n switch (format) {\n case 'pem':\n return PemConverter.encode(this.raw, this.tag);\n case 'base64url':\n return Convert.ToBase64Url(this.raw);\n default:\n return Convert.ToBase64(this.raw);\n }\n }\n\n public downloadAsPEM(name?: string) {\n Download.crl.asPEM(\n this.toString('pem'),\n name || this.commonName,\n );\n }\n\n public downloadAsDER(name?: string) {\n Download.crl.asDER(\n this.raw,\n name || this.commonName,\n );\n }\n}\n"],"names":["Convert"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
var __awaiter=this&&this.__awaiter||function(t,e,r,a){function o(t){return t instanceof r?t:new r((function(e){e(t)}))}return new(r||(r=Promise))((function(r,i){function s(t){try{c(a.next(t))}catch(t){i(t)}}function n(t){try{c(a["throw"](t))}catch(t){i(t)}}function c(t){t.done?r(t.value):o(t.value).then(s,n)}c((a=a.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var r={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},a,o,i,s;return s={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function n(t){return function(e){return c([t,e])}}function c(n){if(a)throw new TypeError("Generator is already executing.");while(s&&(s=0,n[0]&&(r=0)),r)try{if(a=1,o&&(i=n[0]&2?o["return"]:n[0]?o["throw"]||((i=o["return"])&&i.call(o),0):o.next)&&!(i=i.call(o,n[1])).done)return i;if(o=0,i)n=[n[0]&2,i.value];switch(n[0]){case 0:case 1:i=n;break;case 4:r.label++;return{value:n[1],done:false};case 5:r.label++;o=n[1];n=[0];continue;case 7:n=r.ops.pop();r.trys.pop();continue;default:if(!(i=r.trys,i=i.length>0&&i[i.length-1])&&(n[0]===6||n[0]===2)){r=0;continue}if(n[0]===3&&(!i||n[1]>i[0]&&n[1]<i[3])){r.label=n[1];break}if(n[0]===6&&r.label<i[1]){r.label=i[1];i=n;break}if(i&&r.label<i[2]){r.label=i[2];r.ops.push(n);break}if(i[2])r.ops.pop();r.trys.pop();continue}n=e.call(t,r)}catch(t){n=[6,t];o=0}finally{a=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};
|
|
2
2
|
/*!
|
|
3
3
|
* © Peculiar Ventures https://peculiarventures.com/ - MIT License
|
|
4
|
-
*/System.register(["./p-DKl0YViA.system.js","./p-2GQYAR0v.system.js","./p-ClkgAXnd.system.js","./p-BeVuAzsd.system.js","./p-B4PdAFCr.system.js","./p-IOtHTzYC.system.js","./p-Bknpl7EO.system.js","./p-D8xU284r.system.js"],(function(t){"use strict";var e,r,a,o,i,s,n,c,v,p,l,h,d,b,g,u;return{setters:[function(t){e=t.r;r=t.h;a=t.H},function(t){o=t.X},null,function(t){i=t.B;s=t.S;n=t.I;c=t.P;v=t.a;p=t.T;l=t.E;h=t.g;d=t.b;b=t.c;g=t.M},function(t){u=t.T},null,null,null],execute:function(){var f="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var y=t("peculiar_certificate_viewer",function(){function t(t){var r=this;e(this,t);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(t){var e;return(e=r.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var e;return(e=r.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=function(t){var e;return(e=r.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var e;return(e=r.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)}}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(t instanceof o){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new o(t)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof o&&e instanceof o){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}};t.prototype.getIssuerDnLink=function(){return this.issuerDnLink};t.prototype.renderErrorState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There was an error decoding this certificate."))};t.prototype.renderEmptyState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There is no certificate available."))};t.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return r(a,{"data-mobile-screen-view":String(this.mobileScreenView)},r("table",null,r(i,Object.assign({},this.certificateDecoded)),r(s,{name:this.certificateDecoded.subject}),r(n,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),r(c,{publicKey:this.certificateDecoded.publicKey}),r(v,{signature:this.certificateDecoded.signature}),r(p,{thumbprints:this.certificateDecoded.thumbprints}),r(l,{extensions:this.certificateDecoded.extensions,getLEILink:b,getDNSNameLink:d,getIPAddressLink:h,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&r(g,{certificate:this.certificateDecoded})))};Object.defineProperty(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}());y.style=f}}}));
|
|
5
|
-
//# sourceMappingURL=p-
|
|
4
|
+
*/System.register(["./p-DKl0YViA.system.js","./p-CTksa0ml.system.js","./p-kq9wAWxW.system.js","./p-DorRvFf7.system.js","./p-B4PdAFCr.system.js","./p-D0w6miI2.system.js","./p-Bknpl7EO.system.js","./p-D8xU284r.system.js"],(function(t){"use strict";var e,r,a,o,i,s,n,c,v,p,l,h,d,b,g,u;return{setters:[function(t){e=t.r;r=t.h;a=t.H},function(t){o=t.X},null,function(t){i=t.B;s=t.S;n=t.I;c=t.P;v=t.a;p=t.T;l=t.E;h=t.g;d=t.b;b=t.c;g=t.M},function(t){u=t.T},null,null,null],execute:function(){var f="*{-webkit-box-sizing:border-box;box-sizing:border-box;margin:0;padding:0;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none;-webkit-text-size-adjust:none;-webkit-tap-highlight-color:transparent;font-family:var(--pv-font-family, inherit)}.t-h1{font-weight:var(--pv-text-h1-weight);font-size:var(--pv-text-h1-size);line-height:var(--pv-text-h1-height);letter-spacing:var(--pv-text-h1-spacing)}.t-h2{font-weight:var(--pv-text-h2-weight);font-size:var(--pv-text-h2-size);line-height:var(--pv-text-h2-height);letter-spacing:var(--pv-text-h2-spacing)}.t-h3{font-weight:var(--pv-text-h3-weight);font-size:var(--pv-text-h3-size);line-height:var(--pv-text-h3-height);letter-spacing:var(--pv-text-h3-spacing)}.t-h4{font-weight:var(--pv-text-h4-weight);font-size:var(--pv-text-h4-size);line-height:var(--pv-text-h4-height);letter-spacing:var(--pv-text-h4-spacing)}.t-h5{font-weight:var(--pv-text-h5-weight);font-size:var(--pv-text-h5-size);line-height:var(--pv-text-h5-height);letter-spacing:var(--pv-text-h5-spacing)}.t-s1{font-weight:var(--pv-text-s1-weight);font-size:var(--pv-text-s1-size);line-height:var(--pv-text-s1-height);letter-spacing:var(--pv-text-s1-spacing)}.t-s2{font-weight:var(--pv-text-s2-weight);font-size:var(--pv-text-s2-size);line-height:var(--pv-text-s2-height);letter-spacing:var(--pv-text-s2-spacing)}.t-b1{font-weight:var(--pv-text-b1-weight);font-size:var(--pv-text-b1-size);line-height:var(--pv-text-b1-height);letter-spacing:var(--pv-text-b1-spacing)}.t-b2{font-weight:var(--pv-text-b2-weight);font-size:var(--pv-text-b2-size);line-height:var(--pv-text-b2-height);letter-spacing:var(--pv-text-b2-spacing)}.t-b3{font-weight:var(--pv-text-b3-weight);font-size:var(--pv-text-b3-size);line-height:var(--pv-text-b3-height);letter-spacing:var(--pv-text-b3-spacing)}.t-btn1{font-weight:var(--pv-text-btn1-weight);font-size:var(--pv-text-btn1-size);line-height:var(--pv-text-btn1-height);letter-spacing:var(--pv-text-btn1-spacing)}.t-btn2{font-weight:var(--pv-text-btn2-weight);font-size:var(--pv-text-btn2-size);line-height:var(--pv-text-btn2-height);letter-spacing:var(--pv-text-btn2-spacing)}.t-c1{font-weight:var(--pv-text-c1-weight);font-size:var(--pv-text-c1-size);line-height:var(--pv-text-c1-height);letter-spacing:var(--pv-text-c1-spacing)}.t-c2{font-weight:var(--pv-text-c2-weight);font-size:var(--pv-text-c2-size);line-height:var(--pv-text-c2-height);letter-spacing:var(--pv-text-c2-spacing)}.c-primary-tint-5{--pv-color-base:var(--pv-color-primary-tint-5)}.c-primary-tint-4{--pv-color-base:var(--pv-color-primary-tint-4)}.c-primary-tint-3{--pv-color-base:var(--pv-color-primary-tint-3)}.c-primary-tint-2{--pv-color-base:var(--pv-color-primary-tint-2)}.c-primary-tint-1{--pv-color-base:var(--pv-color-primary-tint-1)}.c-primary{--pv-color-base:var(--pv-color-primary)}.c-primary-shade-1{--pv-color-base:var(--pv-color-primary-shade-1)}.c-primary-shade-2{--pv-color-base:var(--pv-color-primary-shade-2)}.c-primary-shade-3{--pv-color-base:var(--pv-color-primary-shade-3)}.c-primary-shade-4{--pv-color-base:var(--pv-color-primary-shade-4)}.c-primary-shade-5{--pv-color-base:var(--pv-color-primary-shade-5)}.c-primary-contrast{--pv-color-base:var(--pv-color-primary-contrast)}.c-secondary-tint-5{--pv-color-base:var(--pv-color-secondary-tint-5)}.c-secondary-tint-4{--pv-color-base:var(--pv-color-secondary-tint-4)}.c-secondary-tint-3{--pv-color-base:var(--pv-color-secondary-tint-3)}.c-secondary-tint-2{--pv-color-base:var(--pv-color-secondary-tint-2)}.c-secondary-tint-1{--pv-color-base:var(--pv-color-secondary-tint-1)}.c-secondary{--pv-color-base:var(--pv-color-secondary)}.c-secondary-shade-1{--pv-color-base:var(--pv-color-secondary-shade-1)}.c-secondary-shade-2{--pv-color-base:var(--pv-color-secondary-shade-2)}.c-secondary-shade-3{--pv-color-base:var(--pv-color-secondary-shade-3)}.c-secondary-shade-4{--pv-color-base:var(--pv-color-secondary-shade-4)}.c-secondary-shade-5{--pv-color-base:var(--pv-color-secondary-shade-5)}.c-secondary-contrast{--pv-color-base:var(--pv-color-secondary-contrast)}.c-wrong-tint-5{--pv-color-base:var(--pv-color-wrong-tint-5)}.c-wrong-tint-4{--pv-color-base:var(--pv-color-wrong-tint-4)}.c-wrong-tint-3{--pv-color-base:var(--pv-color-wrong-tint-3)}.c-wrong-tint-2{--pv-color-base:var(--pv-color-wrong-tint-2)}.c-wrong-tint-1{--pv-color-base:var(--pv-color-wrong-tint-1)}.c-wrong{--pv-color-base:var(--pv-color-wrong)}.c-wrong-shade-1{--pv-color-base:var(--pv-color-wrong-shade-1)}.c-wrong-shade-2{--pv-color-base:var(--pv-color-wrong-shade-2)}.c-wrong-shade-3{--pv-color-base:var(--pv-color-wrong-shade-3)}.c-wrong-shade-4{--pv-color-base:var(--pv-color-wrong-shade-4)}.c-wrong-shade-5{--pv-color-base:var(--pv-color-wrong-shade-5)}.c-wrong-contrast{--pv-color-base:var(--pv-color-wrong-contrast)}.c-attention-tint-5{--pv-color-base:var(--pv-color-attention-tint-5)}.c-attention-tint-4{--pv-color-base:var(--pv-color-attention-tint-4)}.c-attention-tint-3{--pv-color-base:var(--pv-color-attention-tint-3)}.c-attention-tint-2{--pv-color-base:var(--pv-color-attention-tint-2)}.c-attention-tint-1{--pv-color-base:var(--pv-color-attention-tint-1)}.c-attention{--pv-color-base:var(--pv-color-attention)}.c-attention-shade-1{--pv-color-base:var(--pv-color-attention-shade-1)}.c-attention-shade-2{--pv-color-base:var(--pv-color-attention-shade-2)}.c-attention-shade-3{--pv-color-base:var(--pv-color-attention-shade-3)}.c-attention-shade-4{--pv-color-base:var(--pv-color-attention-shade-4)}.c-attention-shade-5{--pv-color-base:var(--pv-color-attention-shade-5)}.c-success-tint-5{--pv-color-base:var(--pv-color-success-tint-5)}.c-success-tint-4{--pv-color-base:var(--pv-color-success-tint-4)}.c-success-tint-3{--pv-color-base:var(--pv-color-success-tint-3)}.c-success-tint-2{--pv-color-base:var(--pv-color-success-tint-2)}.c-success-tint-1{--pv-color-base:var(--pv-color-success-tint-1)}.c-success{--pv-color-base:var(--pv-color-success)}.c-success-shade-1{--pv-color-base:var(--pv-color-success-shade-1)}.c-success-shade-2{--pv-color-base:var(--pv-color-success-shade-2)}.c-success-shade-3{--pv-color-base:var(--pv-color-success-shade-3)}.c-success-shade-4{--pv-color-base:var(--pv-color-success-shade-4)}.c-success-shade-5{--pv-color-base:var(--pv-color-success-shade-5)}.c-black{--pv-color-base:var(--pv-color-black)}.c-gray-10{--pv-color-base:var(--pv-color-gray-10)}.c-gray-9{--pv-color-base:var(--pv-color-gray-9)}.c-gray-8{--pv-color-base:var(--pv-color-gray-8)}.c-gray-7{--pv-color-base:var(--pv-color-gray-7)}.c-gray-6{--pv-color-base:var(--pv-color-gray-6)}.c-gray-5{--pv-color-base:var(--pv-color-gray-5)}.c-gray-4{--pv-color-base:var(--pv-color-gray-4)}.c-gray-3{--pv-color-base:var(--pv-color-gray-3)}.c-gray-2{--pv-color-base:var(--pv-color-gray-2)}.c-gray-1{--pv-color-base:var(--pv-color-gray-1)}.c-white{--pv-color-base:var(--pv-color-white)}.c-extra-1{--pv-color-base:var(--pv-color-extra-1)}.c-extra-2{--pv-color-base:var(--pv-color-extra-2)}.typography{color:var(--pv-color-base)}.button{display:-ms-inline-flexbox;display:inline-flex;cursor:pointer;background:transparent;border:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;text-decoration:none;outline:none;font-family:inherit;border-radius:4px;height:var(--pv-size-base-6);min-width:var(--pv-size-base-6);padding:0 var(--pv-size-base-2);-webkit-transition:background-color 200ms ease 0s;transition:background-color 200ms ease 0s;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;gap:var(--pv-size-base-2);font-size:0}.button.m_no_padding{padding:0}.button:hover{background-color:var(--pv-color-gray-3)}.button:focus{background-color:var(--pv-color-gray-4)}.button:active{background-color:var(--pv-color-gray-5)}:host{display:block;width:100%;position:relative;min-width:280px;min-height:300px;word-wrap:break-word;word-break:break-word}th,td{border:none}table{width:100%;border-spacing:0;border-collapse:collapse}table tr:last-child .divider{display:none}table td{padding:var(--pv-size-base-2) var(--pv-size-base-4);vertical-align:top}table td:first-child{width:220px}table td:last-child{width:calc(100% - 220px)}table td.monospace{max-width:0}table td.divider{padding:var(--pv-size-base-2) 0}table td.divider span{height:1px;display:block;background-color:var(--pv-color-gray-4)}table .title td{padding-top:var(--pv-size-base-6);padding-bottom:var(--pv-size-base-2)}table table{border-left:1px solid var(--pv-color-gray-5)}.status_wrapper{min-height:inherit;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}:host([data-mobile-screen-view=true]) table,:host([data-mobile-screen-view=true]) tr,:host([data-mobile-screen-view=true]) td{display:block}:host([data-mobile-screen-view=true]) table tr{padding:var(--pv-size-base-2) 0}:host([data-mobile-screen-view=true]) table tr.title{padding-top:var(--pv-size-base-6)}:host([data-mobile-screen-view=true]) table tr.title td{padding:0 var(--pv-size-base-4)}:host([data-mobile-screen-view=true]) table td{padding:0 var(--pv-size-base-4);width:100% !important;max-width:100% !important}:host([data-mobile-screen-view=true]) table td.divider{padding:0}";var y=t("peculiar_certificate_viewer",function(){function t(t){var r=this;e(this,t);this.mobileMediaQueryString="(max-width: 900px)";this.mobileScreenView=false;this.isDecodeInProcess=true;this.getAuthKeyIdParentLink=function(t){var e;return(e=r.authKeyIdParentLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getAuthKeyIdSiblingsLink=function(t){var e;return(e=r.authKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{authKeyId}}",t)};this.getSubjectKeyIdChildrenLink=function(t){var e;return(e=r.subjectKeyIdChildrenLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)};this.getSubjectKeyIdSiblingsLink=function(t){var e;return(e=r.subjectKeyIdSiblingsLink)===null||e===void 0?void 0:e.replace("{{subjectKeyId}}",t)}}t.prototype.handleMediaQueryChange=function(t){this.mobileScreenView=t.matches};t.prototype.componentWillLoad=function(){this.decodeCertificate(this.certificate);{this.mobileMediaQuery=window.matchMedia(this.mobileMediaQueryString);this.mobileMediaQuery.addEventListener("change",this.handleMediaQueryChange.bind(this));this.mobileScreenView=this.mobileMediaQuery.matches}};t.prototype.disconnectedCallback=function(){this.mobileMediaQuery.removeEventListener("change",this.handleMediaQueryChange.bind(this))};t.prototype.decodeCertificate=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){switch(r.label){case 0:this.isDecodeInProcess=true;r.label=1;case 1:r.trys.push([1,4,,5]);if(t instanceof o){this.certificateDecoded=t}else if(typeof t==="string"){this.certificateDecoded=new o(t)}else{return[2]}this.certificateDecoded.parseExtensions();return[4,this.certificateDecoded.getThumbprint("SHA-1")];case 2:r.sent();return[4,this.certificateDecoded.getThumbprint("SHA-256")];case 3:r.sent();return[3,5];case 4:e=r.sent();this.certificateDecodeError=e;console.error("Error certificate parse:",e);return[3,5];case 5:this.isDecodeInProcess=false;return[2]}}))}))};t.prototype.watchCertificateAndDecode=function(t,e){if(typeof t==="string"&&typeof e==="string"){if(t!==e){this.decodeCertificate(t)}return}if(t instanceof o&&e instanceof o){if(t.serialNumber!==e.serialNumber){this.decodeCertificate(t)}}};t.prototype.getIssuerDnLink=function(){return this.issuerDnLink};t.prototype.renderErrorState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There was an error decoding this certificate."))};t.prototype.renderEmptyState=function(){return r("div",{class:"status_wrapper"},r(u,null,"There is no certificate available."))};t.prototype.render=function(){if(this.certificateDecodeError){return this.renderErrorState()}if(!this.certificateDecoded){return this.renderEmptyState()}return r(a,{"data-mobile-screen-view":String(this.mobileScreenView)},r("table",null,r(i,Object.assign({},this.certificateDecoded)),r(s,{name:this.certificateDecoded.subject}),r(n,{name:this.certificateDecoded.issuer,issuerDnLink:this.getIssuerDnLink()}),r(c,{publicKey:this.certificateDecoded.publicKey}),r(v,{signature:this.certificateDecoded.signature}),r(p,{thumbprints:this.certificateDecoded.thumbprints}),r(l,{extensions:this.certificateDecoded.extensions,getLEILink:b,getDNSNameLink:d,getIPAddressLink:h,getAuthKeyIdParentLink:this.getAuthKeyIdParentLink,getAuthKeyIdSiblingsLink:this.getAuthKeyIdSiblingsLink,getSubjectKeyIdChildrenLink:this.getSubjectKeyIdChildrenLink,getSubjectKeyIdSiblingsLink:this.getSubjectKeyIdSiblingsLink}),this.download&&r(g,{certificate:this.certificateDecoded})))};Object.defineProperty(t,"watchers",{get:function(){return{certificate:["watchCertificateAndDecode"]}},enumerable:false,configurable:true});return t}());y.style=f}}}));
|
|
5
|
+
//# sourceMappingURL=p-a4454e2d.system.entry.js.map
|
|
@@ -39,7 +39,7 @@ var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setP
|
|
|
39
39
|
*
|
|
40
40
|
* This source code is licensed under the MIT license found in the
|
|
41
41
|
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var c=function(){function t(){}return t}();t("D",c);c.cert={asPEM:function(t,e){r(u.Convert.FromString(t),e,"cer","application/pkix-cert")},asDER:function(t,e){r(t,e,"cer","application/pkix-cert")}};c.attrCert={asPEM:function(t,e){r(u.Convert.FromString(t),e,"cer","application/pkix-attr-cert")},asDER:function(t,e){r(t,e,"cer","application/pkix-attr-cert")}};c.csr={asPEM:function(t,e){r(u.Convert.FromString(t),e,"csr","application/pkcs10")},asDER:function(t,e){r(t,e,"csr","application/pkcs10")}};c.crl={asPEM:function(t,e){r(u.Convert.FromString(t),e,"crl","application/pkix-crl")},asDER:function(t,e){r(t,e,"crl","application/pkix-crl")}};
|
|
42
|
+
*/var c=function(){function t(){}return t}();t("D",c);c.cert={asPEM:function(t,e){r(u.Convert.FromString(t),e,"cer","application/pkix-cert")},asDER:function(t,e){r(t,e,"cer","application/pkix-cert")}};c.attrCert={asPEM:function(t,e){r(u.Convert.FromString(t),e,"cer","application/pkix-attr-cert")},asDER:function(t,e){r(t,e,"cer","application/pkix-attr-cert")}};c.csr={asPEM:function(t,e){r(u.Convert.FromString(t),e,"csr","application/pkcs10")},asDER:function(t,e){r(t,e,"csr","application/pkcs10")}};c.crl={asPEM:function(t,e){r(u.Convert.FromString(t),e,"crl","application/pkix-crl")},asDER:function(t,e){r(t,e,"crl","application/pkix-crl")}};c.certSSH={asPub:function(t,e){r(u.Convert.FromString(t),e,"pub","text/plain")}};
|
|
43
43
|
/*!
|
|
44
44
|
Copyright (c) Peculiar Ventures, LLC
|
|
45
45
|
*/function f(t,e){var i=0;if(t.length===1){return t[0]}for(var r=t.length-1;r>=0;r--){i+=t[t.length-1-r]*Math.pow(2,e*r)}return i}function v(t,e,i){if(i===void 0){i=-1}var r=i;var n=t;var a=0;var o=Math.pow(2,e);for(var s=1;s<8;s++){if(t<o){var u=void 0;if(r<0){u=new ArrayBuffer(s);a=s}else{if(r<s){return new ArrayBuffer(0)}u=new ArrayBuffer(r);a=r}var c=new Uint8Array(u);for(var f=s-1;f>=0;f--){var v=Math.pow(2,f*e);c[a-f-1]=Math.floor(n/v);n-=c[a-f-1]*v}return u}o*=Math.pow(2,e)}return new ArrayBuffer(0)}function h(){var t=[];for(var e=0;e<arguments.length;e++){t[e]=arguments[e]}var i=0;var r=0;for(var n=0,a=t;n<a.length;n++){var o=a[n];i+=o.length}var s=new ArrayBuffer(i);var u=new Uint8Array(s);for(var c=0,f=t;c<f.length;c++){var o=f[c];u.set(o,r);r+=o.length}return u}function d(){var t=new Uint8Array(this.valueHex);if(this.valueHex.byteLength>=2){var e=t[0]===255&&t[1]&128;var i=t[0]===0&&(t[1]&128)===0;if(e||i){this.warnings.push("Needlessly long format")}}var r=new ArrayBuffer(this.valueHex.byteLength);var n=new Uint8Array(r);for(var a=0;a<this.valueHex.byteLength;a++){n[a]=0}n[0]=t[0]&128;var o=f(n,8);var s=new ArrayBuffer(this.valueHex.byteLength);var u=new Uint8Array(s);for(var c=0;c<this.valueHex.byteLength;c++){u[c]=t[c]}u[0]&=127;var v=f(u,8);return v-o}function l(t){var e=t<0?t*-1:t;var i=128;for(var r=1;r<8;r++){if(e<=i){if(t<0){var n=i-e;var a=v(n,8,r);var o=new Uint8Array(a);o[0]|=128;return a}var s=v(e,8,r);var u=new Uint8Array(s);if(u[0]&128){var c=s.slice(0);var f=new Uint8Array(c);s=new ArrayBuffer(s.byteLength+1);u=new Uint8Array(s);for(var h=0;h<c.byteLength;h++){u[h+1]=f[h]}u[0]=0}return s}i*=Math.pow(2,8)}return new ArrayBuffer(0)}function p(t,e){if(t.byteLength!==e.byteLength){return false}var i=new Uint8Array(t);var r=new Uint8Array(e);for(var n=0;n<i.length;n++){if(i[n]!==r[n]){return false}}return true}function y(t,e){var i=t.toString(10);if(e<i.length){return""}var r=e-i.length;var n=new Array(r);for(var a=0;a<r;a++){n[a]="0"}var o=n.join("");return o.concat(i)}
|
|
@@ -131,5 +131,5 @@ var __extends=this&&this.__extends||function(){var t=function(e,i){t=Object.setP
|
|
|
131
131
|
*
|
|
132
132
|
* This source code is licensed under the MIT license found in the
|
|
133
133
|
* LICENSE file in the root directory of this source tree.
|
|
134
|
-
*/var Qc=t("c",(function(t){if(Vc.isPem(t)){return Vc.decode(t)[0]}if(u.Convert.isHex(t)){return u.Convert.FromHex(t)}if(u.Convert.isBase64(t)){return u.Convert.FromBase64(t)}if(u.Convert.isBase64Url(t)){return u.Convert.FromBase64Url(t)}return u.Convert.FromBinary(t)}));var qc=t("m",(function(t,i){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=Wc.get();if(e.subtle){return[2,e.subtle.digest(t,i)]}return[2,undefined]}))}))}));var zc=function(){function t(t){if(t===void 0){t={}}this.acIssuer=new ji;this.acSerial=0;this.attrs=[];Object.assign(this,t)}return t}();bi([Ai({type:ji})],zc.prototype,"acIssuer",void 0);bi([Ai({type:Ke.Integer})],zc.prototype,"acSerial",void 0);bi([Ai({type:rn,repeated:"sequence"})],zc.prototype,"attrs",void 0);var Yc;var Zc=Yc=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Yc.prototype);return i}return e}(wi);Zc=Yc=bi([Si({type:Ne.Sequence,itemType:Ke.ObjectIdentifier})],Zc);var $c=function(){function t(t){if(t===void 0){t={}}this.permitUnSpecified=true;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer,optional:true})],$c.prototype,"pathLenConstraint",void 0);bi([Ai({type:Zc,implicit:true,context:0,optional:true})],$c.prototype,"permittedAttrs",void 0);bi([Ai({type:Zc,implicit:true,context:1,optional:true})],$c.prototype,"excludedAttrs",void 0);bi([Ai({type:Ke.Boolean,defaultValue:true})],$c.prototype,"permitUnSpecified",void 0);var Xc=function(){function t(t){if(t===void 0){t={}}this.issuer=new Xi;this.serial=new ArrayBuffer(0);this.issuerUID=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Xi})],Xc.prototype,"issuer",void 0);bi([Ai({type:Ke.Integer,converter:Ve})],Xc.prototype,"serial",void 0);bi([Ai({type:Ke.BitString,optional:true})],Xc.prototype,"issuerUID",void 0);var Jc;(function(t){t[t["publicKey"]=0]="publicKey";t[t["publicKeyCert"]=1]="publicKeyCert";t[t["otherObjectTypes"]=2]="otherObjectTypes"})(Jc||(Jc={}));var tf=function(){function t(t){if(t===void 0){t={}}this.digestedObjectType=Jc.publicKey;this.digestAlgorithm=new An;this.objectDigest=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.Enumerated})],tf.prototype,"digestedObjectType",void 0);bi([Ai({type:Ke.ObjectIdentifier,optional:true})],tf.prototype,"otherObjectTypeID",void 0);bi([Ai({type:An})],tf.prototype,"digestAlgorithm",void 0);bi([Ai({type:Ke.BitString})],tf.prototype,"objectDigest",void 0);var ef=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:Xi,optional:true})],ef.prototype,"issuerName",void 0);bi([Ai({type:Xc,context:0,implicit:true,optional:true})],ef.prototype,"baseCertificateID",void 0);bi([Ai({type:tf,context:1,implicit:true,optional:true})],ef.prototype,"objectDigestInfo",void 0);var rf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:ji,repeated:"sequence"})],rf.prototype,"v1Form",void 0);bi([Ai({type:ef,context:0,implicit:true})],rf.prototype,"v2Form",void 0);rf=bi([Si({type:Ne.Choice})],rf);var nf=function(){function t(t){if(t===void 0){t={}}this.notBeforeTime=new Date;this.notAfterTime=new Date;Object.assign(this,t)}return t}();bi([Ai({type:Ke.GeneralizedTime})],nf.prototype,"notBeforeTime",void 0);bi([Ai({type:Ke.GeneralizedTime})],nf.prototype,"notAfterTime",void 0);var af=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:Xc,implicit:true,context:0,optional:true})],af.prototype,"baseCertificateID",void 0);bi([Ai({type:Xi,implicit:true,context:1,optional:true})],af.prototype,"entityName",void 0);bi([Ai({type:tf,implicit:true,context:2,optional:true})],af.prototype,"objectDigestInfo",void 0);var of;(function(t){t[t["v2"]=1]="v2"})(of||(of={}));var sf=function(){function t(t){if(t===void 0){t={}}this.version=of.v2;this.holder=new af;this.issuer=new rf;this.signature=new An;this.serialNumber=new ArrayBuffer(0);this.attrCertValidityPeriod=new nf;this.attributes=[];Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],sf.prototype,"version",void 0);bi([Ai({type:af})],sf.prototype,"holder",void 0);bi([Ai({type:rf})],sf.prototype,"issuer",void 0);bi([Ai({type:An})],sf.prototype,"signature",void 0);bi([Ai({type:Ke.Integer,converter:Ve})],sf.prototype,"serialNumber",void 0);bi([Ai({type:nf})],sf.prototype,"attrCertValidityPeriod",void 0);bi([Ai({type:rn,repeated:"sequence"})],sf.prototype,"attributes",void 0);bi([Ai({type:Ke.BitString,optional:true})],sf.prototype,"issuerUniqueID",void 0);bi([Ai({type:bn,optional:true})],sf.prototype,"extensions",void 0);var uf=function(){function t(t){if(t===void 0){t={}}this.acinfo=new sf;this.signatureAlgorithm=new An;this.signatureValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();t("n",uf);bi([Ai({type:sf})],uf.prototype,"acinfo",void 0);bi([Ai({type:An})],uf.prototype,"signatureAlgorithm",void 0);bi([Ai({type:Ke.BitString})],uf.prototype,"signatureValue",void 0);var cf;(function(t){t[t["unmarked"]=1]="unmarked";t[t["unclassified"]=2]="unclassified";t[t["restricted"]=4]="restricted";t[t["confidential"]=8]="confidential";t[t["secret"]=16]="secret";t[t["topSecret"]=32]="topSecret"})(cf||(cf={}));var ff=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(je);var vf=function(){function t(t){if(t===void 0){t={}}this.type="";this.value=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier,implicit:true,context:0})],vf.prototype,"type",void 0);bi([Ai({type:Ke.Any,implicit:true,context:1})],vf.prototype,"value",void 0);var hf=function(){function t(t){if(t===void 0){t={}}this.policyId="";this.classList=new ff(cf.unclassified);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],hf.prototype,"policyId",void 0);bi([Ai({type:ff,defaultValue:new ff(cf.unclassified)})],hf.prototype,"classList",void 0);bi([Ai({type:vf,repeated:"set"})],hf.prototype,"securityCategories",void 0);var df=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:He})],df.prototype,"cotets",void 0);bi([Ai({type:Ke.ObjectIdentifier})],df.prototype,"oid",void 0);bi([Ai({type:Ke.Utf8String})],df.prototype,"string",void 0);var lf=function(){function t(t){if(t===void 0){t={}}this.values=[];Object.assign(this,t)}return t}();bi([Ai({type:Xi,implicit:true,context:0,optional:true})],lf.prototype,"policyAuthority",void 0);bi([Ai({type:df,repeated:"sequence"})],lf.prototype,"values",void 0);var pf;var yf=function(){function t(t){if(t===void 0){t={}}this.targetCertificate=new Xc;Object.assign(this,t)}return t}();bi([Ai({type:Xc})],yf.prototype,"targetCertificate",void 0);bi([Ai({type:ji,optional:true})],yf.prototype,"targetName",void 0);bi([Ai({type:tf,optional:true})],yf.prototype,"certDigestInfo",void 0);var Sf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:ji,context:0,implicit:true})],Sf.prototype,"targetName",void 0);bi([Ai({type:ji,context:1,implicit:true})],Sf.prototype,"targetGroup",void 0);bi([Ai({type:yf,context:2,implicit:true})],Sf.prototype,"targetCert",void 0);Sf=bi([Si({type:Ne.Choice})],Sf);var Af=pf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,pf.prototype);return i}return e}(wi);Af=pf=bi([Si({type:Ne.Sequence,itemType:Sf})],Af);var Cf;var mf=Cf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Cf.prototype);return i}return e}(wi);mf=Cf=bi([Si({type:Ne.Sequence,itemType:Af})],mf);var gf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:Xi,implicit:true,context:0,optional:true})],gf.prototype,"roleAuthority",void 0);bi([Ai({type:ji,implicit:true,context:1})],gf.prototype,"roleName",void 0);var wf=function(){function t(t){if(t===void 0){t={}}this.service=new ji;this.ident=new ji;Object.assign(this,t)}return t}();bi([Ai({type:ji})],wf.prototype,"service",void 0);bi([Ai({type:ji})],wf.prototype,"ident",void 0);bi([Ai({type:He,optional:true})],wf.prototype,"authInfo",void 0);var _f="0.4.0.9496";var bf=t("L","".concat(_f,".6"));var Ef=t("u",function(){function t(t){if(t===void 0){t={}}this.codeAuthority=new ji;this.codeId=new ji;this.shortName="";this.shortDescription="";Object.assign(this,t)}return t}());bi([Ai({type:ji,context:0})],Ef.prototype,"codeAuthority",void 0);bi([Ai({type:ji,context:1})],Ef.prototype,"codeId",void 0);bi([Ai({type:Ke.Utf8String,context:2})],Ef.prototype,"shortName",void 0);bi([Ai({type:Ke.Utf8String,context:3})],Ef.prototype,"shortDescription",void 0);t("u",Ef=bi([Si({type:Ne.Sequence})],Ef));var Pf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Mi);Pf=bi([Si({type:Ne.Sequence})],Pf);var Df=t("X","".concat(_f,".1"));var If=t("y",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("y",If=bi([Si({type:Ne.Sequence})],If));var Bf=t("S","".concat(_f,".2"));var xf=t("x",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("x",xf=bi([Si({type:Ne.Sequence})],xf));var Tf=t("Q","".concat(_f,".3"));var Of=t("w",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("w",Of=bi([Si({type:Ne.Sequence})],Of));var kf=t("O","".concat(_f,".4"));var Mf=t("v",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("v",Mf=bi([Si({type:Ne.Sequence})],Mf));var Rf=t("J","".concat(_f,".8"));var Nf=t("I",function(){function t(t){if(t===void 0){t={}}this.location="";this.base=0;this.degree=0;Object.assign(this,t)}t.prototype.toString=function(){return"".concat(this.base," x 10^").concat(this.degree," ").concat(this.location)};return t}());bi([Ai({type:Ke.PrintableString})],Nf.prototype,"location",void 0);bi([Ai({type:Ke.Integer})],Nf.prototype,"base",void 0);bi([Ai({type:Ke.Integer})],Nf.prototype,"degree",void 0);t("I",Nf=bi([Si({type:Ne.Sequence})],Nf));var Kf=t("H","".concat(_f,".9"));var jf=t("V",function(){function t(t){if(t===void 0){t={}}this.stars5=0;this.stars4=0;this.stars3=0;this.stars2=0;this.stars1=0;Object.assign(this,t)}return t}());bi([Ai({type:Ke.Integer})],jf.prototype,"stars5",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars4",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars3",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars2",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars1",void 0);t("V",jf=bi([Si({type:Ne.Sequence})],jf));var Hf=t("M","".concat(_f,".5"));var Uf=t("T",function(){function t(t){if(t===void 0){t={}}this.DNBvsDNO=new je(0);this.DNBvsDNT=new je(0);this.DNOvsDNT=new je(0);Object.assign(this,t)}return t}());bi([Ai({type:je,context:0})],Uf.prototype,"DNBvsDNO",void 0);bi([Ai({type:je,context:1})],Uf.prototype,"DNBvsDNT",void 0);bi([Ai({type:je,context:2})],Uf.prototype,"DNOvsDNT",void 0);t("T",Uf=bi([Si({type:Ne.Sequence})],Uf));var Ff=t("K","".concat(_f,".7"));var Lf=t("W",function(){function t(t){if(t===void 0){t={}}this.assessmentAuthority=new ji;this.assessmentRef=new ji;this.assessmentLocation=new ji;this.dataStorageTerritory="";this.description="";Object.assign(this,t)}return t}());bi([Ai({type:ji,context:0})],Lf.prototype,"assessmentAuthority",void 0);bi([Ai({type:ji,context:1})],Lf.prototype,"assessmentRef",void 0);bi([Ai({type:ji,context:2})],Lf.prototype,"assessmentLocation",void 0);bi([Ai({type:Ke.PrintableString,context:3})],Lf.prototype,"dataStorageTerritory",void 0);bi([Ai({type:Ke.Utf8String,context:4})],Lf.prototype,"description",void 0);t("W",Lf=bi([Si({type:Ne.Sequence})],Lf));var Vf=function(){function t(t){if(t===void 0){t={}}this.issuer=new Mi;this.serialNumber=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Mi})],Vf.prototype,"issuer",void 0);bi([Ai({type:Ke.Integer,converter:Ve})],Vf.prototype,"serialNumber",void 0);var Gf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:un,context:0,implicit:true})],Gf.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Vf})],Gf.prototype,"issuerAndSerialNumber",void 0);Gf=bi([Si({type:Ne.Choice})],Gf);var Wf;(function(t){t[t["v0"]=0]="v0";t[t["v1"]=1]="v1";t[t["v2"]=2]="v2";t[t["v3"]=3]="v3";t[t["v4"]=4]="v4";t[t["v5"]=5]="v5"})(Wf||(Wf={}));var Qf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Qf=bi([Si({type:Ne.Sequence})],Qf);var qf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);qf=bi([Si({type:Ne.Sequence})],qf);var zf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);zf=bi([Si({type:Ne.Sequence})],zf);var Yf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Yf=bi([Si({type:Ne.Sequence})],Yf);var Zf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Zf=bi([Si({type:Ne.Sequence})],Zf);var $f=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);$f=bi([Si({type:Ne.Sequence})],$f);var Xf=function(){function t(t){if(t===void 0){t={}}this.attrType="";this.attrValues=[];Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Xf.prototype,"attrType",void 0);bi([Ai({type:Ke.Any,repeated:"set"})],Xf.prototype,"attrValues",void 0);var Jf;var tv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.sid=new Gf;this.digestAlgorithm=new Qf;this.signatureAlgorithm=new qf;this.signature=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],tv.prototype,"version",void 0);bi([Ai({type:Gf})],tv.prototype,"sid",void 0);bi([Ai({type:Qf})],tv.prototype,"digestAlgorithm",void 0);bi([Ai({type:Xf,repeated:"set",context:0,implicit:true,optional:true})],tv.prototype,"signedAttrs",void 0);bi([Ai({type:qf})],tv.prototype,"signatureAlgorithm",void 0);bi([Ai({type:He})],tv.prototype,"signature",void 0);bi([Ai({type:Xf,repeated:"set",context:1,implicit:true,optional:true})],tv.prototype,"unsignedAttrs",void 0);var ev=Jf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Jf.prototype);return i}return e}(wi);ev=Jf=bi([Si({type:Ne.Set,itemType:tv})],ev);var iv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(mn);iv=bi([Si({type:Ne.Choice})],iv);var rv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(tv);rv=bi([Si({type:Ne.Sequence})],rv);var nv;var av=function(){function t(t){if(t===void 0){t={}}this.otherCertFormat="";this.otherCert=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],av.prototype,"otherCertFormat",void 0);bi([Ai({type:Ke.Any})],av.prototype,"otherCert",void 0);var ov=t("bk",function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}());bi([Ai({type:Dn})],ov.prototype,"certificate",void 0);bi([Ai({type:uf,context:2,implicit:true})],ov.prototype,"v2AttrCert",void 0);bi([Ai({type:av,context:3,implicit:true})],ov.prototype,"other",void 0);t("bk",ov=bi([Si({type:Ne.Choice})],ov));var sv=t("bj",nv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,nv.prototype);return i}return e}(wi));t("bj",sv=nv=bi([Si({type:Ne.Set,itemType:ov})],sv));var uv=function(){function t(t){if(t===void 0){t={}}this.contentType="";this.content=new ArrayBuffer(0);Object.assign(this,t)}return t}();t("bl",uv);bi([Ai({type:Ke.ObjectIdentifier})],uv.prototype,"contentType",void 0);bi([Ai({type:Ke.Any,context:0})],uv.prototype,"content",void 0);var cv=t("bi",function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}());bi([Ai({type:He})],cv.prototype,"single",void 0);bi([Ai({type:Ke.Any})],cv.prototype,"any",void 0);t("bi",cv=bi([Si({type:Ne.Choice})],cv));var fv=function(){function t(t){if(t===void 0){t={}}this.eContentType="";Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],fv.prototype,"eContentType",void 0);bi([Ai({type:cv,context:0,optional:true})],fv.prototype,"eContent",void 0);var vv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:He,context:0,implicit:true,optional:true})],vv.prototype,"value",void 0);bi([Ai({type:He,converter:ze,context:0,implicit:true,optional:true,repeated:"sequence"})],vv.prototype,"constructedValue",void 0);vv=bi([Si({type:Ne.Choice})],vv);var hv=function(){function t(t){if(t===void 0){t={}}this.contentType="";this.contentEncryptionAlgorithm=new Yf;Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],hv.prototype,"contentType",void 0);bi([Ai({type:Yf})],hv.prototype,"contentEncryptionAlgorithm",void 0);bi([Ai({type:vv,optional:true})],hv.prototype,"encryptedContent",void 0);var dv=function(){function t(t){if(t===void 0){t={}}this.keyAttrId="";Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],dv.prototype,"keyAttrId",void 0);bi([Ai({type:Ke.Any,optional:true})],dv.prototype,"keyAttr",void 0);var lv;var pv=function(){function t(t){if(t===void 0){t={}}this.subjectKeyIdentifier=new un;Object.assign(this,t)}return t}();bi([Ai({type:un})],pv.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Ke.GeneralizedTime,optional:true})],pv.prototype,"date",void 0);bi([Ai({type:dv,optional:true})],pv.prototype,"other",void 0);var yv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:pv,context:0,implicit:true,optional:true})],yv.prototype,"rKeyId",void 0);bi([Ai({type:Vf,optional:true})],yv.prototype,"issuerAndSerialNumber",void 0);yv=bi([Si({type:Ne.Choice})],yv);var Sv=function(){function t(t){if(t===void 0){t={}}this.rid=new yv;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:yv})],Sv.prototype,"rid",void 0);bi([Ai({type:He})],Sv.prototype,"encryptedKey",void 0);var Av=lv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,lv.prototype);return i}return e}(wi);Av=lv=bi([Si({type:Ne.Sequence,itemType:Sv})],Av);var Cv=function(){function t(t){if(t===void 0){t={}}this.algorithm=new An;this.publicKey=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:An})],Cv.prototype,"algorithm",void 0);bi([Ai({type:Ke.BitString})],Cv.prototype,"publicKey",void 0);var mv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:un,context:0,implicit:true,optional:true})],mv.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Cv,context:1,implicit:true,optional:true})],mv.prototype,"originatorKey",void 0);bi([Ai({type:Vf,optional:true})],mv.prototype,"issuerAndSerialNumber",void 0);mv=bi([Si({type:Ne.Choice})],mv);var gv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v3;this.originator=new mv;this.keyEncryptionAlgorithm=new zf;this.recipientEncryptedKeys=new Av;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],gv.prototype,"version",void 0);bi([Ai({type:mv,context:0})],gv.prototype,"originator",void 0);bi([Ai({type:He,context:1,optional:true})],gv.prototype,"ukm",void 0);bi([Ai({type:zf})],gv.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:Av})],gv.prototype,"recipientEncryptedKeys",void 0);var wv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:un,context:0,implicit:true})],wv.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Vf})],wv.prototype,"issuerAndSerialNumber",void 0);wv=bi([Si({type:Ne.Choice})],wv);var _v=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.rid=new wv;this.keyEncryptionAlgorithm=new zf;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],_v.prototype,"version",void 0);bi([Ai({type:wv})],_v.prototype,"rid",void 0);bi([Ai({type:zf})],_v.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:He})],_v.prototype,"encryptedKey",void 0);var bv=function(){function t(t){if(t===void 0){t={}}this.keyIdentifier=new He;Object.assign(this,t)}return t}();bi([Ai({type:He})],bv.prototype,"keyIdentifier",void 0);bi([Ai({type:Ke.GeneralizedTime,optional:true})],bv.prototype,"date",void 0);bi([Ai({type:dv,optional:true})],bv.prototype,"other",void 0);var Ev=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v4;this.kekid=new bv;this.keyEncryptionAlgorithm=new zf;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Ev.prototype,"version",void 0);bi([Ai({type:bv})],Ev.prototype,"kekid",void 0);bi([Ai({type:zf})],Ev.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:He})],Ev.prototype,"encryptedKey",void 0);var Pv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.keyEncryptionAlgorithm=new zf;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Pv.prototype,"version",void 0);bi([Ai({type:$f,context:0,optional:true})],Pv.prototype,"keyDerivationAlgorithm",void 0);bi([Ai({type:zf})],Pv.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:He})],Pv.prototype,"encryptedKey",void 0);var Dv=function(){function t(t){if(t===void 0){t={}}this.oriType="";this.oriValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Dv.prototype,"oriType",void 0);bi([Ai({type:Ke.Any})],Dv.prototype,"oriValue",void 0);var Iv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:_v,optional:true})],Iv.prototype,"ktri",void 0);bi([Ai({type:gv,context:1,implicit:true,optional:true})],Iv.prototype,"kari",void 0);bi([Ai({type:Ev,context:2,implicit:true,optional:true})],Iv.prototype,"kekri",void 0);bi([Ai({type:Pv,context:3,implicit:true,optional:true})],Iv.prototype,"pwri",void 0);bi([Ai({type:Dv,context:4,implicit:true,optional:true})],Iv.prototype,"ori",void 0);Iv=bi([Si({type:Ne.Choice})],Iv);var Bv;var xv=Bv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Bv.prototype);return i}return e}(wi);xv=Bv=bi([Si({type:Ne.Set,itemType:Iv})],xv);var Tv;var Ov=function(){function t(t){if(t===void 0){t={}}this.otherRevInfoFormat="";this.otherRevInfo=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Ov.prototype,"otherRevInfoFormat",void 0);bi([Ai({type:Ke.Any})],Ov.prototype,"otherRevInfo",void 0);var kv=function(){function t(t){if(t===void 0){t={}}this.other=new Ov;Object.assign(this,t)}return t}();bi([Ai({type:Ov,context:1,implicit:true})],kv.prototype,"other",void 0);kv=bi([Si({type:Ne.Choice})],kv);var Mv=Tv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Tv.prototype);return i}return e}(wi);Mv=Tv=bi([Si({type:Ne.Set,itemType:kv})],Mv);var Rv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:sv,context:0,implicit:true,optional:true})],Rv.prototype,"certs",void 0);bi([Ai({type:Mv,context:1,implicit:true,optional:true})],Rv.prototype,"crls",void 0);var Nv;var Kv=Nv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Nv.prototype);return i}return e}(wi);Kv=Nv=bi([Si({type:Ne.Set,itemType:Xf})],Kv);var jv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.recipientInfos=new xv;this.encryptedContentInfo=new hv;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],jv.prototype,"version",void 0);bi([Ai({type:Rv,context:0,implicit:true,optional:true})],jv.prototype,"originatorInfo",void 0);bi([Ai({type:xv})],jv.prototype,"recipientInfos",void 0);bi([Ai({type:hv})],jv.prototype,"encryptedContentInfo",void 0);bi([Ai({type:Kv,context:1,implicit:true,optional:true})],jv.prototype,"unprotectedAttrs",void 0);var Hv;var Uv=Hv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Hv.prototype);return i}return e}(wi);Uv=Hv=bi([Si({type:Ne.Set,itemType:Qf})],Uv);var Fv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.digestAlgorithms=new Uv;this.encapContentInfo=new fv;this.signerInfos=new ev;Object.assign(this,t)}return t}();t("bh",Fv);bi([Ai({type:Ke.Integer})],Fv.prototype,"version",void 0);bi([Ai({type:Uv})],Fv.prototype,"digestAlgorithms",void 0);bi([Ai({type:fv})],Fv.prototype,"encapContentInfo",void 0);bi([Ai({type:sv,context:0,implicit:true,optional:true})],Fv.prototype,"certificates",void 0);bi([Ai({type:Mv,context:1,implicit:true,optional:true})],Fv.prototype,"crls",void 0);bi([Ai({type:ev})],Fv.prototype,"signerInfos",void 0);var Lv;var Vv=function(){function t(t){if(t===void 0){t={}}this.attrId="";this.attrValues=[];Object.assign(t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Vv.prototype,"attrId",void 0);bi([Ai({type:Ke.Any,repeated:"set"})],Vv.prototype,"attrValues",void 0);var Gv=Lv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Lv.prototype);return i}return e}(wi);Gv=Lv=bi([Si({type:Ne.Sequence,itemType:Vv})],Gv);var Wv;var Qv=Wv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Wv.prototype);return i}return e}(wi);Qv=Wv=bi([Si({type:Ne.Sequence,itemType:uv})],Qv);var qv=function(){function t(t){if(t===void 0){t={}}this.certId="";this.certValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],qv.prototype,"certId",void 0);bi([Ai({type:Ke.Any,context:0})],qv.prototype,"certValue",void 0);var zv=function(){function t(t){if(t===void 0){t={}}this.crlId="";this.crltValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],zv.prototype,"crlId",void 0);bi([Ai({type:Ke.Any,context:0})],zv.prototype,"crltValue",void 0);var Yv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ka);Yv=bi([Si({type:Ne.Sequence})],Yv);var Zv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Oa);Zv=bi([Si({type:Ne.Sequence})],Zv);var $v=function(){function t(t){if(t===void 0){t={}}this.secretTypeId="";this.secretValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],$v.prototype,"secretTypeId",void 0);bi([Ai({type:Ke.Any,context:0})],$v.prototype,"secretValue",void 0);var Xv=function(){function t(t){if(t===void 0){t={}}this.mac=new ma;this.macSalt=new He;this.iterations=1;Object.assign(this,t)}return t}();bi([Ai({type:ma})],Xv.prototype,"mac",void 0);bi([Ai({type:He})],Xv.prototype,"macSalt",void 0);bi([Ai({type:Ke.Integer,defaultValue:1})],Xv.prototype,"iterations",void 0);var Jv=function(){function t(t){if(t===void 0){t={}}this.version=3;this.authSafe=new uv;this.macData=new Xv;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Jv.prototype,"version",void 0);bi([Ai({type:uv})],Jv.prototype,"authSafe",void 0);bi([Ai({type:Xv,optional:true})],Jv.prototype,"macData",void 0);var th;var eh=function(){function t(t){if(t===void 0){t={}}this.bagId="";this.bagValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],eh.prototype,"bagId",void 0);bi([Ai({type:Ke.Any,context:0})],eh.prototype,"bagValue",void 0);bi([Ai({type:Vv,repeated:"set",optional:true})],eh.prototype,"bagAttributes",void 0);var ih=th=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,th.prototype);return i}return e}(wi);ih=th=bi([Si({type:Ne.Sequence,itemType:eh})],ih);var rh,nh,ah;var oh="1.2.840.113549.1.9";var sh=t("F","".concat(oh,".2"));var uh=t("G","".concat(oh,".7"));var ch=t("B","".concat(oh,".14"));var fh=function(t){__extends(e,t);function e(e){if(e===void 0){e={}}return t.call(this,e)||this}e.prototype.toString=function(){return this.ia5String||t.prototype.toString.call(this)};return e}(Bi);bi([Ai({type:Ke.IA5String})],fh.prototype,"ia5String",void 0);fh=bi([Si({type:Ne.Choice})],fh);var vh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(uv);vh=bi([Si({type:Ne.Sequence})],vh);var hh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Jv);hh=bi([Si({type:Ne.Sequence})],hh);var dh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Oa);dh=bi([Si({type:Ne.Sequence})],dh);var lh=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.IA5String})],lh.prototype,"value",void 0);lh=bi([Si({type:Ne.Choice})],lh);var ph=t("U",function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(fh));t("U",ph=bi([Si({type:Ne.Choice})],ph));var yh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi);yh=bi([Si({type:Ne.Choice})],yh);var Sh=function(){function t(t){if(t===void 0){t=new Date}this.value=t}return t}();bi([Ai({type:Ke.GeneralizedTime})],Sh.prototype,"value",void 0);Sh=bi([Si({type:Ne.Choice})],Sh);var Ah=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi);Ah=bi([Si({type:Ne.Choice})],Ah);var Ch=function(){function t(t){if(t===void 0){t="M"}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.PrintableString})],Ch.prototype,"value",void 0);Ch=bi([Si({type:Ne.Choice})],Ch);var mh=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.PrintableString})],mh.prototype,"value",void 0);mh=bi([Si({type:Ne.Choice})],mh);var gh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(mh);gh=bi([Si({type:Ne.Choice})],gh);var wh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi);wh=bi([Si({type:Ne.Choice})],wh);var _h=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.ObjectIdentifier})],_h.prototype,"value",void 0);_h=bi([Si({type:Ne.Choice})],_h);var bh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(mn);bh=bi([Si({type:Ne.Choice})],bh);var Eh=function(){function t(t){if(t===void 0){t=0}this.value=t}t.prototype.toString=function(){return this.value.toString()};return t}();bi([Ai({type:Ke.Integer})],Eh.prototype,"value",void 0);Eh=bi([Si({type:Ne.Choice})],Eh);var Ph=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(tv);Ph=bi([Si({type:Ne.Sequence})],Ph);var Dh=t("t",function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi));t("t",Dh=bi([Si({type:Ne.Choice})],Dh));var Ih=t("s",rh=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,rh.prototype);return i}return e}(bn));t("s",Ih=rh=bi([Si({type:Ne.Sequence})],Ih));var Bh=nh=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,nh.prototype);return i}return e}(wi);Bh=nh=bi([Si({type:Ne.Set,itemType:Xf})],Bh);var xh=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.BmpString})],xh.prototype,"value",void 0);xh=bi([Si({type:Ne.Choice})],xh);var Th=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Th=bi([Si({type:Ne.Sequence})],Th);var Oh=ah=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,ah.prototype);return i}return e}(wi);Oh=ah=bi([Si({type:Ne.Sequence,itemType:Th})],Oh);var kh=t("z","1.3.6.1.4.1.22112.2.1");var Mh=t("r",function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}());bi([Ai({type:Vf})],Mh.prototype,"signer",void 0);bi([Ai({type:Dn,optional:true})],Mh.prototype,"cert",void 0);t("r",Mh=bi([Si({type:Ne.Sequence})],Mh));var Rh;var Nh=Rh=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Rh.prototype);return i}return e}(wi);Nh=Rh=bi([Si({type:Ne.Sequence,itemType:rn})],Nh);var Kh=function(){function t(t){if(t===void 0){t={}}this.version=0;this.subject=new Mi;this.subjectPKInfo=new Cn;this.attributes=new Nh;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Kh.prototype,"version",void 0);bi([Ai({type:Mi})],Kh.prototype,"subject",void 0);bi([Ai({type:Cn})],Kh.prototype,"subjectPKInfo",void 0);bi([Ai({type:Nh,implicit:true,context:0})],Kh.prototype,"attributes",void 0);var jh=function(){function t(t){if(t===void 0){t={}}this.certificationRequestInfo=new Kh;this.signatureAlgorithm=new An;this.signature=new ArrayBuffer(0);Object.assign(this,t)}return t}();t("Y",jh);bi([Ai({type:Kh})],jh.prototype,"certificationRequestInfo",void 0);bi([Ai({type:An})],jh.prototype,"signatureAlgorithm",void 0);bi([Ai({type:Ke.BitString})],jh.prototype,"signature",void 0);var Hh=globalThis.crypto;function Uh(){return Hh}var Fh=function(t){__extends(e,t);function e(e,i){var r=t.call(this,e)||this;r.code=i;r.name=r.constructor.name;if(Error.captureStackTrace){Error.captureStackTrace(r,r.constructor)}return r}return e}(Error);var Lh=function(t){__extends(e,t);function e(e,i){var r=i?" Supported: ".concat(i.join(", ")):"";return t.call(this,"Unsupported algorithm: ".concat(e,".").concat(r),"UNSUPPORTED_ALGORITHM")||this}return e}(Fh);var Vh=function(t){__extends(e,t);function e(e,i){var r=i?" Expected: ".concat(i):"";return t.call(this,"Invalid format: ".concat(e,".").concat(r),"INVALID_FORMAT")||this}return e}(Fh);var Gh=function(t){__extends(e,t);function e(e,i){var r=i?" Supported: ".concat(i.join(", ")):"";return t.call(this,"Unsupported key type: ".concat(e,".").concat(r),"UNSUPPORTED_KEY_TYPE")||this}return e}(Fh);var Wh=function(t){__extends(e,t);function e(e){var i=e?"Invalid SSH private key format: ".concat(e):"Invalid SSH private key format";return t.call(this,i,"INVALID_PRIVATE_KEY_FORMAT")||this}return e}(Fh);var Qh=function(t){__extends(e,t);function e(e){var i=e?"Encrypted SSH private keys are not supported (cipher: ".concat(e,")"):"Encrypted SSH private keys are not supported";return t.call(this,i,"ENCRYPTED_KEY_NOT_SUPPORTED")||this}return e}(Fh);var qh=function(t){__extends(e,t);function e(e){var i=e?"Invalid key data: ".concat(e):"Invalid key data";return t.call(this,i,"INVALID_KEY_DATA")||this}return e}(Fh);var zh=function(t){__extends(e,t);function e(e,i){var r=e!==undefined&&i!==undefined?" Expected ".concat(e," bytes, got ").concat(i):"";return t.call(this,"Unexpected end of data".concat(r),"UNEXPECTED_EOF")||this}return e}(Fh);var Yh=new TextEncoder;var Zh=new TextDecoder;var $h=function(){function t(t){this.buffer=t;this.offset=0}t.prototype.readUint8=function(){if(this.offset>=this.buffer.length){throw new zh(1,0)}return this.buffer[this.offset++]};t.prototype.readUint32=function(){var t=this.readUint8()<<24|this.readUint8()<<16|this.readUint8()<<8|this.readUint8();return t>>>0};t.prototype.readUint64=function(){var t=this.readUint32();var e=this.readUint32();return BigInt(t)<<32n|BigInt(e)};t.prototype.readBytes=function(t){if(t<0){throw new Vh("Invalid length: ".concat(t))}if(this.offset+t>this.buffer.length){throw new zh(t,this.buffer.length-this.offset)}var e=this.buffer.subarray(this.offset,this.offset+t);this.offset+=t;return e};t.prototype.readString=function(){var t=this.readUint32();var e=this.readBytes(t);return Zh.decode(e)};t.prototype.peekString=function(t){if(this.offset+t>this.buffer.length){throw new zh(t,this.buffer.length-this.offset)}var e=this.buffer.subarray(this.offset,this.offset+t);return Zh.decode(e)};t.prototype.readMpInt=function(t){if(t===void 0){t=false}var e=this.readUint32();var i=this.readBytes(e);if(t&&i.length>1&&i[0]===0){return i.subarray(1)}return i};t.prototype.readMpIntSsh=function(){return this.readMpInt(true)};t.prototype.remaining=function(){return this.buffer.length-this.offset};t.prototype.getOffset=function(){return this.offset};t.prototype.seek=function(t){if(t<0||t>this.buffer.length){throw new Vh("Invalid offset: ".concat(t,". Buffer length: ").concat(this.buffer.length))}this.offset=t};return t}();var Xh=function(){function t(t){if(t===void 0){t=1024}this.buffer=new Uint8Array(t);this.offset=0}t.prototype.ensureCapacity=function(t){var e=this.offset+t;if(e>this.buffer.length){var i=Math.max(e,this.buffer.length*2);var r=new Uint8Array(i);r.set(this.buffer.subarray(0,this.offset));this.buffer=r}};t.prototype.reserve=function(t){if(t>this.buffer.length){var e=new Uint8Array(t);e.set(this.buffer.subarray(0,this.offset));this.buffer=e}};t.prototype.writeUint8=function(t){this.ensureCapacity(1);this.buffer[this.offset++]=t&255};t.prototype.writeUint32=function(t){this.ensureCapacity(4);this.buffer[this.offset++]=t>>>24&255;this.buffer[this.offset++]=t>>>16&255;this.buffer[this.offset++]=t>>>8&255;this.buffer[this.offset++]=t&255};t.prototype.writeUint64=function(t){this.ensureCapacity(8);var e=Number(t>>32n);var i=Number(t&0xffffffffn);this.writeUint32(e);this.writeUint32(i)};t.prototype.writeBytes=function(t){this.ensureCapacity(t.length);this.buffer.set(t,this.offset);this.offset+=t.length};t.prototype.writeString=function(t){var e=Yh.encode(t);this.writeUint32(e.length);this.writeBytes(e)};t.prototype.writeMpInt=function(t,e){if(e===void 0){e=false}if(e&&t.length>0&&(t[0]&128)!==0){var i=new Uint8Array(t.length+1);i[0]=0;i.set(t,1);this.writeUint32(i.length);this.writeBytes(i)}else{this.writeUint32(t.length);this.writeBytes(t)}};t.prototype.writeMpIntSsh=function(t){this.writeMpInt(t,true)};t.prototype.toUint8Array=function(){return this.buffer.subarray(0,this.offset)};t.prototype.getOffset=function(){return this.offset};t.prototype.seek=function(t){if(t<0||t>this.buffer.length){throw new Vh("Invalid offset")}this.offset=t};return t}();var Jh=function(){function t(t){if(t===void 0){t="SHA-256"}this.hash="SHA-256";this.hash=t}t.prototype.importPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){e=t.blob,i=t.crypto;r=new $h(e);r.readString();n=r.readMpInt(true);a=r.readMpInt(true);o={kty:"RSA",n:u.Convert.ToBase64Url(a),e:u.Convert.ToBase64Url(n)};return[2,i.subtle.importKey("jwk",o,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};t.prototype.exportPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){switch(s.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("jwk",e)];case 1:r=s.sent();if(!r.n||!r.e){throw new qh("RSA JWK missing required parameters (n, e)")}n=u.BufferSourceConverter.toUint8Array(u.Convert.FromBase64Url(r.n));a=u.BufferSourceConverter.toUint8Array(u.Convert.FromBase64Url(r.e));o=new Xh;o.writeString("ssh-rsa");o.writeMpInt(a,true);o.writeMpInt(n,true);return[2,o.toUint8Array()]}}))}))};t.prototype.importPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.spki,i=t.crypto;return[2,i.subtle.importKey("spki",e,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};t.prototype.exportPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("spki",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.pkcs8,i=t.crypto;return[2,i.subtle.importKey("pkcs8",e,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};t.prototype.exportPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.privateKey,i=t.crypto;return[4,i.subtle.exportKey("pkcs8",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d,l,p,y,S,A,C,m,g,w,_,b,E,P,D,I,B;return __generator(this,(function(x){e=t.sshKey,i=t.crypto;r=e.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=u.Convert.FromBase64(r);a=new $h(u.BufferSourceConverter.toUint8Array(n));o=a.readBytes(15);if(u.Convert.ToHex(o)!=="6f70656e7373682d6b65792d763100"){throw new Wh("invalid magic string")}s=a.readString();a.readString();a.readString();if(s!=="none"){throw new Qh(s)}c=a.readUint32();if(c!==1){throw new Wh("multiple keys not supported")}f=a.readUint32();a.readBytes(f);v=a.readUint32();h=a.readBytes(v);d=new $h(h);l=d.readUint32();p=d.readUint32();if(l!==p){throw new Wh("invalid checkints")}d.readString();y=d.readMpInt(true);S=d.readMpInt(true);A=d.readMpInt(true);C=d.readMpInt(true);m=d.readMpInt(true);g=d.readMpInt(true);d.readString();w=BigInt("0x"+u.Convert.ToHex(A));_=BigInt("0x"+u.Convert.ToHex(m));b=BigInt("0x"+u.Convert.ToHex(g));E=w%(_-1n);P=w%(b-1n);D=u.Convert.FromHex(E.toString(16).padStart(m.length*2,"0"));I=u.Convert.FromHex(P.toString(16).padStart(g.length*2,"0"));B={kty:"RSA",n:u.Convert.ToBase64Url(y),e:u.Convert.ToBase64Url(S),d:u.Convert.ToBase64Url(A),p:u.Convert.ToBase64Url(m),q:u.Convert.ToBase64Url(g),dp:u.Convert.ToBase64Url(D),dq:u.Convert.ToBase64Url(I),qi:u.Convert.ToBase64Url(C)};return[2,i.subtle.importKey("jwk",B,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};t.prototype.exportPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d;return __generator(this,(function(l){switch(l.label){case 0:e=t.privateKey,i=t.crypto,r=t.jwk;a=r;if(a)return[3,2];return[4,i.subtle.exportKey("jwk",e)];case 1:a=l.sent();l.label=2;case 2:n=a;if(!n.n||!n.e||!n.d||!n.p||!n.q){throw new qh("RSA JWK missing required parameters")}o=new Uint8Array(u.Convert.FromBase64Url(n.n));s=new Uint8Array(u.Convert.FromBase64Url(n.e));c=new Uint8Array(u.Convert.FromBase64Url(n.d));f=new Uint8Array(u.Convert.FromBase64Url(n.p));v=new Uint8Array(u.Convert.FromBase64Url(n.q));h=n.qi?new Uint8Array(u.Convert.FromBase64Url(n.qi)):new Uint8Array;d=new Xh;d.writeString("ssh-rsa");d.writeMpInt(o,true);d.writeMpInt(s,true);d.writeMpInt(c,true);d.writeMpInt(h,true);d.writeMpInt(f,true);d.writeMpInt(v,true);return[2,d.toUint8Array()]}}))}))};t.prototype.sign=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:e=t.privateKey,i=t.data,r=t.crypto,n=t.hash;if(n&&n!==this.hash){throw new qh("Hash ".concat(n," not supported for this RSA algorithm"))}if(!e.extractable){throw new qh("Private key is not extractable")}return[4,this.exportPrivatePkcs8({privateKey:e,crypto:r})];case 1:a=c.sent();return[4,this.importPrivatePkcs8({pkcs8:new Uint8Array(a),crypto:r})];case 2:o=c.sent();return[4,r.subtle.sign("RSASSA-PKCS1-v1_5",o,i)];case 3:s=c.sent();return[2,u.BufferSourceConverter.toUint8Array(s)]}}))}))};t.prototype.verify=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(u){switch(u.label){case 0:e=t.publicKey,i=t.signature,r=t.data,n=t.crypto,a=t.hash;if(a&&a!==this.hash){return[2,false]}if(!e.extractable){throw new qh("Public key is not extractable")}return[4,this.exportPublicSpki({publicKey:e,crypto:n})];case 1:o=u.sent();return[4,this.importPublicSpki({spki:new Uint8Array(o),crypto:n})];case 2:s=u.sent();return[2,n.subtle.verify("RSASSA-PKCS1-v1_5",s,i,r)]}}))}))};t.prototype.encodeSignature=function(t){var e=t.signature,i=t.algo;var r=new Xh;r.writeString(i);r.writeUint32(e.byteLength);r.writeBytes(e);return r.toUint8Array()};t.prototype.decodeSignature=function(t){var e=t.signature;var i=new $h(e);var r=i.readString();var n=i.readUint32();var a=i.readBytes(n);return{signature:a,algo:r}};t.prototype.supportsCryptoKey=function(t){return t.algorithm.name==="RSASSA-PKCS1-v1_5"};t.prototype.parsePublicKey=function(t){var e=t.readBytes(t.readUint32());var i=t.readBytes(t.readUint32());var r=new Xh;r.writeString("ssh-rsa");r.writeMpInt(e);r.writeMpInt(i);return{type:"ssh-rsa",keyData:r.toUint8Array()}};t.prototype.writePublicKey=function(t,e){var i=new $h(e.keyData);i.readString();var r=i.readMpInt();var n=i.readMpInt();t.writeUint32(r.length);t.writeBytes(r);t.writeUint32(n.length);t.writeBytes(n)};t.prototype.getCertificateType=function(){return"ssh-rsa-cert-v01@openssh.com"};t.prototype.getSignatureAlgo=function(){return this.hash==="SHA-256"?"rsa-sha2-256":"rsa-sha2-512"};return t}();var td=function(){function t(t,e,i){this.curveName=t;this.sshType=e;this.namedCurve=i}t.prototype.getHashAlgorithm=function(){switch(this.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:return"SHA-256"}};t.prototype.getExpectedLength=function(){switch(this.namedCurve){case"P-256":return 32;case"P-384":return 48;case"P-521":return 66;default:return 32}};t.prototype.getSignatureCoordLength=function(){return this.getExpectedLength()};t.prototype.importPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(c){e=t.blob,i=t.crypto;r=new $h(e);r.readString();n=r.readString();if(n!==this.curveName){throw new qh("ECDSA curve name ".concat(n,", expected ").concat(this.curveName))}a=r.readMpInt();o=Math.floor((a.length-1)/2);s={kty:"EC",crv:this.namedCurve,x:u.Convert.ToBase64Url(a.slice(1,1+o)),y:u.Convert.ToBase64Url(a.slice(1+o))};return[2,i.subtle.importKey("jwk",s,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};t.prototype.exportPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("jwk",e)];case 1:r=c.sent();if(!r.x||!r.y){throw new qh("ECDSA JWK missing x or y parameters")}n=new Uint8Array(u.Convert.FromBase64Url(r.x));a=new Uint8Array(u.Convert.FromBase64Url(r.y));o=new Uint8Array(1+n.length+a.length);o[0]=4;o.set(n,1);o.set(a,1+n.length);s=new Xh;s.writeString(this.sshType);s.writeString(this.curveName);s.writeMpInt(o);return[2,s.toUint8Array()]}}))}))};t.prototype.importPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.spki,i=t.crypto;return[2,i.subtle.importKey("spki",e,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};t.prototype.exportPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("spki",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.pkcs8,i=t.crypto;return[2,i.subtle.importKey("pkcs8",e,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};t.prototype.exportPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.privateKey,i=t.crypto;return[4,i.subtle.exportKey("pkcs8",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.exportPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v;return __generator(this,(function(h){switch(h.label){case 0:e=t.privateKey,i=t.crypto,r=t.jwk;a=r;if(a)return[3,2];return[4,i.subtle.exportKey("jwk",e)];case 1:a=h.sent();h.label=2;case 2:n=a;if(!n.d||!n.x||!n.y){throw new qh("ECDSA private key JWK missing required parameters")}o=new Uint8Array(u.Convert.FromBase64Url(n.x));s=new Uint8Array(u.Convert.FromBase64Url(n.y));c=new Uint8Array(u.Convert.FromBase64Url(n.d));f=new Uint8Array(1+o.length+s.length);f[0]=4;f.set(o,1);f.set(s,1+o.length);v=new Xh;v.writeString(this.sshType);v.writeString(this.curveName);v.writeMpInt(f);v.writeMpInt(c);return[2,v.toUint8Array()]}}))}))};t.prototype.importPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d,l,p,y,S,A,C,m,g;return __generator(this,(function(w){e=t.sshKey,i=t.crypto;r=e.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=u.Convert.FromBase64(r);a=new $h(u.BufferSourceConverter.toUint8Array(n));o=a.readBytes(15);if(u.Convert.ToHex(o)!=="6f70656e7373682d6b65792d763100"){throw new Wh("invalid magic string")}s=a.readString();a.readString();a.readString();if(s!=="none"){throw new Qh(s)}c=a.readUint32();if(c!==1){throw new Wh("multiple keys not supported")}f=a.readUint32();a.readBytes(f);v=a.readUint32();h=a.readBytes(v);d=new $h(h);l=d.readUint32();p=d.readUint32();if(l!==p){throw new Wh("invalid checkints")}d.readString();d.readString();y=d.readMpInt();S=d.readMpInt();d.readString();if(y[0]!==4){throw new qh("invalid ECDSA public key point format")}A=Math.floor((y.length-1)/2);C=y.slice(1,1+A);m=y.slice(1+A);g={kty:"EC",crv:this.namedCurve,x:u.Convert.ToBase64Url(C),y:u.Convert.ToBase64Url(m),d:u.Convert.ToBase64Url(S)};return[2,i.subtle.importKey("jwk",g,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};t.prototype.sign=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){switch(s.label){case 0:e=t.privateKey,i=t.data,r=t.crypto,n=t.hash;a=this.getHashAlgorithm();if(n&&n!==a){throw new qh("ECDSA ".concat(this.namedCurve," requires ").concat(a,", got ").concat(n))}return[4,r.subtle.sign({name:"ECDSA",hash:a},e,i)];case 1:o=s.sent();return[2,u.BufferSourceConverter.toUint8Array(o)]}}))}))};t.prototype.verify=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){e=t.publicKey,i=t.signature,r=t.data,n=t.crypto,a=t.hash;o=this.getHashAlgorithm();if(a&&a!==o){throw new qh("ECDSA ".concat(this.namedCurve," requires ").concat(o,", got ").concat(a))}return[2,n.subtle.verify({name:"ECDSA",hash:o},e,i,r)]}))}))};t.prototype.encodeSignature=function(t){var e=t.signature,i=t.algo;if(i.startsWith("ecdsa-sha2-")){var r=this.getSignatureCoordLength();var n=e.subarray(0,r);var a=e.subarray(r);var o=new Xh;o.writeString(i);var s=new Xh;s.writeMpInt(n,true);s.writeMpInt(a,true);var u=s.toUint8Array();o.writeUint32(u.length);o.writeBytes(u);return o.toUint8Array()}var c=new Xh;c.writeString(i);c.writeUint32(e.byteLength);c.writeBytes(e);return c.toUint8Array()};t.prototype.decodeSignature=function(t){var e=t.signature;var i=new $h(e);var r=i.readString();var n=i.readUint32();var a=i.readBytes(n);if(r.startsWith("ecdsa-sha2-")){var o=new $h(a);var s=o.readMpInt();var u=o.readMpInt();if(s[0]===0&&s.length>1&&(s[1]&128)===0){s=s.slice(1)}if(u[0]===0&&u.length>1&&(u[1]&128)===0){u=u.slice(1)}var c=this.getExpectedLength();var f=new Uint8Array(c);var v=new Uint8Array(c);if(s.length<=c){f.set(s,c-s.length)}else{f.set(s.slice(s.length-c),0)}if(u.length<=c){v.set(u,c-u.length)}else{v.set(u.slice(u.length-c),0)}var h=new Uint8Array(__spreadArray(__spreadArray([],f,true),v,true));return{signature:h,algo:r}}return{signature:a,algo:r}};t.prototype.supportsCryptoKey=function(t){return t.algorithm.name==="ECDSA"&&t.algorithm.namedCurve===this.namedCurve};t.prototype.parsePublicKey=function(t){var e=t.readString();if(e!==this.curveName){throw new qh("ECDSA certificate curve name ".concat(e,", expected ").concat(this.curveName))}var i=t.readBytes(t.readUint32());var r=new Xh;r.writeString(this.sshType);r.writeString(e);r.writeMpInt(i);return{type:this.sshType,keyData:r.toUint8Array()}};t.prototype.writePublicKey=function(t,e){var i=new $h(e.keyData);i.readString();var r=i.readString();var n=i.readMpInt();t.writeString(r);t.writeUint32(n.length);t.writeBytes(n)};t.prototype.getCertificateType=function(){return"".concat(this.sshType,"-cert-v01@openssh.com")};t.prototype.getSignatureAlgo=function(){return this.sshType};return t}();var ed=new td("nistp256","ecdsa-sha2-nistp256","P-256");var id=new td("nistp384","ecdsa-sha2-nistp384","P-384");var rd=new td("nistp521","ecdsa-sha2-nistp521","P-521");var nd=function(){function t(){}t.prototype.importPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a;return __generator(this,(function(o){e=t.blob,i=t.crypto;r=new $h(e);r.readString();n=r.readUint32();if(n!==32){throw new qh("Ed25519 key length ".concat(n,", expected 32"))}a=r.readBytes(n);return[2,i.subtle.importKey("raw",a,"Ed25519",true,["verify"])]}))}))};t.prototype.exportPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a;return __generator(this,(function(o){switch(o.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("jwk",e)];case 1:r=o.sent();if(!r.x){throw new qh("Ed25519 JWK missing x parameter")}n=new Uint8Array(u.Convert.FromBase64Url(r.x));a=new Xh;a.writeString("ssh-ed25519");a.writeUint32(n.length);a.writeBytes(n);return[2,a.toUint8Array()]}}))}))};t.prototype.importPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.spki,i=t.crypto;return[2,i.subtle.importKey("spki",e,"Ed25519",true,["verify"])]}))}))};t.prototype.exportPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("spki",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.pkcs8,i=t.crypto;return[2,i.subtle.importKey("pkcs8",e,"Ed25519",true,["sign"])]}))}))};t.prototype.exportPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.privateKey,i=t.crypto;return[4,i.subtle.exportKey("pkcs8",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.exportPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f;return __generator(this,(function(v){switch(v.label){case 0:e=t.privateKey,i=t.crypto,r=t.jwk;a=r;if(a)return[3,2];return[4,i.subtle.exportKey("jwk",e)];case 1:a=v.sent();v.label=2;case 2:n=a;if(!n.d||!n.x){throw new qh("Ed25519 private key JWK missing required parameters")}o=new Uint8Array(u.Convert.FromBase64Url(n.d));s=new Uint8Array(u.Convert.FromBase64Url(n.x));c=new Xh;c.writeString("ssh-ed25519");c.writeUint32(s.length);c.writeBytes(s);f=new Uint8Array(64);f.set(o,0);f.set(s,32);c.writeUint32(f.length);c.writeBytes(f);return[2,c.toUint8Array()]}}))}))};t.prototype.importPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d,l,p,y,S,A,C,m,g;return __generator(this,(function(w){e=t.sshKey,i=t.crypto;r=e.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=u.Convert.FromBase64(r);a=new $h(u.BufferSourceConverter.toUint8Array(n));o=a.readBytes(15);if(u.Convert.ToHex(o)!=="6f70656e7373682d6b65792d763100"){throw new Wh("invalid magic string")}s=a.readString();a.readString();a.readString();if(s!=="none"){throw new Qh(s)}c=a.readUint32();if(c!==1){throw new Wh("multiple keys not supported")}f=a.readUint32();a.readBytes(f);v=a.readUint32();h=a.readBytes(v);d=new $h(h);l=d.readUint32();p=d.readUint32();if(l!==p){throw new Wh("invalid checkints")}d.readString();y=d.readUint32();S=d.readBytes(y);A=d.readUint32();C=d.readBytes(A);d.readString();m=C.slice(0,32);g={kty:"OKP",crv:"Ed25519",d:u.Convert.ToBase64Url(m),x:u.Convert.ToBase64Url(S)};return[2,i.subtle.importKey("jwk",g,"Ed25519",true,["sign"])]}))}))};t.prototype.sign=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n;return __generator(this,(function(a){switch(a.label){case 0:e=t.privateKey,i=t.data,r=t.crypto;return[4,r.subtle.sign("Ed25519",e,i)];case 1:n=a.sent();return[2,u.BufferSourceConverter.toUint8Array(n)]}}))}))};t.prototype.verify=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n;return __generator(this,(function(a){e=t.publicKey,i=t.signature,r=t.data,n=t.crypto;return[2,n.subtle.verify("Ed25519",e,i,r)]}))}))};t.prototype.encodeSignature=function(t){var e=t.signature,i=t.algo;var r=new Uint8Array(e);var n=new Xh;n.writeString(i);n.writeUint32(r.length);n.writeBytes(r);return n.toUint8Array()};t.prototype.decodeSignature=function(t){var e=t.signature;var i=new $h(e);var r=i.readString();var n=i.readUint32();var a=i.readBytes(n);return{signature:a,algo:r}};t.prototype.supportsCryptoKey=function(t){return t.algorithm.name==="Ed25519"};t.prototype.parsePublicKey=function(t){var e=t.readBytes(t.readUint32());var i=new Xh;i.writeString("ssh-ed25519");i.writeUint32(e.length);i.writeBytes(e);return{type:"ssh-ed25519",keyData:i.toUint8Array()}};t.prototype.writePublicKey=function(t,e){var i=new $h(e.keyData);i.readString();var r=i.readUint32();var n=i.readBytes(r);t.writeUint32(n.length);t.writeBytes(n)};t.prototype.getCertificateType=function(){return"ssh-ed25519-cert-v01@openssh.com"};t.prototype.getSignatureAlgo=function(){return"ssh-ed25519"};return t}();var ad=new Map;var od=function(){function t(){}t.get=function(t){var e=ad.get(t);if(!e){throw new Gh(t,Array.from(ad.keys()))}return e};t.register=function(t,e){ad.set(t,e)};t.getSshTypeFromCryptoKey=function(t){for(var e=0,i=ad.entries();e<i.length;e++){var r=i[e],n=r[0],a=r[1];if(a.supportsCryptoKey(t)){return n}}throw new Gh(t.algorithm.name,Array.from(ad.keys()))};t.certTypeToKeyType=function(t){var e={"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"};return e[t]};t.getSupportedCertTypes=function(){return Object.keys({"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"})};return t}();od.register("ssh-ed25519",new nd);od.register("ssh-rsa",new Jh("SHA-256"));od.register("rsa-sha2-256",new Jh("SHA-256"));od.register("rsa-sha2-512",new Jh("SHA-512"));od.register("ecdsa-sha2-nistp256",ed);od.register("ecdsa-sha2-nistp384",id);od.register("ecdsa-sha2-nistp521",rd);function sd(t){var e=typeof t==="string"?t.trim().split(/\s+/):null;if(!e||e.length<2){throw new Vh("Invalid SSH public key format")}var i=e[0];var r=new Uint8Array(u.Convert.FromBase64(e[1]));var n=e.length>2?e.slice(2).join(" "):undefined;var a=new $h(r);var o=a.readString();if(o!==i){throw new Vh("Key type mismatch")}return{type:i,keyData:r,comment:n}}function ud(t){var e=u.Convert.ToBase64(t.keyData);var i=[t.type,e];if(t.comment){i.push(t.comment)}return i.join(" ")}function cd(t){if(typeof t==="string"){var e=t.trim().split(/\s+/);if(e.length<2){throw new Vh("SSH certificate string","type base64 [comment]")}var i=e[0];var r=new Uint8Array(u.Convert.FromBase64(e[1]));var n=e.length>2?e.slice(2).join(" "):undefined;var a=new $h(r);var o=a.readString();if(o!==i){throw new Vh("certificate blob type ".concat(o),"expected ".concat(i))}return{type:i,keyData:r,comment:n}}else{var a=new $h(t);var s=a.readString();var c=t.slice(a.getOffset());return{type:s,keyData:c}}}function fd(t){var e=new $h(t);var i=e.readString();var r=e.readBytes(e.readUint32());var n=od.certTypeToKeyType(i);if(!n){throw new Lh(i,od.getSupportedCertTypes())}var a=od.get(n);var o=a.parsePublicKey(e);var s=n;var u=e.readUint64();var c=e.readUint32();var f=c===1?"user":"host";var v=e.readString();var h=e.readUint32();var d=e.readBytes(h);var l=[];if(d.length>0){var p=new $h(d);while(p.getOffset()<d.length){try{var y=p.readString();l.push(y)}catch(t){break}}}var S=e.readUint64();var A=e.readUint64();var C={};var m=e.readUint32();var g=e.readBytes(m);if(g.length>0){var w=new $h(g);while(w.getOffset()<g.length){try{var _=w.readString();var b=w.readBytes(w.readUint32());var E=b.length===0?"":Zh.decode(b);C[_]=E}catch(t){break}}}var P={};var D=e.readUint32();var I=e.readBytes(D);if(I.length>0){var B=new $h(I);while(B.getOffset()<I.length){try{var x=B.readString();var b=B.readBytes(B.readUint32());var T=b.length===0?"":Zh.decode(b);P[x]=T}catch(t){break}}}var O=e.readUint32();var k=e.readBytes(O);var M=e.readUint32();var R=e.readBytes(M);var N=new $h(R);var K=N.readString();var j={type:K,keyData:R};var H=e.readUint32();var U=e.readBytes(H);return{nonce:r,keyType:s,publicKey:o,serial:u,type:f,keyId:v,validPrincipals:l,validAfter:S,validBefore:A,criticalOptions:C,extensions:P,reserved:k,signatureKey:j,signature:U}}function vd(t){var e=u.Convert.ToBase64(t.keyData);var i=[t.type,e];if(t.comment){i.push(t.comment)}return i.join(" ")}function hd(t){var e=new $h(t);if(t.length>=6&&(new TextDecoder).decode(t.subarray(0,6))==="SSHSIG"){return dd(e)}else{return ld(e)}}function dd(t){var e=t.readBytes(6);var i=(new TextDecoder).decode(e);if(i!=="SSHSIG"){throw new Vh(i,"SSHSIG")}var r=t.readUint32();var n=t.readUint32();var a=t.readBytes(n);var o=t.readString();var s=t.readString();var u=t.readString();var c=t.readUint32();var f=t.readBytes(c);var v=new $h(f);var h=v.readString();var d=v.readUint32();var l=v.readBytes(d);return{format:"ssh-signature",algorithm:h,signature:l,version:r,publicKey:a,namespace:o,reserved:s,hashAlgorithm:u}}function ld(t){var e=t.readString();var i=t.readUint32();var r=t.readBytes(i);return{format:"legacy",algorithm:e,signature:r}}function pd(t){if(t.format==="ssh-signature"){return yd(t)}else{return Sd(t)}}function yd(t){var e=new Xh;e.writeBytes((new TextEncoder).encode("SSHSIG"));e.writeUint32(t.version||1);if(t.publicKey){e.writeUint32(t.publicKey.length);e.writeBytes(t.publicKey)}else{e.writeUint32(0)}e.writeString(t.namespace||"file");e.writeString(t.reserved||"");e.writeString(t.hashAlgorithm||"sha512");var i=new Xh;i.writeString(t.algorithm);i.writeUint32(t.signature.length);i.writeBytes(t.signature);var r=i.toUint8Array();e.writeUint32(r.length);e.writeBytes(r);return e.toUint8Array()}function Sd(t){var e=new Xh;e.writeString(t.algorithm);e.writeUint32(t.signature.length);e.writeBytes(t.signature);return e.toUint8Array()}var Ad=function(){function t(){}return t}();var Cd=function(t){__extends(e,t);function e(i){var r=t.call(this)||this;r.type=e.TYPE;r.blob=i;return r}e.prototype.getCryptoKey=function(){return __awaiter(this,arguments,void 0,(function(t){var e,i;if(t===void 0){t=Uh()}return __generator(this,(function(r){switch(r.label){case 0:if(!!this.cachedCryptoKey)return[3,2];e=od.get(this.blob.type);i=this;return[4,e.importPublicSsh({blob:this.blob.keyData,crypto:t})];case 1:i.cachedCryptoKey=r.sent();r.label=2;case 2:return[2,this.cachedCryptoKey]}}))}))};e.fromSSH=function(t){return __awaiter(this,arguments,void 0,(function(t,i){var r,n;if(i===void 0){i=Uh()}return __generator(this,(function(a){switch(a.label){case 0:r=sd(t);n=od.get(r.type);return[4,n.importPublicSsh({blob:r.keyData,crypto:i})];case 1:a.sent();return[2,new e(r)]}}))}))};e.fromSPKI=function(t,i){return __awaiter(this,arguments,void 0,(function(t,i,r){var n,a,o,s;if(r===void 0){r=Uh()}return __generator(this,(function(u){switch(u.label){case 0:n=od.get(i);return[4,n.importPublicSpki({spki:t,crypto:r})];case 1:a=u.sent();return[4,n.exportPublicSsh({publicKey:a,crypto:r})];case 2:o=u.sent();s={type:i,keyData:o};return[2,new e(s)]}}))}))};e.fromWebCrypto=function(t,i){return __awaiter(this,arguments,void 0,(function(t,i,r){var n,a,o,s;if(r===void 0){r=Uh()}return __generator(this,(function(u){switch(u.label){case 0:n=i||od.getSshTypeFromCryptoKey(t);a=od.get(n);return[4,a.exportPublicSsh({publicKey:t,crypto:r})];case 1:o=u.sent();s={type:n,keyData:o};return[2,new e(s)]}}))}))};e.prototype.export=function(){return __awaiter(this,arguments,void 0,(function(t,e){var i,r,n;if(t===void 0){t="ssh"}if(e===void 0){e=Uh()}return __generator(this,(function(a){switch(a.label){case 0:if(!(t==="ssh"))return[3,1];return[2,ud(this.blob)];case 1:if(!(t==="spki"))return[3,4];return[4,this.getCryptoKey(e)];case 2:i=a.sent();r=od.get(this.blob.type);return[4,r.exportPublicSpki({publicKey:i,crypto:e})];case 3:n=a.sent();return[2,new Uint8Array(n)];case 4:throw new Gh("Unsupported export format: ".concat(t))}}))}))};e.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.export("ssh")];case 1:t=e.sent();return[2,t]}}))}))};e.prototype.toSPKI=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.export("spki")];case 1:t=e.sent();return[2,t]}}))}))};e.prototype.toWebCrypto=function(){return __awaiter(this,arguments,void 0,(function(t){if(t===void 0){t=Uh()}return __generator(this,(function(e){return[2,this.getCryptoKey(t)]}))}))};e.prototype.verify=function(t,e,i){return __awaiter(this,arguments,void 0,(function(t,e,i,r){var n,a;if(r===void 0){r=Uh()}return __generator(this,(function(o){switch(o.label){case 0:n=od.get(t);return[4,this.toWebCrypto(r)];case 1:a=o.sent();return[2,n.verify({publicKey:a,signature:e,data:i,crypto:r})]}}))}))};Object.defineProperty(e.prototype,"keyType",{get:function(){return this.blob.type},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"comment",{get:function(){return this.blob.comment},enumerable:false,configurable:true});e.prototype.getBlob=function(){return __assign({},this.blob)};e.prototype.thumbprint=function(){return __awaiter(this,arguments,void 0,(function(t,e){var i,r,n;if(t===void 0){t="sha256"}if(e===void 0){e=Uh()}return __generator(this,(function(a){switch(a.label){case 0:i=t==="sha256"?"SHA-256":"SHA-512";r=this.blob.keyData;return[4,e.subtle.digest(i,r)];case 1:n=a.sent();return[2,new Uint8Array(n)]}}))}))};e.TYPE="public-key";return e}(Ad);var md=function(t){__extends(e,t);function e(i){var r=t.call(this)||this;r.type=e.TYPE;r.blob=i;r.format=i.format;r.algorithm=i.algorithm;r.signature=i.signature;r.version=i.version;r.namespace=i.namespace;r.reserved=i.reserved;r.hashAlgorithm=i.hashAlgorithm;if(i.publicKey){var n=new $h(i.publicKey);var a=n.readString();r.publicKey=new Cd({type:a,keyData:i.publicKey})}return r}e.parse=function(t){var i=hd(t);return new e(i)};e.fromBlob=function(t){return new e(t)};e.fromBase64=function(t){var i=new Uint8Array(u.Convert.FromBase64(t));return e.parse(i)};e.fromText=function(t){var i=t.replace(/-----BEGIN SSH SIGNATURE-----/,"").replace(/-----END SSH SIGNATURE-----/,"").replace(/[\r\n\s]/g,"");return e.fromBase64(i)};e.prototype.serialize=function(){return pd(this.blob)};e.prototype.toBase64=function(){return u.Convert.ToBase64(this.serialize())};e.prototype.toText=function(){var t=this.toBase64();var e=[];for(var i=0;i<t.length;i+=70){e.push(t.substring(i,i+70))}return __spreadArray(__spreadArray(["-----BEGIN SSH SIGNATURE-----"],e,true),["-----END SSH SIGNATURE-----"],false).join("\n")};e.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.toText()]}))}))};e.prototype.verify=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i,r,n,a,o,s,u,c,f,v,h,d,l,p,y,S;return __generator(this,(function(A){switch(A.label){case 0:i=od.get(this.algorithm);return[4,e["getCryptoKey"]()];case 1:r=A.sent();n=Uh();a=t;if(!(this.format==="ssh-signature"))return[3,3];o=this.hashAlgorithm||"sha512";s=this.namespace||"file";u=this.reserved||"";c=o==="sha256"?"SHA-256":"SHA-512";return[4,n.subtle.digest(c,t)];case 2:f=A.sent();v=new Uint8Array(f);h=new Xh;h.writeBytes((new TextEncoder).encode("SSHSIG"));h.writeString(s);h.writeString(u);h.writeString(o);h.writeUint32(v.length);h.writeBytes(v);a=h.toUint8Array();A.label=3;case 3:if(this.algorithm==="rsa-sha2-256"){d="SHA-256"}else if(this.algorithm==="rsa-sha2-512"){d="SHA-512"}if(this.format==="legacy"||this.format==="ssh-signature"){p=new Xh;p.writeString(this.algorithm);p.writeUint32(this.signature.length);p.writeBytes(this.signature);y=p.toUint8Array();S=i.decodeSignature({signature:y});l=S.signature}else{l=this.signature}return[2,i.verify({publicKey:r,signature:l,data:a,crypto:n,hash:d})]}}))}))};e.fromLegacy=function(t,i){var r=od.get(t);var n=r.encodeSignature({signature:i,algo:t});var a=new $h(n);a.readString();var o=a.readUint32();var s=a.readBytes(o);return new e({format:"legacy",algorithm:t,signature:s})};e.fromSshSignature=function(t,i,r){if(r===void 0){r={}}var n={format:"ssh-signature",algorithm:t,signature:i,version:r.version||1,publicKey:r.publicKey?r.publicKey.getBlob().keyData:undefined,namespace:r.namespace||"file",reserved:r.reserved||"",hashAlgorithm:r.hashAlgorithm||"sha512"};return new e(n)};e.sign=function(t,i,r){return __awaiter(this,arguments,void 0,(function(t,i,r,n){var a,o,s,u,c,f,v,h,d,l,p,y,S,A,C,m,c,g,w,_,b;if(n===void 0){n={}}return __generator(this,(function(E){switch(E.label){case 0:a=n.format,o=a===void 0?"legacy":a,s=n.namespace,u=s===void 0?"file":s;if(!(o==="legacy"))return[3,2];return[4,i.sign(t,r)];case 1:c=E.sent();f=t||i.keyType;return[2,e.fromLegacy(f,c)];case 2:v=t;h=od.get(v);d=t==="rsa-sha2-256"?"sha256":"sha512";return[4,i.getPublicKey()];case 3:l=E.sent();p=Uh();y=d==="sha256"?"SHA-256":"SHA-512";return[4,p.subtle.digest(y,r)];case 4:S=E.sent();A=new Uint8Array(S);C=new Xh;C.writeBytes((new TextEncoder).encode("SSHSIG"));C.writeString(u);C.writeString("");C.writeString(d);C.writeUint32(A.length);C.writeBytes(A);m=C.toUint8Array();return[4,i.sign(v,m)];case 5:c=E.sent();g=h.encodeSignature({signature:c,algo:v});w=new $h(g);w.readString();_=w.readUint32();b=w.readBytes(_);return[2,e.fromSshSignature(v,b,{namespace:u,hashAlgorithm:d,publicKey:l})]}}))}))};e.TYPE="signature";return e}(Ad);var gd=(i=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;r.type=i.TYPE;r._blob=e;r.data=fd(e.keyData);r._validAfter=r.data.validAfter;r._validBefore=r.data.validBefore;r.keyId=r.data.keyId;r.principals=r.data.validPrincipals;r.certType=r.data.type;r.serial=r.data.serial;r.validAfter=new Date(Number(r.data.validAfter)*1e3);r.validBefore=new Date(Number(r.data.validBefore)*1e3);r.publicKey=new Cd(r.data.publicKey);r.signatureKey=new Cd(r.data.signatureKey);r.criticalOptions=__assign({},r.data.criticalOptions);r.extensions=__assign({},r.data.extensions);return r}e.fromSSH=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=cd(t);return[2,new i(e)]}))}))};e.fromBlob=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,new i(t)]}))}))};e.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,vd(this._blob)]}))}))};e.prototype.toBlob=function(){return __assign({},this._blob)};Object.defineProperty(e.prototype,"blob",{get:function(){return this.toBlob()},enumerable:false,configurable:true});e.prototype.validate=function(t){if(t===void 0){t=new Date}var e=BigInt(Math.floor(t.getTime()/1e3));var i=this._validAfter;var r=this._validBefore;var n=0xffffffffffffffffn;var a=r===n?e:r;return e>=i&&e<=a};e.prototype.verify=function(t){return __awaiter(this,arguments,void 0,(function(t,e){var i,r,n,a,o;if(e===void 0){e=Uh()}return __generator(this,(function(s){switch(s.label){case 0:i=t||this.signatureKey;r=this.getSignedData();n=md.parse(this.data.signature);a=od.get(n.algorithm);return[4,i.toWebCrypto(e)];case 1:o=s.sent();return[2,a.verify({publicKey:o,signature:n.signature,data:r,crypto:e})]}}))}))};e.prototype.getSignedData=function(){var t=new $h(this._blob.keyData);t.readString();t.readBytes(t.readUint32());if(this.data.keyType==="ssh-ed25519"){t.readBytes(t.readUint32())}else if(this.data.keyType==="ssh-rsa"){t.readBytes(t.readUint32());t.readBytes(t.readUint32())}else if(this.data.keyType.startsWith("ecdsa-sha2-")){t.readString();t.readBytes(t.readUint32())}t.readUint64();t.readUint32();t.readBytes(t.readUint32());t.readBytes(t.readUint32());t.readUint64();t.readUint64();t.readBytes(t.readUint32());t.readBytes(t.readUint32());t.readBytes(t.readUint32());t.readBytes(t.readUint32());var e=t.getOffset();return this._blob.keyData.slice(0,e)};return e}(Ad),i.TYPE="certificate",i);var wd=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(t,i):n?n.value=i:e.set(t,i),i};var _d=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,r){if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?r:i==="a"?r.call(t):r?r.value:e.get(t)};var bd;var Ed=function(){function t(t){bd.set(this,void 0);var e=cd(t.trim());wd(this,bd,new gd(e),"f");this.notBefore=_d(this,bd,"f").validAfter;this.notAfter=_d(this,bd,"f").validBefore;this.validity=co(this.notBefore,this.notAfter);this.type=[_d(this,bd,"f").blob.type,_d(this,bd,"f").certType,_d(this,bd,"f").type].join(" ");this.serialNumber=_d(this,bd,"f").serial.toString();this.keyId=_d(this,bd,"f").keyId;this.principals=_d(this,bd,"f").principals;this.extensions=_d(this,bd,"f").extensions;this.criticalOptions=_d(this,bd,"f").criticalOptions}t.prototype.parseSignatureKey=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r;var n;return __generator(this,(function(a){switch(a.label){case 0:return[4,_d(this,bd,"f").signatureKey.toWebCrypto()];case 1:t=a.sent();e=_d(this,bd,"f").signatureKey.getBlob();return[4,_d(this,bd,"f").signatureKey.thumbprint("sha256")];case 2:i=a.sent();r=this;n={algorithm:t.algorithm.name,type:e.type};return[4,_d(this,bd,"f").signatureKey.toSSH()];case 3:r.signatureKey=(n.value=a.sent(),n.thumbprint=u.Convert.ToBase64(i),n);return[2]}}))}))};t.prototype.parsePublicKey=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r;var n;return __generator(this,(function(a){switch(a.label){case 0:return[4,_d(this,bd,"f").publicKey.toWebCrypto()];case 1:t=a.sent();e=_d(this,bd,"f").publicKey.getBlob();return[4,_d(this,bd,"f").publicKey.thumbprint("sha256")];case 2:i=a.sent();r=this;n={algorithm:t.algorithm.name,type:e.type};return[4,_d(this,bd,"f").publicKey.toSSH()];case 3:r.publicKey=(n.value=a.sent(),n.thumbprint=u.Convert.ToBase64(i),n);return[2]}}))}))};t.prototype.toString=function(){return __awaiter(this,arguments,void 0,(function(t){if(t===void 0){t="pem"}return __generator(this,(function(t){return[2,_d(this,bd,"f").toSSH()]}))}))};return t}();t("bm",Ed);bd=new WeakMap}}}));
|
|
135
|
-
//# sourceMappingURL=p-
|
|
134
|
+
*/var Qc=t("c",(function(t){if(Vc.isPem(t)){return Vc.decode(t)[0]}if(u.Convert.isHex(t)){return u.Convert.FromHex(t)}if(u.Convert.isBase64(t)){return u.Convert.FromBase64(t)}if(u.Convert.isBase64Url(t)){return u.Convert.FromBase64Url(t)}return u.Convert.FromBinary(t)}));var qc=t("m",(function(t,i){return __awaiter(e,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=Wc.get();if(e.subtle){return[2,e.subtle.digest(t,i)]}return[2,undefined]}))}))}));var zc=function(){function t(t){if(t===void 0){t={}}this.acIssuer=new ji;this.acSerial=0;this.attrs=[];Object.assign(this,t)}return t}();bi([Ai({type:ji})],zc.prototype,"acIssuer",void 0);bi([Ai({type:Ke.Integer})],zc.prototype,"acSerial",void 0);bi([Ai({type:rn,repeated:"sequence"})],zc.prototype,"attrs",void 0);var Yc;var Zc=Yc=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Yc.prototype);return i}return e}(wi);Zc=Yc=bi([Si({type:Ne.Sequence,itemType:Ke.ObjectIdentifier})],Zc);var $c=function(){function t(t){if(t===void 0){t={}}this.permitUnSpecified=true;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer,optional:true})],$c.prototype,"pathLenConstraint",void 0);bi([Ai({type:Zc,implicit:true,context:0,optional:true})],$c.prototype,"permittedAttrs",void 0);bi([Ai({type:Zc,implicit:true,context:1,optional:true})],$c.prototype,"excludedAttrs",void 0);bi([Ai({type:Ke.Boolean,defaultValue:true})],$c.prototype,"permitUnSpecified",void 0);var Xc=function(){function t(t){if(t===void 0){t={}}this.issuer=new Xi;this.serial=new ArrayBuffer(0);this.issuerUID=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Xi})],Xc.prototype,"issuer",void 0);bi([Ai({type:Ke.Integer,converter:Ve})],Xc.prototype,"serial",void 0);bi([Ai({type:Ke.BitString,optional:true})],Xc.prototype,"issuerUID",void 0);var Jc;(function(t){t[t["publicKey"]=0]="publicKey";t[t["publicKeyCert"]=1]="publicKeyCert";t[t["otherObjectTypes"]=2]="otherObjectTypes"})(Jc||(Jc={}));var tf=function(){function t(t){if(t===void 0){t={}}this.digestedObjectType=Jc.publicKey;this.digestAlgorithm=new An;this.objectDigest=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.Enumerated})],tf.prototype,"digestedObjectType",void 0);bi([Ai({type:Ke.ObjectIdentifier,optional:true})],tf.prototype,"otherObjectTypeID",void 0);bi([Ai({type:An})],tf.prototype,"digestAlgorithm",void 0);bi([Ai({type:Ke.BitString})],tf.prototype,"objectDigest",void 0);var ef=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:Xi,optional:true})],ef.prototype,"issuerName",void 0);bi([Ai({type:Xc,context:0,implicit:true,optional:true})],ef.prototype,"baseCertificateID",void 0);bi([Ai({type:tf,context:1,implicit:true,optional:true})],ef.prototype,"objectDigestInfo",void 0);var rf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:ji,repeated:"sequence"})],rf.prototype,"v1Form",void 0);bi([Ai({type:ef,context:0,implicit:true})],rf.prototype,"v2Form",void 0);rf=bi([Si({type:Ne.Choice})],rf);var nf=function(){function t(t){if(t===void 0){t={}}this.notBeforeTime=new Date;this.notAfterTime=new Date;Object.assign(this,t)}return t}();bi([Ai({type:Ke.GeneralizedTime})],nf.prototype,"notBeforeTime",void 0);bi([Ai({type:Ke.GeneralizedTime})],nf.prototype,"notAfterTime",void 0);var af=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:Xc,implicit:true,context:0,optional:true})],af.prototype,"baseCertificateID",void 0);bi([Ai({type:Xi,implicit:true,context:1,optional:true})],af.prototype,"entityName",void 0);bi([Ai({type:tf,implicit:true,context:2,optional:true})],af.prototype,"objectDigestInfo",void 0);var of;(function(t){t[t["v2"]=1]="v2"})(of||(of={}));var sf=function(){function t(t){if(t===void 0){t={}}this.version=of.v2;this.holder=new af;this.issuer=new rf;this.signature=new An;this.serialNumber=new ArrayBuffer(0);this.attrCertValidityPeriod=new nf;this.attributes=[];Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],sf.prototype,"version",void 0);bi([Ai({type:af})],sf.prototype,"holder",void 0);bi([Ai({type:rf})],sf.prototype,"issuer",void 0);bi([Ai({type:An})],sf.prototype,"signature",void 0);bi([Ai({type:Ke.Integer,converter:Ve})],sf.prototype,"serialNumber",void 0);bi([Ai({type:nf})],sf.prototype,"attrCertValidityPeriod",void 0);bi([Ai({type:rn,repeated:"sequence"})],sf.prototype,"attributes",void 0);bi([Ai({type:Ke.BitString,optional:true})],sf.prototype,"issuerUniqueID",void 0);bi([Ai({type:bn,optional:true})],sf.prototype,"extensions",void 0);var uf=function(){function t(t){if(t===void 0){t={}}this.acinfo=new sf;this.signatureAlgorithm=new An;this.signatureValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();t("n",uf);bi([Ai({type:sf})],uf.prototype,"acinfo",void 0);bi([Ai({type:An})],uf.prototype,"signatureAlgorithm",void 0);bi([Ai({type:Ke.BitString})],uf.prototype,"signatureValue",void 0);var cf;(function(t){t[t["unmarked"]=1]="unmarked";t[t["unclassified"]=2]="unclassified";t[t["restricted"]=4]="restricted";t[t["confidential"]=8]="confidential";t[t["secret"]=16]="secret";t[t["topSecret"]=32]="topSecret"})(cf||(cf={}));var ff=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(je);var vf=function(){function t(t){if(t===void 0){t={}}this.type="";this.value=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier,implicit:true,context:0})],vf.prototype,"type",void 0);bi([Ai({type:Ke.Any,implicit:true,context:1})],vf.prototype,"value",void 0);var hf=function(){function t(t){if(t===void 0){t={}}this.policyId="";this.classList=new ff(cf.unclassified);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],hf.prototype,"policyId",void 0);bi([Ai({type:ff,defaultValue:new ff(cf.unclassified)})],hf.prototype,"classList",void 0);bi([Ai({type:vf,repeated:"set"})],hf.prototype,"securityCategories",void 0);var df=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:He})],df.prototype,"cotets",void 0);bi([Ai({type:Ke.ObjectIdentifier})],df.prototype,"oid",void 0);bi([Ai({type:Ke.Utf8String})],df.prototype,"string",void 0);var lf=function(){function t(t){if(t===void 0){t={}}this.values=[];Object.assign(this,t)}return t}();bi([Ai({type:Xi,implicit:true,context:0,optional:true})],lf.prototype,"policyAuthority",void 0);bi([Ai({type:df,repeated:"sequence"})],lf.prototype,"values",void 0);var pf;var yf=function(){function t(t){if(t===void 0){t={}}this.targetCertificate=new Xc;Object.assign(this,t)}return t}();bi([Ai({type:Xc})],yf.prototype,"targetCertificate",void 0);bi([Ai({type:ji,optional:true})],yf.prototype,"targetName",void 0);bi([Ai({type:tf,optional:true})],yf.prototype,"certDigestInfo",void 0);var Sf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:ji,context:0,implicit:true})],Sf.prototype,"targetName",void 0);bi([Ai({type:ji,context:1,implicit:true})],Sf.prototype,"targetGroup",void 0);bi([Ai({type:yf,context:2,implicit:true})],Sf.prototype,"targetCert",void 0);Sf=bi([Si({type:Ne.Choice})],Sf);var Af=pf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,pf.prototype);return i}return e}(wi);Af=pf=bi([Si({type:Ne.Sequence,itemType:Sf})],Af);var Cf;var mf=Cf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Cf.prototype);return i}return e}(wi);mf=Cf=bi([Si({type:Ne.Sequence,itemType:Af})],mf);var gf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:Xi,implicit:true,context:0,optional:true})],gf.prototype,"roleAuthority",void 0);bi([Ai({type:ji,implicit:true,context:1})],gf.prototype,"roleName",void 0);var wf=function(){function t(t){if(t===void 0){t={}}this.service=new ji;this.ident=new ji;Object.assign(this,t)}return t}();bi([Ai({type:ji})],wf.prototype,"service",void 0);bi([Ai({type:ji})],wf.prototype,"ident",void 0);bi([Ai({type:He,optional:true})],wf.prototype,"authInfo",void 0);var _f="0.4.0.9496";var bf=t("L","".concat(_f,".6"));var Ef=t("u",function(){function t(t){if(t===void 0){t={}}this.codeAuthority=new ji;this.codeId=new ji;this.shortName="";this.shortDescription="";Object.assign(this,t)}return t}());bi([Ai({type:ji,context:0})],Ef.prototype,"codeAuthority",void 0);bi([Ai({type:ji,context:1})],Ef.prototype,"codeId",void 0);bi([Ai({type:Ke.Utf8String,context:2})],Ef.prototype,"shortName",void 0);bi([Ai({type:Ke.Utf8String,context:3})],Ef.prototype,"shortDescription",void 0);t("u",Ef=bi([Si({type:Ne.Sequence})],Ef));var Pf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Mi);Pf=bi([Si({type:Ne.Sequence})],Pf);var Df=t("X","".concat(_f,".1"));var If=t("y",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("y",If=bi([Si({type:Ne.Sequence})],If));var Bf=t("S","".concat(_f,".2"));var xf=t("x",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("x",xf=bi([Si({type:Ne.Sequence})],xf));var Tf=t("Q","".concat(_f,".3"));var Of=t("w",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("w",Of=bi([Si({type:Ne.Sequence})],Of));var kf=t("O","".concat(_f,".4"));var Mf=t("v",function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Mi.prototype);return i}return e}(Pf));t("v",Mf=bi([Si({type:Ne.Sequence})],Mf));var Rf=t("J","".concat(_f,".8"));var Nf=t("I",function(){function t(t){if(t===void 0){t={}}this.location="";this.base=0;this.degree=0;Object.assign(this,t)}t.prototype.toString=function(){return"".concat(this.base," x 10^").concat(this.degree," ").concat(this.location)};return t}());bi([Ai({type:Ke.PrintableString})],Nf.prototype,"location",void 0);bi([Ai({type:Ke.Integer})],Nf.prototype,"base",void 0);bi([Ai({type:Ke.Integer})],Nf.prototype,"degree",void 0);t("I",Nf=bi([Si({type:Ne.Sequence})],Nf));var Kf=t("H","".concat(_f,".9"));var jf=t("V",function(){function t(t){if(t===void 0){t={}}this.stars5=0;this.stars4=0;this.stars3=0;this.stars2=0;this.stars1=0;Object.assign(this,t)}return t}());bi([Ai({type:Ke.Integer})],jf.prototype,"stars5",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars4",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars3",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars2",void 0);bi([Ai({type:Ke.Integer})],jf.prototype,"stars1",void 0);t("V",jf=bi([Si({type:Ne.Sequence})],jf));var Hf=t("M","".concat(_f,".5"));var Uf=t("T",function(){function t(t){if(t===void 0){t={}}this.DNBvsDNO=new je(0);this.DNBvsDNT=new je(0);this.DNOvsDNT=new je(0);Object.assign(this,t)}return t}());bi([Ai({type:je,context:0})],Uf.prototype,"DNBvsDNO",void 0);bi([Ai({type:je,context:1})],Uf.prototype,"DNBvsDNT",void 0);bi([Ai({type:je,context:2})],Uf.prototype,"DNOvsDNT",void 0);t("T",Uf=bi([Si({type:Ne.Sequence})],Uf));var Ff=t("K","".concat(_f,".7"));var Lf=t("W",function(){function t(t){if(t===void 0){t={}}this.assessmentAuthority=new ji;this.assessmentRef=new ji;this.assessmentLocation=new ji;this.dataStorageTerritory="";this.description="";Object.assign(this,t)}return t}());bi([Ai({type:ji,context:0})],Lf.prototype,"assessmentAuthority",void 0);bi([Ai({type:ji,context:1})],Lf.prototype,"assessmentRef",void 0);bi([Ai({type:ji,context:2})],Lf.prototype,"assessmentLocation",void 0);bi([Ai({type:Ke.PrintableString,context:3})],Lf.prototype,"dataStorageTerritory",void 0);bi([Ai({type:Ke.Utf8String,context:4})],Lf.prototype,"description",void 0);t("W",Lf=bi([Si({type:Ne.Sequence})],Lf));var Vf=function(){function t(t){if(t===void 0){t={}}this.issuer=new Mi;this.serialNumber=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Mi})],Vf.prototype,"issuer",void 0);bi([Ai({type:Ke.Integer,converter:Ve})],Vf.prototype,"serialNumber",void 0);var Gf=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:un,context:0,implicit:true})],Gf.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Vf})],Gf.prototype,"issuerAndSerialNumber",void 0);Gf=bi([Si({type:Ne.Choice})],Gf);var Wf;(function(t){t[t["v0"]=0]="v0";t[t["v1"]=1]="v1";t[t["v2"]=2]="v2";t[t["v3"]=3]="v3";t[t["v4"]=4]="v4";t[t["v5"]=5]="v5"})(Wf||(Wf={}));var Qf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Qf=bi([Si({type:Ne.Sequence})],Qf);var qf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);qf=bi([Si({type:Ne.Sequence})],qf);var zf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);zf=bi([Si({type:Ne.Sequence})],zf);var Yf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Yf=bi([Si({type:Ne.Sequence})],Yf);var Zf=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Zf=bi([Si({type:Ne.Sequence})],Zf);var $f=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);$f=bi([Si({type:Ne.Sequence})],$f);var Xf=function(){function t(t){if(t===void 0){t={}}this.attrType="";this.attrValues=[];Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Xf.prototype,"attrType",void 0);bi([Ai({type:Ke.Any,repeated:"set"})],Xf.prototype,"attrValues",void 0);var Jf;var tv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.sid=new Gf;this.digestAlgorithm=new Qf;this.signatureAlgorithm=new qf;this.signature=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],tv.prototype,"version",void 0);bi([Ai({type:Gf})],tv.prototype,"sid",void 0);bi([Ai({type:Qf})],tv.prototype,"digestAlgorithm",void 0);bi([Ai({type:Xf,repeated:"set",context:0,implicit:true,optional:true})],tv.prototype,"signedAttrs",void 0);bi([Ai({type:qf})],tv.prototype,"signatureAlgorithm",void 0);bi([Ai({type:He})],tv.prototype,"signature",void 0);bi([Ai({type:Xf,repeated:"set",context:1,implicit:true,optional:true})],tv.prototype,"unsignedAttrs",void 0);var ev=Jf=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Jf.prototype);return i}return e}(wi);ev=Jf=bi([Si({type:Ne.Set,itemType:tv})],ev);var iv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(mn);iv=bi([Si({type:Ne.Choice})],iv);var rv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(tv);rv=bi([Si({type:Ne.Sequence})],rv);var nv;var av=function(){function t(t){if(t===void 0){t={}}this.otherCertFormat="";this.otherCert=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],av.prototype,"otherCertFormat",void 0);bi([Ai({type:Ke.Any})],av.prototype,"otherCert",void 0);var ov=t("bk",function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}());bi([Ai({type:Dn})],ov.prototype,"certificate",void 0);bi([Ai({type:uf,context:2,implicit:true})],ov.prototype,"v2AttrCert",void 0);bi([Ai({type:av,context:3,implicit:true})],ov.prototype,"other",void 0);t("bk",ov=bi([Si({type:Ne.Choice})],ov));var sv=t("bj",nv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,nv.prototype);return i}return e}(wi));t("bj",sv=nv=bi([Si({type:Ne.Set,itemType:ov})],sv));var uv=function(){function t(t){if(t===void 0){t={}}this.contentType="";this.content=new ArrayBuffer(0);Object.assign(this,t)}return t}();t("bl",uv);bi([Ai({type:Ke.ObjectIdentifier})],uv.prototype,"contentType",void 0);bi([Ai({type:Ke.Any,context:0})],uv.prototype,"content",void 0);var cv=t("bi",function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}());bi([Ai({type:He})],cv.prototype,"single",void 0);bi([Ai({type:Ke.Any})],cv.prototype,"any",void 0);t("bi",cv=bi([Si({type:Ne.Choice})],cv));var fv=function(){function t(t){if(t===void 0){t={}}this.eContentType="";Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],fv.prototype,"eContentType",void 0);bi([Ai({type:cv,context:0,optional:true})],fv.prototype,"eContent",void 0);var vv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:He,context:0,implicit:true,optional:true})],vv.prototype,"value",void 0);bi([Ai({type:He,converter:ze,context:0,implicit:true,optional:true,repeated:"sequence"})],vv.prototype,"constructedValue",void 0);vv=bi([Si({type:Ne.Choice})],vv);var hv=function(){function t(t){if(t===void 0){t={}}this.contentType="";this.contentEncryptionAlgorithm=new Yf;Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],hv.prototype,"contentType",void 0);bi([Ai({type:Yf})],hv.prototype,"contentEncryptionAlgorithm",void 0);bi([Ai({type:vv,optional:true})],hv.prototype,"encryptedContent",void 0);var dv=function(){function t(t){if(t===void 0){t={}}this.keyAttrId="";Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],dv.prototype,"keyAttrId",void 0);bi([Ai({type:Ke.Any,optional:true})],dv.prototype,"keyAttr",void 0);var lv;var pv=function(){function t(t){if(t===void 0){t={}}this.subjectKeyIdentifier=new un;Object.assign(this,t)}return t}();bi([Ai({type:un})],pv.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Ke.GeneralizedTime,optional:true})],pv.prototype,"date",void 0);bi([Ai({type:dv,optional:true})],pv.prototype,"other",void 0);var yv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:pv,context:0,implicit:true,optional:true})],yv.prototype,"rKeyId",void 0);bi([Ai({type:Vf,optional:true})],yv.prototype,"issuerAndSerialNumber",void 0);yv=bi([Si({type:Ne.Choice})],yv);var Sv=function(){function t(t){if(t===void 0){t={}}this.rid=new yv;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:yv})],Sv.prototype,"rid",void 0);bi([Ai({type:He})],Sv.prototype,"encryptedKey",void 0);var Av=lv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,lv.prototype);return i}return e}(wi);Av=lv=bi([Si({type:Ne.Sequence,itemType:Sv})],Av);var Cv=function(){function t(t){if(t===void 0){t={}}this.algorithm=new An;this.publicKey=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:An})],Cv.prototype,"algorithm",void 0);bi([Ai({type:Ke.BitString})],Cv.prototype,"publicKey",void 0);var mv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:un,context:0,implicit:true,optional:true})],mv.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Cv,context:1,implicit:true,optional:true})],mv.prototype,"originatorKey",void 0);bi([Ai({type:Vf,optional:true})],mv.prototype,"issuerAndSerialNumber",void 0);mv=bi([Si({type:Ne.Choice})],mv);var gv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v3;this.originator=new mv;this.keyEncryptionAlgorithm=new zf;this.recipientEncryptedKeys=new Av;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],gv.prototype,"version",void 0);bi([Ai({type:mv,context:0})],gv.prototype,"originator",void 0);bi([Ai({type:He,context:1,optional:true})],gv.prototype,"ukm",void 0);bi([Ai({type:zf})],gv.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:Av})],gv.prototype,"recipientEncryptedKeys",void 0);var wv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:un,context:0,implicit:true})],wv.prototype,"subjectKeyIdentifier",void 0);bi([Ai({type:Vf})],wv.prototype,"issuerAndSerialNumber",void 0);wv=bi([Si({type:Ne.Choice})],wv);var _v=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.rid=new wv;this.keyEncryptionAlgorithm=new zf;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],_v.prototype,"version",void 0);bi([Ai({type:wv})],_v.prototype,"rid",void 0);bi([Ai({type:zf})],_v.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:He})],_v.prototype,"encryptedKey",void 0);var bv=function(){function t(t){if(t===void 0){t={}}this.keyIdentifier=new He;Object.assign(this,t)}return t}();bi([Ai({type:He})],bv.prototype,"keyIdentifier",void 0);bi([Ai({type:Ke.GeneralizedTime,optional:true})],bv.prototype,"date",void 0);bi([Ai({type:dv,optional:true})],bv.prototype,"other",void 0);var Ev=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v4;this.kekid=new bv;this.keyEncryptionAlgorithm=new zf;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Ev.prototype,"version",void 0);bi([Ai({type:bv})],Ev.prototype,"kekid",void 0);bi([Ai({type:zf})],Ev.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:He})],Ev.prototype,"encryptedKey",void 0);var Pv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.keyEncryptionAlgorithm=new zf;this.encryptedKey=new He;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Pv.prototype,"version",void 0);bi([Ai({type:$f,context:0,optional:true})],Pv.prototype,"keyDerivationAlgorithm",void 0);bi([Ai({type:zf})],Pv.prototype,"keyEncryptionAlgorithm",void 0);bi([Ai({type:He})],Pv.prototype,"encryptedKey",void 0);var Dv=function(){function t(t){if(t===void 0){t={}}this.oriType="";this.oriValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Dv.prototype,"oriType",void 0);bi([Ai({type:Ke.Any})],Dv.prototype,"oriValue",void 0);var Iv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:_v,optional:true})],Iv.prototype,"ktri",void 0);bi([Ai({type:gv,context:1,implicit:true,optional:true})],Iv.prototype,"kari",void 0);bi([Ai({type:Ev,context:2,implicit:true,optional:true})],Iv.prototype,"kekri",void 0);bi([Ai({type:Pv,context:3,implicit:true,optional:true})],Iv.prototype,"pwri",void 0);bi([Ai({type:Dv,context:4,implicit:true,optional:true})],Iv.prototype,"ori",void 0);Iv=bi([Si({type:Ne.Choice})],Iv);var Bv;var xv=Bv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Bv.prototype);return i}return e}(wi);xv=Bv=bi([Si({type:Ne.Set,itemType:Iv})],xv);var Tv;var Ov=function(){function t(t){if(t===void 0){t={}}this.otherRevInfoFormat="";this.otherRevInfo=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Ov.prototype,"otherRevInfoFormat",void 0);bi([Ai({type:Ke.Any})],Ov.prototype,"otherRevInfo",void 0);var kv=function(){function t(t){if(t===void 0){t={}}this.other=new Ov;Object.assign(this,t)}return t}();bi([Ai({type:Ov,context:1,implicit:true})],kv.prototype,"other",void 0);kv=bi([Si({type:Ne.Choice})],kv);var Mv=Tv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Tv.prototype);return i}return e}(wi);Mv=Tv=bi([Si({type:Ne.Set,itemType:kv})],Mv);var Rv=function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}();bi([Ai({type:sv,context:0,implicit:true,optional:true})],Rv.prototype,"certs",void 0);bi([Ai({type:Mv,context:1,implicit:true,optional:true})],Rv.prototype,"crls",void 0);var Nv;var Kv=Nv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Nv.prototype);return i}return e}(wi);Kv=Nv=bi([Si({type:Ne.Set,itemType:Xf})],Kv);var jv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.recipientInfos=new xv;this.encryptedContentInfo=new hv;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],jv.prototype,"version",void 0);bi([Ai({type:Rv,context:0,implicit:true,optional:true})],jv.prototype,"originatorInfo",void 0);bi([Ai({type:xv})],jv.prototype,"recipientInfos",void 0);bi([Ai({type:hv})],jv.prototype,"encryptedContentInfo",void 0);bi([Ai({type:Kv,context:1,implicit:true,optional:true})],jv.prototype,"unprotectedAttrs",void 0);var Hv;var Uv=Hv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Hv.prototype);return i}return e}(wi);Uv=Hv=bi([Si({type:Ne.Set,itemType:Qf})],Uv);var Fv=function(){function t(t){if(t===void 0){t={}}this.version=Wf.v0;this.digestAlgorithms=new Uv;this.encapContentInfo=new fv;this.signerInfos=new ev;Object.assign(this,t)}return t}();t("bh",Fv);bi([Ai({type:Ke.Integer})],Fv.prototype,"version",void 0);bi([Ai({type:Uv})],Fv.prototype,"digestAlgorithms",void 0);bi([Ai({type:fv})],Fv.prototype,"encapContentInfo",void 0);bi([Ai({type:sv,context:0,implicit:true,optional:true})],Fv.prototype,"certificates",void 0);bi([Ai({type:Mv,context:1,implicit:true,optional:true})],Fv.prototype,"crls",void 0);bi([Ai({type:ev})],Fv.prototype,"signerInfos",void 0);var Lv;var Vv=function(){function t(t){if(t===void 0){t={}}this.attrId="";this.attrValues=[];Object.assign(t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],Vv.prototype,"attrId",void 0);bi([Ai({type:Ke.Any,repeated:"set"})],Vv.prototype,"attrValues",void 0);var Gv=Lv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Lv.prototype);return i}return e}(wi);Gv=Lv=bi([Si({type:Ne.Sequence,itemType:Vv})],Gv);var Wv;var Qv=Wv=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Wv.prototype);return i}return e}(wi);Qv=Wv=bi([Si({type:Ne.Sequence,itemType:uv})],Qv);var qv=function(){function t(t){if(t===void 0){t={}}this.certId="";this.certValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],qv.prototype,"certId",void 0);bi([Ai({type:Ke.Any,context:0})],qv.prototype,"certValue",void 0);var zv=function(){function t(t){if(t===void 0){t={}}this.crlId="";this.crltValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],zv.prototype,"crlId",void 0);bi([Ai({type:Ke.Any,context:0})],zv.prototype,"crltValue",void 0);var Yv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Ka);Yv=bi([Si({type:Ne.Sequence})],Yv);var Zv=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Oa);Zv=bi([Si({type:Ne.Sequence})],Zv);var $v=function(){function t(t){if(t===void 0){t={}}this.secretTypeId="";this.secretValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],$v.prototype,"secretTypeId",void 0);bi([Ai({type:Ke.Any,context:0})],$v.prototype,"secretValue",void 0);var Xv=function(){function t(t){if(t===void 0){t={}}this.mac=new ma;this.macSalt=new He;this.iterations=1;Object.assign(this,t)}return t}();bi([Ai({type:ma})],Xv.prototype,"mac",void 0);bi([Ai({type:He})],Xv.prototype,"macSalt",void 0);bi([Ai({type:Ke.Integer,defaultValue:1})],Xv.prototype,"iterations",void 0);var Jv=function(){function t(t){if(t===void 0){t={}}this.version=3;this.authSafe=new uv;this.macData=new Xv;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Jv.prototype,"version",void 0);bi([Ai({type:uv})],Jv.prototype,"authSafe",void 0);bi([Ai({type:Xv,optional:true})],Jv.prototype,"macData",void 0);var th;var eh=function(){function t(t){if(t===void 0){t={}}this.bagId="";this.bagValue=new ArrayBuffer(0);Object.assign(this,t)}return t}();bi([Ai({type:Ke.ObjectIdentifier})],eh.prototype,"bagId",void 0);bi([Ai({type:Ke.Any,context:0})],eh.prototype,"bagValue",void 0);bi([Ai({type:Vv,repeated:"set",optional:true})],eh.prototype,"bagAttributes",void 0);var ih=th=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,th.prototype);return i}return e}(wi);ih=th=bi([Si({type:Ne.Sequence,itemType:eh})],ih);var rh,nh,ah;var oh="1.2.840.113549.1.9";var sh=t("F","".concat(oh,".2"));var uh=t("G","".concat(oh,".7"));var ch=t("B","".concat(oh,".14"));var fh=function(t){__extends(e,t);function e(e){if(e===void 0){e={}}return t.call(this,e)||this}e.prototype.toString=function(){return this.ia5String||t.prototype.toString.call(this)};return e}(Bi);bi([Ai({type:Ke.IA5String})],fh.prototype,"ia5String",void 0);fh=bi([Si({type:Ne.Choice})],fh);var vh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(uv);vh=bi([Si({type:Ne.Sequence})],vh);var hh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Jv);hh=bi([Si({type:Ne.Sequence})],hh);var dh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Oa);dh=bi([Si({type:Ne.Sequence})],dh);var lh=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.IA5String})],lh.prototype,"value",void 0);lh=bi([Si({type:Ne.Choice})],lh);var ph=t("U",function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(fh));t("U",ph=bi([Si({type:Ne.Choice})],ph));var yh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi);yh=bi([Si({type:Ne.Choice})],yh);var Sh=function(){function t(t){if(t===void 0){t=new Date}this.value=t}return t}();bi([Ai({type:Ke.GeneralizedTime})],Sh.prototype,"value",void 0);Sh=bi([Si({type:Ne.Choice})],Sh);var Ah=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi);Ah=bi([Si({type:Ne.Choice})],Ah);var Ch=function(){function t(t){if(t===void 0){t="M"}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.PrintableString})],Ch.prototype,"value",void 0);Ch=bi([Si({type:Ne.Choice})],Ch);var mh=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.PrintableString})],mh.prototype,"value",void 0);mh=bi([Si({type:Ne.Choice})],mh);var gh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(mh);gh=bi([Si({type:Ne.Choice})],gh);var wh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi);wh=bi([Si({type:Ne.Choice})],wh);var _h=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.ObjectIdentifier})],_h.prototype,"value",void 0);_h=bi([Si({type:Ne.Choice})],_h);var bh=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(mn);bh=bi([Si({type:Ne.Choice})],bh);var Eh=function(){function t(t){if(t===void 0){t=0}this.value=t}t.prototype.toString=function(){return this.value.toString()};return t}();bi([Ai({type:Ke.Integer})],Eh.prototype,"value",void 0);Eh=bi([Si({type:Ne.Choice})],Eh);var Ph=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(tv);Ph=bi([Si({type:Ne.Sequence})],Ph);var Dh=t("t",function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(Bi));t("t",Dh=bi([Si({type:Ne.Choice})],Dh));var Ih=t("s",rh=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,rh.prototype);return i}return e}(bn));t("s",Ih=rh=bi([Si({type:Ne.Sequence})],Ih));var Bh=nh=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,nh.prototype);return i}return e}(wi);Bh=nh=bi([Si({type:Ne.Set,itemType:Xf})],Bh);var xh=function(){function t(t){if(t===void 0){t=""}this.value=t}t.prototype.toString=function(){return this.value};return t}();bi([Ai({type:Ke.BmpString})],xh.prototype,"value",void 0);xh=bi([Si({type:Ne.Choice})],xh);var Th=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(An);Th=bi([Si({type:Ne.Sequence})],Th);var Oh=ah=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,ah.prototype);return i}return e}(wi);Oh=ah=bi([Si({type:Ne.Sequence,itemType:Th})],Oh);var kh=t("z","1.3.6.1.4.1.22112.2.1");var Mh=t("r",function(){function t(t){if(t===void 0){t={}}Object.assign(this,t)}return t}());bi([Ai({type:Vf})],Mh.prototype,"signer",void 0);bi([Ai({type:Dn,optional:true})],Mh.prototype,"cert",void 0);t("r",Mh=bi([Si({type:Ne.Sequence})],Mh));var Rh;var Nh=Rh=function(t){__extends(e,t);function e(e){var i=t.call(this,e)||this;Object.setPrototypeOf(i,Rh.prototype);return i}return e}(wi);Nh=Rh=bi([Si({type:Ne.Sequence,itemType:rn})],Nh);var Kh=function(){function t(t){if(t===void 0){t={}}this.version=0;this.subject=new Mi;this.subjectPKInfo=new Cn;this.attributes=new Nh;Object.assign(this,t)}return t}();bi([Ai({type:Ke.Integer})],Kh.prototype,"version",void 0);bi([Ai({type:Mi})],Kh.prototype,"subject",void 0);bi([Ai({type:Cn})],Kh.prototype,"subjectPKInfo",void 0);bi([Ai({type:Nh,implicit:true,context:0})],Kh.prototype,"attributes",void 0);var jh=function(){function t(t){if(t===void 0){t={}}this.certificationRequestInfo=new Kh;this.signatureAlgorithm=new An;this.signature=new ArrayBuffer(0);Object.assign(this,t)}return t}();t("Y",jh);bi([Ai({type:Kh})],jh.prototype,"certificationRequestInfo",void 0);bi([Ai({type:An})],jh.prototype,"signatureAlgorithm",void 0);bi([Ai({type:Ke.BitString})],jh.prototype,"signature",void 0);var Hh=globalThis.crypto;function Uh(){return Hh}var Fh=function(t){__extends(e,t);function e(e,i){var r=t.call(this,e)||this;r.code=i;r.name=r.constructor.name;if(Error.captureStackTrace){Error.captureStackTrace(r,r.constructor)}return r}return e}(Error);var Lh=function(t){__extends(e,t);function e(e,i){var r=i?" Supported: ".concat(i.join(", ")):"";return t.call(this,"Unsupported algorithm: ".concat(e,".").concat(r),"UNSUPPORTED_ALGORITHM")||this}return e}(Fh);var Vh=function(t){__extends(e,t);function e(e,i){var r=i?" Expected: ".concat(i):"";return t.call(this,"Invalid format: ".concat(e,".").concat(r),"INVALID_FORMAT")||this}return e}(Fh);var Gh=function(t){__extends(e,t);function e(e,i){var r=i?" Supported: ".concat(i.join(", ")):"";return t.call(this,"Unsupported key type: ".concat(e,".").concat(r),"UNSUPPORTED_KEY_TYPE")||this}return e}(Fh);var Wh=function(t){__extends(e,t);function e(e){var i=e?"Invalid SSH private key format: ".concat(e):"Invalid SSH private key format";return t.call(this,i,"INVALID_PRIVATE_KEY_FORMAT")||this}return e}(Fh);var Qh=function(t){__extends(e,t);function e(e){var i=e?"Encrypted SSH private keys are not supported (cipher: ".concat(e,")"):"Encrypted SSH private keys are not supported";return t.call(this,i,"ENCRYPTED_KEY_NOT_SUPPORTED")||this}return e}(Fh);var qh=function(t){__extends(e,t);function e(e){var i=e?"Invalid key data: ".concat(e):"Invalid key data";return t.call(this,i,"INVALID_KEY_DATA")||this}return e}(Fh);var zh=function(t){__extends(e,t);function e(e,i){var r=e!==undefined&&i!==undefined?" Expected ".concat(e," bytes, got ").concat(i):"";return t.call(this,"Unexpected end of data".concat(r),"UNEXPECTED_EOF")||this}return e}(Fh);var Yh=new TextEncoder;var Zh=new TextDecoder;var $h=function(){function t(t){this.buffer=t;this.offset=0}t.prototype.readUint8=function(){if(this.offset>=this.buffer.length){throw new zh(1,0)}return this.buffer[this.offset++]};t.prototype.readUint32=function(){var t=this.readUint8()<<24|this.readUint8()<<16|this.readUint8()<<8|this.readUint8();return t>>>0};t.prototype.readUint64=function(){var t=this.readUint32();var e=this.readUint32();return BigInt(t)<<32n|BigInt(e)};t.prototype.readBytes=function(t){if(t<0){throw new Vh("Invalid length: ".concat(t))}if(this.offset+t>this.buffer.length){throw new zh(t,this.buffer.length-this.offset)}var e=this.buffer.subarray(this.offset,this.offset+t);this.offset+=t;return e};t.prototype.readString=function(){var t=this.readUint32();var e=this.readBytes(t);return Zh.decode(e)};t.prototype.peekString=function(t){if(this.offset+t>this.buffer.length){throw new zh(t,this.buffer.length-this.offset)}var e=this.buffer.subarray(this.offset,this.offset+t);return Zh.decode(e)};t.prototype.readMpInt=function(t){if(t===void 0){t=false}var e=this.readUint32();var i=this.readBytes(e);if(t&&i.length>1&&i[0]===0){return i.subarray(1)}return i};t.prototype.readMpIntSsh=function(){return this.readMpInt(true)};t.prototype.remaining=function(){return this.buffer.length-this.offset};t.prototype.getOffset=function(){return this.offset};t.prototype.seek=function(t){if(t<0||t>this.buffer.length){throw new Vh("Invalid offset: ".concat(t,". Buffer length: ").concat(this.buffer.length))}this.offset=t};return t}();var Xh=function(){function t(t){if(t===void 0){t=1024}this.buffer=new Uint8Array(t);this.offset=0}t.prototype.ensureCapacity=function(t){var e=this.offset+t;if(e>this.buffer.length){var i=Math.max(e,this.buffer.length*2);var r=new Uint8Array(i);r.set(this.buffer.subarray(0,this.offset));this.buffer=r}};t.prototype.reserve=function(t){if(t>this.buffer.length){var e=new Uint8Array(t);e.set(this.buffer.subarray(0,this.offset));this.buffer=e}};t.prototype.writeUint8=function(t){this.ensureCapacity(1);this.buffer[this.offset++]=t&255};t.prototype.writeUint32=function(t){this.ensureCapacity(4);this.buffer[this.offset++]=t>>>24&255;this.buffer[this.offset++]=t>>>16&255;this.buffer[this.offset++]=t>>>8&255;this.buffer[this.offset++]=t&255};t.prototype.writeUint64=function(t){this.ensureCapacity(8);var e=Number(t>>32n);var i=Number(t&0xffffffffn);this.writeUint32(e);this.writeUint32(i)};t.prototype.writeBytes=function(t){this.ensureCapacity(t.length);this.buffer.set(t,this.offset);this.offset+=t.length};t.prototype.writeString=function(t){var e=Yh.encode(t);this.writeUint32(e.length);this.writeBytes(e)};t.prototype.writeMpInt=function(t,e){if(e===void 0){e=false}if(e&&t.length>0&&(t[0]&128)!==0){var i=new Uint8Array(t.length+1);i[0]=0;i.set(t,1);this.writeUint32(i.length);this.writeBytes(i)}else{this.writeUint32(t.length);this.writeBytes(t)}};t.prototype.writeMpIntSsh=function(t){this.writeMpInt(t,true)};t.prototype.toUint8Array=function(){return this.buffer.subarray(0,this.offset)};t.prototype.getOffset=function(){return this.offset};t.prototype.seek=function(t){if(t<0||t>this.buffer.length){throw new Vh("Invalid offset")}this.offset=t};return t}();var Jh=function(){function t(t){if(t===void 0){t="SHA-256"}this.hash="SHA-256";this.hash=t}t.prototype.importPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){e=t.blob,i=t.crypto;r=new $h(e);r.readString();n=r.readMpInt(true);a=r.readMpInt(true);o={kty:"RSA",n:u.Convert.ToBase64Url(a),e:u.Convert.ToBase64Url(n)};return[2,i.subtle.importKey("jwk",o,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};t.prototype.exportPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){switch(s.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("jwk",e)];case 1:r=s.sent();if(!r.n||!r.e){throw new qh("RSA JWK missing required parameters (n, e)")}n=u.BufferSourceConverter.toUint8Array(u.Convert.FromBase64Url(r.n));a=u.BufferSourceConverter.toUint8Array(u.Convert.FromBase64Url(r.e));o=new Xh;o.writeString("ssh-rsa");o.writeMpInt(a,true);o.writeMpInt(n,true);return[2,o.toUint8Array()]}}))}))};t.prototype.importPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.spki,i=t.crypto;return[2,i.subtle.importKey("spki",e,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["verify"])]}))}))};t.prototype.exportPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("spki",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.pkcs8,i=t.crypto;return[2,i.subtle.importKey("pkcs8",e,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};t.prototype.exportPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.privateKey,i=t.crypto;return[4,i.subtle.exportKey("pkcs8",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d,l,p,y,S,A,C,m,g,w,_,b,E,P,D,I,B;return __generator(this,(function(x){e=t.sshKey,i=t.crypto;r=e.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=u.Convert.FromBase64(r);a=new $h(u.BufferSourceConverter.toUint8Array(n));o=a.readBytes(15);if(u.Convert.ToHex(o)!=="6f70656e7373682d6b65792d763100"){throw new Wh("invalid magic string")}s=a.readString();a.readString();a.readString();if(s!=="none"){throw new Qh(s)}c=a.readUint32();if(c!==1){throw new Wh("multiple keys not supported")}f=a.readUint32();a.readBytes(f);v=a.readUint32();h=a.readBytes(v);d=new $h(h);l=d.readUint32();p=d.readUint32();if(l!==p){throw new Wh("invalid checkints")}d.readString();y=d.readMpInt(true);S=d.readMpInt(true);A=d.readMpInt(true);C=d.readMpInt(true);m=d.readMpInt(true);g=d.readMpInt(true);d.readString();w=BigInt("0x"+u.Convert.ToHex(A));_=BigInt("0x"+u.Convert.ToHex(m));b=BigInt("0x"+u.Convert.ToHex(g));E=w%(_-1n);P=w%(b-1n);D=u.Convert.FromHex(E.toString(16).padStart(m.length*2,"0"));I=u.Convert.FromHex(P.toString(16).padStart(g.length*2,"0"));B={kty:"RSA",n:u.Convert.ToBase64Url(y),e:u.Convert.ToBase64Url(S),d:u.Convert.ToBase64Url(A),p:u.Convert.ToBase64Url(m),q:u.Convert.ToBase64Url(g),dp:u.Convert.ToBase64Url(D),dq:u.Convert.ToBase64Url(I),qi:u.Convert.ToBase64Url(C)};return[2,i.subtle.importKey("jwk",B,{name:"RSASSA-PKCS1-v1_5",hash:this.hash},true,["sign"])]}))}))};t.prototype.exportPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d;return __generator(this,(function(l){switch(l.label){case 0:e=t.privateKey,i=t.crypto,r=t.jwk;a=r;if(a)return[3,2];return[4,i.subtle.exportKey("jwk",e)];case 1:a=l.sent();l.label=2;case 2:n=a;if(!n.n||!n.e||!n.d||!n.p||!n.q){throw new qh("RSA JWK missing required parameters")}o=new Uint8Array(u.Convert.FromBase64Url(n.n));s=new Uint8Array(u.Convert.FromBase64Url(n.e));c=new Uint8Array(u.Convert.FromBase64Url(n.d));f=new Uint8Array(u.Convert.FromBase64Url(n.p));v=new Uint8Array(u.Convert.FromBase64Url(n.q));h=n.qi?new Uint8Array(u.Convert.FromBase64Url(n.qi)):new Uint8Array;d=new Xh;d.writeString("ssh-rsa");d.writeMpInt(o,true);d.writeMpInt(s,true);d.writeMpInt(c,true);d.writeMpInt(h,true);d.writeMpInt(f,true);d.writeMpInt(v,true);return[2,d.toUint8Array()]}}))}))};t.prototype.sign=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:e=t.privateKey,i=t.data,r=t.crypto,n=t.hash;if(n&&n!==this.hash){throw new qh("Hash ".concat(n," not supported for this RSA algorithm"))}if(!e.extractable){throw new qh("Private key is not extractable")}return[4,this.exportPrivatePkcs8({privateKey:e,crypto:r})];case 1:a=c.sent();return[4,this.importPrivatePkcs8({pkcs8:new Uint8Array(a),crypto:r})];case 2:o=c.sent();return[4,r.subtle.sign("RSASSA-PKCS1-v1_5",o,i)];case 3:s=c.sent();return[2,u.BufferSourceConverter.toUint8Array(s)]}}))}))};t.prototype.verify=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(u){switch(u.label){case 0:e=t.publicKey,i=t.signature,r=t.data,n=t.crypto,a=t.hash;if(a&&a!==this.hash){return[2,false]}if(!e.extractable){throw new qh("Public key is not extractable")}return[4,this.exportPublicSpki({publicKey:e,crypto:n})];case 1:o=u.sent();return[4,this.importPublicSpki({spki:new Uint8Array(o),crypto:n})];case 2:s=u.sent();return[2,n.subtle.verify("RSASSA-PKCS1-v1_5",s,i,r)]}}))}))};t.prototype.encodeSignature=function(t){var e=t.signature,i=t.algo;var r=new Xh;r.writeString(i);r.writeUint32(e.byteLength);r.writeBytes(e);return r.toUint8Array()};t.prototype.decodeSignature=function(t){var e=t.signature;var i=new $h(e);var r=i.readString();var n=i.readUint32();var a=i.readBytes(n);return{signature:a,algo:r}};t.prototype.supportsCryptoKey=function(t){return t.algorithm.name==="RSASSA-PKCS1-v1_5"};t.prototype.parsePublicKey=function(t){var e=t.readBytes(t.readUint32());var i=t.readBytes(t.readUint32());var r=new Xh;r.writeString("ssh-rsa");r.writeMpInt(e);r.writeMpInt(i);return{type:"ssh-rsa",keyData:r.toUint8Array()}};t.prototype.writePublicKey=function(t,e){var i=new $h(e.keyData);i.readString();var r=i.readMpInt();var n=i.readMpInt();t.writeUint32(r.length);t.writeBytes(r);t.writeUint32(n.length);t.writeBytes(n)};t.prototype.getCertificateType=function(){return"ssh-rsa-cert-v01@openssh.com"};t.prototype.getSignatureAlgo=function(){return this.hash==="SHA-256"?"rsa-sha2-256":"rsa-sha2-512"};return t}();var td=function(){function t(t,e,i){this.curveName=t;this.sshType=e;this.namedCurve=i}t.prototype.getHashAlgorithm=function(){switch(this.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:return"SHA-256"}};t.prototype.getExpectedLength=function(){switch(this.namedCurve){case"P-256":return 32;case"P-384":return 48;case"P-521":return 66;default:return 32}};t.prototype.getSignatureCoordLength=function(){return this.getExpectedLength()};t.prototype.importPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(c){e=t.blob,i=t.crypto;r=new $h(e);r.readString();n=r.readString();if(n!==this.curveName){throw new qh("ECDSA curve name ".concat(n,", expected ").concat(this.curveName))}a=r.readMpInt();o=Math.floor((a.length-1)/2);s={kty:"EC",crv:this.namedCurve,x:u.Convert.ToBase64Url(a.slice(1,1+o)),y:u.Convert.ToBase64Url(a.slice(1+o))};return[2,i.subtle.importKey("jwk",s,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};t.prototype.exportPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s;return __generator(this,(function(c){switch(c.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("jwk",e)];case 1:r=c.sent();if(!r.x||!r.y){throw new qh("ECDSA JWK missing x or y parameters")}n=new Uint8Array(u.Convert.FromBase64Url(r.x));a=new Uint8Array(u.Convert.FromBase64Url(r.y));o=new Uint8Array(1+n.length+a.length);o[0]=4;o.set(n,1);o.set(a,1+n.length);s=new Xh;s.writeString(this.sshType);s.writeString(this.curveName);s.writeMpInt(o);return[2,s.toUint8Array()]}}))}))};t.prototype.importPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.spki,i=t.crypto;return[2,i.subtle.importKey("spki",e,{name:"ECDSA",namedCurve:this.namedCurve},true,["verify"])]}))}))};t.prototype.exportPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("spki",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.pkcs8,i=t.crypto;return[2,i.subtle.importKey("pkcs8",e,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};t.prototype.exportPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.privateKey,i=t.crypto;return[4,i.subtle.exportKey("pkcs8",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.exportPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v;return __generator(this,(function(h){switch(h.label){case 0:e=t.privateKey,i=t.crypto,r=t.jwk;a=r;if(a)return[3,2];return[4,i.subtle.exportKey("jwk",e)];case 1:a=h.sent();h.label=2;case 2:n=a;if(!n.d||!n.x||!n.y){throw new qh("ECDSA private key JWK missing required parameters")}o=new Uint8Array(u.Convert.FromBase64Url(n.x));s=new Uint8Array(u.Convert.FromBase64Url(n.y));c=new Uint8Array(u.Convert.FromBase64Url(n.d));f=new Uint8Array(1+o.length+s.length);f[0]=4;f.set(o,1);f.set(s,1+o.length);v=new Xh;v.writeString(this.sshType);v.writeString(this.curveName);v.writeMpInt(f);v.writeMpInt(c);return[2,v.toUint8Array()]}}))}))};t.prototype.importPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d,l,p,y,S,A,C,m,g;return __generator(this,(function(w){e=t.sshKey,i=t.crypto;r=e.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=u.Convert.FromBase64(r);a=new $h(u.BufferSourceConverter.toUint8Array(n));o=a.readBytes(15);if(u.Convert.ToHex(o)!=="6f70656e7373682d6b65792d763100"){throw new Wh("invalid magic string")}s=a.readString();a.readString();a.readString();if(s!=="none"){throw new Qh(s)}c=a.readUint32();if(c!==1){throw new Wh("multiple keys not supported")}f=a.readUint32();a.readBytes(f);v=a.readUint32();h=a.readBytes(v);d=new $h(h);l=d.readUint32();p=d.readUint32();if(l!==p){throw new Wh("invalid checkints")}d.readString();d.readString();y=d.readMpInt();S=d.readMpInt();d.readString();if(y[0]!==4){throw new qh("invalid ECDSA public key point format")}A=Math.floor((y.length-1)/2);C=y.slice(1,1+A);m=y.slice(1+A);g={kty:"EC",crv:this.namedCurve,x:u.Convert.ToBase64Url(C),y:u.Convert.ToBase64Url(m),d:u.Convert.ToBase64Url(S)};return[2,i.subtle.importKey("jwk",g,{name:"ECDSA",namedCurve:this.namedCurve},true,["sign"])]}))}))};t.prototype.sign=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){switch(s.label){case 0:e=t.privateKey,i=t.data,r=t.crypto,n=t.hash;a=this.getHashAlgorithm();if(n&&n!==a){throw new qh("ECDSA ".concat(this.namedCurve," requires ").concat(a,", got ").concat(n))}return[4,r.subtle.sign({name:"ECDSA",hash:a},e,i)];case 1:o=s.sent();return[2,u.BufferSourceConverter.toUint8Array(o)]}}))}))};t.prototype.verify=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o;return __generator(this,(function(s){e=t.publicKey,i=t.signature,r=t.data,n=t.crypto,a=t.hash;o=this.getHashAlgorithm();if(a&&a!==o){throw new qh("ECDSA ".concat(this.namedCurve," requires ").concat(o,", got ").concat(a))}return[2,n.subtle.verify({name:"ECDSA",hash:o},e,i,r)]}))}))};t.prototype.encodeSignature=function(t){var e=t.signature,i=t.algo;if(i.startsWith("ecdsa-sha2-")){var r=this.getSignatureCoordLength();var n=e.subarray(0,r);var a=e.subarray(r);var o=new Xh;o.writeString(i);var s=new Xh;s.writeMpInt(n,true);s.writeMpInt(a,true);var u=s.toUint8Array();o.writeUint32(u.length);o.writeBytes(u);return o.toUint8Array()}var c=new Xh;c.writeString(i);c.writeUint32(e.byteLength);c.writeBytes(e);return c.toUint8Array()};t.prototype.decodeSignature=function(t){var e=t.signature;var i=new $h(e);var r=i.readString();var n=i.readUint32();var a=i.readBytes(n);if(r.startsWith("ecdsa-sha2-")){var o=new $h(a);var s=o.readMpInt();var u=o.readMpInt();if(s[0]===0&&s.length>1&&(s[1]&128)===0){s=s.slice(1)}if(u[0]===0&&u.length>1&&(u[1]&128)===0){u=u.slice(1)}var c=this.getExpectedLength();var f=new Uint8Array(c);var v=new Uint8Array(c);if(s.length<=c){f.set(s,c-s.length)}else{f.set(s.slice(s.length-c),0)}if(u.length<=c){v.set(u,c-u.length)}else{v.set(u.slice(u.length-c),0)}var h=new Uint8Array(__spreadArray(__spreadArray([],f,true),v,true));return{signature:h,algo:r}}return{signature:a,algo:r}};t.prototype.supportsCryptoKey=function(t){return t.algorithm.name==="ECDSA"&&t.algorithm.namedCurve===this.namedCurve};t.prototype.parsePublicKey=function(t){var e=t.readString();if(e!==this.curveName){throw new qh("ECDSA certificate curve name ".concat(e,", expected ").concat(this.curveName))}var i=t.readBytes(t.readUint32());var r=new Xh;r.writeString(this.sshType);r.writeString(e);r.writeMpInt(i);return{type:this.sshType,keyData:r.toUint8Array()}};t.prototype.writePublicKey=function(t,e){var i=new $h(e.keyData);i.readString();var r=i.readString();var n=i.readMpInt();t.writeString(r);t.writeUint32(n.length);t.writeBytes(n)};t.prototype.getCertificateType=function(){return"".concat(this.sshType,"-cert-v01@openssh.com")};t.prototype.getSignatureAlgo=function(){return this.sshType};return t}();var ed=new td("nistp256","ecdsa-sha2-nistp256","P-256");var id=new td("nistp384","ecdsa-sha2-nistp384","P-384");var rd=new td("nistp521","ecdsa-sha2-nistp521","P-521");var nd=function(){function t(){}t.prototype.importPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a;return __generator(this,(function(o){e=t.blob,i=t.crypto;r=new $h(e);r.readString();n=r.readUint32();if(n!==32){throw new qh("Ed25519 key length ".concat(n,", expected 32"))}a=r.readBytes(n);return[2,i.subtle.importKey("raw",a,"Ed25519",true,["verify"])]}))}))};t.prototype.exportPublicSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a;return __generator(this,(function(o){switch(o.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("jwk",e)];case 1:r=o.sent();if(!r.x){throw new qh("Ed25519 JWK missing x parameter")}n=new Uint8Array(u.Convert.FromBase64Url(r.x));a=new Xh;a.writeString("ssh-ed25519");a.writeUint32(n.length);a.writeBytes(n);return[2,a.toUint8Array()]}}))}))};t.prototype.importPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.spki,i=t.crypto;return[2,i.subtle.importKey("spki",e,"Ed25519",true,["verify"])]}))}))};t.prototype.exportPublicSpki=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.publicKey,i=t.crypto;return[4,i.subtle.exportKey("spki",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.importPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){e=t.pkcs8,i=t.crypto;return[2,i.subtle.importKey("pkcs8",e,"Ed25519",true,["sign"])]}))}))};t.prototype.exportPrivatePkcs8=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r;return __generator(this,(function(n){switch(n.label){case 0:e=t.privateKey,i=t.crypto;return[4,i.subtle.exportKey("pkcs8",e)];case 1:r=n.sent();return[2,u.BufferSourceConverter.toUint8Array(r)]}}))}))};t.prototype.exportPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f;return __generator(this,(function(v){switch(v.label){case 0:e=t.privateKey,i=t.crypto,r=t.jwk;a=r;if(a)return[3,2];return[4,i.subtle.exportKey("jwk",e)];case 1:a=v.sent();v.label=2;case 2:n=a;if(!n.d||!n.x){throw new qh("Ed25519 private key JWK missing required parameters")}o=new Uint8Array(u.Convert.FromBase64Url(n.d));s=new Uint8Array(u.Convert.FromBase64Url(n.x));c=new Xh;c.writeString("ssh-ed25519");c.writeUint32(s.length);c.writeBytes(s);f=new Uint8Array(64);f.set(o,0);f.set(s,32);c.writeUint32(f.length);c.writeBytes(f);return[2,c.toUint8Array()]}}))}))};t.prototype.importPrivateSsh=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n,a,o,s,c,f,v,h,d,l,p,y,S,A,C,m,g;return __generator(this,(function(w){e=t.sshKey,i=t.crypto;r=e.replace(/-----BEGIN OPENSSH PRIVATE KEY-----/,"").replace(/-----END OPENSSH PRIVATE KEY-----/,"").replace(/\s/g,"");n=u.Convert.FromBase64(r);a=new $h(u.BufferSourceConverter.toUint8Array(n));o=a.readBytes(15);if(u.Convert.ToHex(o)!=="6f70656e7373682d6b65792d763100"){throw new Wh("invalid magic string")}s=a.readString();a.readString();a.readString();if(s!=="none"){throw new Qh(s)}c=a.readUint32();if(c!==1){throw new Wh("multiple keys not supported")}f=a.readUint32();a.readBytes(f);v=a.readUint32();h=a.readBytes(v);d=new $h(h);l=d.readUint32();p=d.readUint32();if(l!==p){throw new Wh("invalid checkints")}d.readString();y=d.readUint32();S=d.readBytes(y);A=d.readUint32();C=d.readBytes(A);d.readString();m=C.slice(0,32);g={kty:"OKP",crv:"Ed25519",d:u.Convert.ToBase64Url(m),x:u.Convert.ToBase64Url(S)};return[2,i.subtle.importKey("jwk",g,"Ed25519",true,["sign"])]}))}))};t.prototype.sign=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n;return __generator(this,(function(a){switch(a.label){case 0:e=t.privateKey,i=t.data,r=t.crypto;return[4,r.subtle.sign("Ed25519",e,i)];case 1:n=a.sent();return[2,u.BufferSourceConverter.toUint8Array(n)]}}))}))};t.prototype.verify=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i,r,n;return __generator(this,(function(a){e=t.publicKey,i=t.signature,r=t.data,n=t.crypto;return[2,n.subtle.verify("Ed25519",e,i,r)]}))}))};t.prototype.encodeSignature=function(t){var e=t.signature,i=t.algo;var r=new Uint8Array(e);var n=new Xh;n.writeString(i);n.writeUint32(r.length);n.writeBytes(r);return n.toUint8Array()};t.prototype.decodeSignature=function(t){var e=t.signature;var i=new $h(e);var r=i.readString();var n=i.readUint32();var a=i.readBytes(n);return{signature:a,algo:r}};t.prototype.supportsCryptoKey=function(t){return t.algorithm.name==="Ed25519"};t.prototype.parsePublicKey=function(t){var e=t.readBytes(t.readUint32());var i=new Xh;i.writeString("ssh-ed25519");i.writeUint32(e.length);i.writeBytes(e);return{type:"ssh-ed25519",keyData:i.toUint8Array()}};t.prototype.writePublicKey=function(t,e){var i=new $h(e.keyData);i.readString();var r=i.readUint32();var n=i.readBytes(r);t.writeUint32(n.length);t.writeBytes(n)};t.prototype.getCertificateType=function(){return"ssh-ed25519-cert-v01@openssh.com"};t.prototype.getSignatureAlgo=function(){return"ssh-ed25519"};return t}();var ad=new Map;var od=function(){function t(){}t.get=function(t){var e=ad.get(t);if(!e){throw new Gh(t,Array.from(ad.keys()))}return e};t.register=function(t,e){ad.set(t,e)};t.getSshTypeFromCryptoKey=function(t){for(var e=0,i=ad.entries();e<i.length;e++){var r=i[e],n=r[0],a=r[1];if(a.supportsCryptoKey(t)){return n}}throw new Gh(t.algorithm.name,Array.from(ad.keys()))};t.certTypeToKeyType=function(t){var e={"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"};return e[t]};t.getSupportedCertTypes=function(){return Object.keys({"ssh-rsa-cert-v01@openssh.com":"ssh-rsa","ssh-ed25519-cert-v01@openssh.com":"ssh-ed25519","ecdsa-sha2-nistp256-cert-v01@openssh.com":"ecdsa-sha2-nistp256","ecdsa-sha2-nistp384-cert-v01@openssh.com":"ecdsa-sha2-nistp384","ecdsa-sha2-nistp521-cert-v01@openssh.com":"ecdsa-sha2-nistp521"})};return t}();od.register("ssh-ed25519",new nd);od.register("ssh-rsa",new Jh("SHA-256"));od.register("rsa-sha2-256",new Jh("SHA-256"));od.register("rsa-sha2-512",new Jh("SHA-512"));od.register("ecdsa-sha2-nistp256",ed);od.register("ecdsa-sha2-nistp384",id);od.register("ecdsa-sha2-nistp521",rd);function sd(t){var e=typeof t==="string"?t.trim().split(/\s+/):null;if(!e||e.length<2){throw new Vh("Invalid SSH public key format")}var i=e[0];var r=new Uint8Array(u.Convert.FromBase64(e[1]));var n=e.length>2?e.slice(2).join(" "):undefined;var a=new $h(r);var o=a.readString();if(o!==i){throw new Vh("Key type mismatch")}return{type:i,keyData:r,comment:n}}function ud(t){var e=u.Convert.ToBase64(t.keyData);var i=[t.type,e];if(t.comment){i.push(t.comment)}return i.join(" ")}function cd(t){if(typeof t==="string"){var e=t.trim().split(/\s+/);if(e.length<2){throw new Vh("SSH certificate string","type base64 [comment]")}var i=e[0];var r=new Uint8Array(u.Convert.FromBase64(e[1]));var n=e.length>2?e.slice(2).join(" "):undefined;var a=new $h(r);var o=a.readString();if(o!==i){throw new Vh("certificate blob type ".concat(o),"expected ".concat(i))}return{type:i,keyData:r,comment:n}}else{var a=new $h(t);var s=a.readString();var c=t.slice(a.getOffset());return{type:s,keyData:c}}}function fd(t){var e=new $h(t);var i=e.readString();var r=e.readBytes(e.readUint32());var n=od.certTypeToKeyType(i);if(!n){throw new Lh(i,od.getSupportedCertTypes())}var a=od.get(n);var o=a.parsePublicKey(e);var s=n;var u=e.readUint64();var c=e.readUint32();var f=c===1?"user":"host";var v=e.readString();var h=e.readUint32();var d=e.readBytes(h);var l=[];if(d.length>0){var p=new $h(d);while(p.getOffset()<d.length){try{var y=p.readString();l.push(y)}catch(t){break}}}var S=e.readUint64();var A=e.readUint64();var C={};var m=e.readUint32();var g=e.readBytes(m);if(g.length>0){var w=new $h(g);while(w.getOffset()<g.length){try{var _=w.readString();var b=w.readBytes(w.readUint32());var E=b.length===0?"":Zh.decode(b);C[_]=E}catch(t){break}}}var P={};var D=e.readUint32();var I=e.readBytes(D);if(I.length>0){var B=new $h(I);while(B.getOffset()<I.length){try{var x=B.readString();var b=B.readBytes(B.readUint32());var T=b.length===0?"":Zh.decode(b);P[x]=T}catch(t){break}}}var O=e.readUint32();var k=e.readBytes(O);var M=e.readUint32();var R=e.readBytes(M);var N=new $h(R);var K=N.readString();var j={type:K,keyData:R};var H=e.readUint32();var U=e.readBytes(H);return{nonce:r,keyType:s,publicKey:o,serial:u,type:f,keyId:v,validPrincipals:l,validAfter:S,validBefore:A,criticalOptions:C,extensions:P,reserved:k,signatureKey:j,signature:U}}function vd(t){var e=u.Convert.ToBase64(t.keyData);var i=[t.type,e];if(t.comment){i.push(t.comment)}return i.join(" ")}function hd(t){var e=new $h(t);if(t.length>=6&&(new TextDecoder).decode(t.subarray(0,6))==="SSHSIG"){return dd(e)}else{return ld(e)}}function dd(t){var e=t.readBytes(6);var i=(new TextDecoder).decode(e);if(i!=="SSHSIG"){throw new Vh(i,"SSHSIG")}var r=t.readUint32();var n=t.readUint32();var a=t.readBytes(n);var o=t.readString();var s=t.readString();var u=t.readString();var c=t.readUint32();var f=t.readBytes(c);var v=new $h(f);var h=v.readString();var d=v.readUint32();var l=v.readBytes(d);return{format:"ssh-signature",algorithm:h,signature:l,version:r,publicKey:a,namespace:o,reserved:s,hashAlgorithm:u}}function ld(t){var e=t.readString();var i=t.readUint32();var r=t.readBytes(i);return{format:"legacy",algorithm:e,signature:r}}function pd(t){if(t.format==="ssh-signature"){return yd(t)}else{return Sd(t)}}function yd(t){var e=new Xh;e.writeBytes((new TextEncoder).encode("SSHSIG"));e.writeUint32(t.version||1);if(t.publicKey){e.writeUint32(t.publicKey.length);e.writeBytes(t.publicKey)}else{e.writeUint32(0)}e.writeString(t.namespace||"file");e.writeString(t.reserved||"");e.writeString(t.hashAlgorithm||"sha512");var i=new Xh;i.writeString(t.algorithm);i.writeUint32(t.signature.length);i.writeBytes(t.signature);var r=i.toUint8Array();e.writeUint32(r.length);e.writeBytes(r);return e.toUint8Array()}function Sd(t){var e=new Xh;e.writeString(t.algorithm);e.writeUint32(t.signature.length);e.writeBytes(t.signature);return e.toUint8Array()}var Ad=function(){function t(){}return t}();var Cd=function(t){__extends(e,t);function e(i){var r=t.call(this)||this;r.type=e.TYPE;r.blob=i;return r}e.prototype.getCryptoKey=function(){return __awaiter(this,arguments,void 0,(function(t){var e,i;if(t===void 0){t=Uh()}return __generator(this,(function(r){switch(r.label){case 0:if(!!this.cachedCryptoKey)return[3,2];e=od.get(this.blob.type);i=this;return[4,e.importPublicSsh({blob:this.blob.keyData,crypto:t})];case 1:i.cachedCryptoKey=r.sent();r.label=2;case 2:return[2,this.cachedCryptoKey]}}))}))};e.fromSSH=function(t){return __awaiter(this,arguments,void 0,(function(t,i){var r,n;if(i===void 0){i=Uh()}return __generator(this,(function(a){switch(a.label){case 0:r=sd(t);n=od.get(r.type);return[4,n.importPublicSsh({blob:r.keyData,crypto:i})];case 1:a.sent();return[2,new e(r)]}}))}))};e.fromSPKI=function(t,i){return __awaiter(this,arguments,void 0,(function(t,i,r){var n,a,o,s;if(r===void 0){r=Uh()}return __generator(this,(function(u){switch(u.label){case 0:n=od.get(i);return[4,n.importPublicSpki({spki:t,crypto:r})];case 1:a=u.sent();return[4,n.exportPublicSsh({publicKey:a,crypto:r})];case 2:o=u.sent();s={type:i,keyData:o};return[2,new e(s)]}}))}))};e.fromWebCrypto=function(t,i){return __awaiter(this,arguments,void 0,(function(t,i,r){var n,a,o,s;if(r===void 0){r=Uh()}return __generator(this,(function(u){switch(u.label){case 0:n=i||od.getSshTypeFromCryptoKey(t);a=od.get(n);return[4,a.exportPublicSsh({publicKey:t,crypto:r})];case 1:o=u.sent();s={type:n,keyData:o};return[2,new e(s)]}}))}))};e.prototype.export=function(){return __awaiter(this,arguments,void 0,(function(t,e){var i,r,n;if(t===void 0){t="ssh"}if(e===void 0){e=Uh()}return __generator(this,(function(a){switch(a.label){case 0:if(!(t==="ssh"))return[3,1];return[2,ud(this.blob)];case 1:if(!(t==="spki"))return[3,4];return[4,this.getCryptoKey(e)];case 2:i=a.sent();r=od.get(this.blob.type);return[4,r.exportPublicSpki({publicKey:i,crypto:e})];case 3:n=a.sent();return[2,new Uint8Array(n)];case 4:throw new Gh("Unsupported export format: ".concat(t))}}))}))};e.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.export("ssh")];case 1:t=e.sent();return[2,t]}}))}))};e.prototype.toSPKI=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.export("spki")];case 1:t=e.sent();return[2,t]}}))}))};e.prototype.toWebCrypto=function(){return __awaiter(this,arguments,void 0,(function(t){if(t===void 0){t=Uh()}return __generator(this,(function(e){return[2,this.getCryptoKey(t)]}))}))};e.prototype.verify=function(t,e,i){return __awaiter(this,arguments,void 0,(function(t,e,i,r){var n,a;if(r===void 0){r=Uh()}return __generator(this,(function(o){switch(o.label){case 0:n=od.get(t);return[4,this.toWebCrypto(r)];case 1:a=o.sent();return[2,n.verify({publicKey:a,signature:e,data:i,crypto:r})]}}))}))};Object.defineProperty(e.prototype,"keyType",{get:function(){return this.blob.type},enumerable:false,configurable:true});Object.defineProperty(e.prototype,"comment",{get:function(){return this.blob.comment},enumerable:false,configurable:true});e.prototype.getBlob=function(){return __assign({},this.blob)};e.prototype.thumbprint=function(){return __awaiter(this,arguments,void 0,(function(t,e){var i,r,n;if(t===void 0){t="sha256"}if(e===void 0){e=Uh()}return __generator(this,(function(a){switch(a.label){case 0:i=t==="sha256"?"SHA-256":"SHA-512";r=this.blob.keyData;return[4,e.subtle.digest(i,r)];case 1:n=a.sent();return[2,new Uint8Array(n)]}}))}))};e.TYPE="public-key";return e}(Ad);var md=function(t){__extends(e,t);function e(i){var r=t.call(this)||this;r.type=e.TYPE;r.blob=i;r.format=i.format;r.algorithm=i.algorithm;r.signature=i.signature;r.version=i.version;r.namespace=i.namespace;r.reserved=i.reserved;r.hashAlgorithm=i.hashAlgorithm;if(i.publicKey){var n=new $h(i.publicKey);var a=n.readString();r.publicKey=new Cd({type:a,keyData:i.publicKey})}return r}e.parse=function(t){var i=hd(t);return new e(i)};e.fromBlob=function(t){return new e(t)};e.fromBase64=function(t){var i=new Uint8Array(u.Convert.FromBase64(t));return e.parse(i)};e.fromText=function(t){var i=t.replace(/-----BEGIN SSH SIGNATURE-----/,"").replace(/-----END SSH SIGNATURE-----/,"").replace(/[\r\n\s]/g,"");return e.fromBase64(i)};e.prototype.serialize=function(){return pd(this.blob)};e.prototype.toBase64=function(){return u.Convert.ToBase64(this.serialize())};e.prototype.toText=function(){var t=this.toBase64();var e=[];for(var i=0;i<t.length;i+=70){e.push(t.substring(i,i+70))}return __spreadArray(__spreadArray(["-----BEGIN SSH SIGNATURE-----"],e,true),["-----END SSH SIGNATURE-----"],false).join("\n")};e.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,this.toText()]}))}))};e.prototype.verify=function(t,e){return __awaiter(this,void 0,void 0,(function(){var i,r,n,a,o,s,u,c,f,v,h,d,l,p,y,S;return __generator(this,(function(A){switch(A.label){case 0:i=od.get(this.algorithm);return[4,e["getCryptoKey"]()];case 1:r=A.sent();n=Uh();a=t;if(!(this.format==="ssh-signature"))return[3,3];o=this.hashAlgorithm||"sha512";s=this.namespace||"file";u=this.reserved||"";c=o==="sha256"?"SHA-256":"SHA-512";return[4,n.subtle.digest(c,t)];case 2:f=A.sent();v=new Uint8Array(f);h=new Xh;h.writeBytes((new TextEncoder).encode("SSHSIG"));h.writeString(s);h.writeString(u);h.writeString(o);h.writeUint32(v.length);h.writeBytes(v);a=h.toUint8Array();A.label=3;case 3:if(this.algorithm==="rsa-sha2-256"){d="SHA-256"}else if(this.algorithm==="rsa-sha2-512"){d="SHA-512"}if(this.format==="legacy"||this.format==="ssh-signature"){p=new Xh;p.writeString(this.algorithm);p.writeUint32(this.signature.length);p.writeBytes(this.signature);y=p.toUint8Array();S=i.decodeSignature({signature:y});l=S.signature}else{l=this.signature}return[2,i.verify({publicKey:r,signature:l,data:a,crypto:n,hash:d})]}}))}))};e.fromLegacy=function(t,i){var r=od.get(t);var n=r.encodeSignature({signature:i,algo:t});var a=new $h(n);a.readString();var o=a.readUint32();var s=a.readBytes(o);return new e({format:"legacy",algorithm:t,signature:s})};e.fromSshSignature=function(t,i,r){if(r===void 0){r={}}var n={format:"ssh-signature",algorithm:t,signature:i,version:r.version||1,publicKey:r.publicKey?r.publicKey.getBlob().keyData:undefined,namespace:r.namespace||"file",reserved:r.reserved||"",hashAlgorithm:r.hashAlgorithm||"sha512"};return new e(n)};e.sign=function(t,i,r){return __awaiter(this,arguments,void 0,(function(t,i,r,n){var a,o,s,u,c,f,v,h,d,l,p,y,S,A,C,m,c,g,w,_,b;if(n===void 0){n={}}return __generator(this,(function(E){switch(E.label){case 0:a=n.format,o=a===void 0?"legacy":a,s=n.namespace,u=s===void 0?"file":s;if(!(o==="legacy"))return[3,2];return[4,i.sign(t,r)];case 1:c=E.sent();f=t||i.keyType;return[2,e.fromLegacy(f,c)];case 2:v=t;h=od.get(v);d=t==="rsa-sha2-256"?"sha256":"sha512";return[4,i.getPublicKey()];case 3:l=E.sent();p=Uh();y=d==="sha256"?"SHA-256":"SHA-512";return[4,p.subtle.digest(y,r)];case 4:S=E.sent();A=new Uint8Array(S);C=new Xh;C.writeBytes((new TextEncoder).encode("SSHSIG"));C.writeString(u);C.writeString("");C.writeString(d);C.writeUint32(A.length);C.writeBytes(A);m=C.toUint8Array();return[4,i.sign(v,m)];case 5:c=E.sent();g=h.encodeSignature({signature:c,algo:v});w=new $h(g);w.readString();_=w.readUint32();b=w.readBytes(_);return[2,e.fromSshSignature(v,b,{namespace:u,hashAlgorithm:d,publicKey:l})]}}))}))};e.TYPE="signature";return e}(Ad);var gd=(i=function(t){__extends(e,t);function e(e){var r=t.call(this)||this;r.type=i.TYPE;r._blob=e;r.data=fd(e.keyData);r._validAfter=r.data.validAfter;r._validBefore=r.data.validBefore;r.keyId=r.data.keyId;r.principals=r.data.validPrincipals;r.certType=r.data.type;r.serial=r.data.serial;r.validAfter=new Date(Number(r.data.validAfter)*1e3);r.validBefore=new Date(Number(r.data.validBefore)*1e3);r.publicKey=new Cd(r.data.publicKey);r.signatureKey=new Cd(r.data.signatureKey);r.criticalOptions=__assign({},r.data.criticalOptions);r.extensions=__assign({},r.data.extensions);return r}e.fromSSH=function(t){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(r){e=cd(t);return[2,new i(e)]}))}))};e.fromBlob=function(t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){return[2,new i(t)]}))}))};e.prototype.toSSH=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,vd(this._blob)]}))}))};e.prototype.toBlob=function(){return __assign({},this._blob)};Object.defineProperty(e.prototype,"blob",{get:function(){return this.toBlob()},enumerable:false,configurable:true});e.prototype.validate=function(t){if(t===void 0){t=new Date}var e=BigInt(Math.floor(t.getTime()/1e3));var i=this._validAfter;var r=this._validBefore;var n=0xffffffffffffffffn;var a=r===n?e:r;return e>=i&&e<=a};e.prototype.verify=function(t){return __awaiter(this,arguments,void 0,(function(t,e){var i,r,n,a,o;if(e===void 0){e=Uh()}return __generator(this,(function(s){switch(s.label){case 0:i=t||this.signatureKey;r=this.getSignedData();n=md.parse(this.data.signature);a=od.get(n.algorithm);return[4,i.toWebCrypto(e)];case 1:o=s.sent();return[2,a.verify({publicKey:o,signature:n.signature,data:r,crypto:e})]}}))}))};e.prototype.getSignedData=function(){var t=new $h(this._blob.keyData);t.readString();t.readBytes(t.readUint32());if(this.data.keyType==="ssh-ed25519"){t.readBytes(t.readUint32())}else if(this.data.keyType==="ssh-rsa"){t.readBytes(t.readUint32());t.readBytes(t.readUint32())}else if(this.data.keyType.startsWith("ecdsa-sha2-")){t.readString();t.readBytes(t.readUint32())}t.readUint64();t.readUint32();t.readBytes(t.readUint32());t.readBytes(t.readUint32());t.readUint64();t.readUint64();t.readBytes(t.readUint32());t.readBytes(t.readUint32());t.readBytes(t.readUint32());t.readBytes(t.readUint32());var e=t.getOffset();return this._blob.keyData.slice(0,e)};return e}(Ad),i.TYPE="certificate",i);var wd=undefined&&undefined.__classPrivateFieldSet||function(t,e,i,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e==="function"?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(t,i):n?n.value=i:e.set(t,i),i};var _d=undefined&&undefined.__classPrivateFieldGet||function(t,e,i,r){if(i==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e==="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return i==="m"?r:i==="a"?r.call(t):r?r.value:e.get(t)};var bd;var Ed=function(){function t(t){bd.set(this,void 0);var e=cd(t.trim());wd(this,bd,new gd(e),"f");this.notBefore=_d(this,bd,"f").validAfter;this.notAfter=_d(this,bd,"f").validBefore;this.validity=co(this.notBefore,this.notAfter);this.type=[_d(this,bd,"f").blob.type,_d(this,bd,"f").certType,_d(this,bd,"f").type].join(" ");this.serialNumber=_d(this,bd,"f").serial.toString();this.keyId=_d(this,bd,"f").keyId;this.principals=_d(this,bd,"f").principals;this.extensions=_d(this,bd,"f").extensions;this.criticalOptions=_d(this,bd,"f").criticalOptions}t.prototype.parseSignatureKey=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r;var n;return __generator(this,(function(a){switch(a.label){case 0:return[4,_d(this,bd,"f").signatureKey.toWebCrypto()];case 1:t=a.sent();e=_d(this,bd,"f").signatureKey.getBlob();return[4,_d(this,bd,"f").signatureKey.thumbprint("sha256")];case 2:i=a.sent();r=this;n={algorithm:t.algorithm.name,type:e.type};return[4,_d(this,bd,"f").signatureKey.toSSH()];case 3:r.signatureKey=(n.value=a.sent(),n.thumbprint=u.Convert.ToBase64(i),n);return[2]}}))}))};t.prototype.parsePublicKey=function(){return __awaiter(this,void 0,void 0,(function(){var t,e,i,r;var n;return __generator(this,(function(a){switch(a.label){case 0:return[4,_d(this,bd,"f").publicKey.toWebCrypto()];case 1:t=a.sent();e=_d(this,bd,"f").publicKey.getBlob();return[4,_d(this,bd,"f").publicKey.thumbprint("sha256")];case 2:i=a.sent();r=this;n={algorithm:t.algorithm.name,type:e.type};return[4,_d(this,bd,"f").publicKey.toSSH()];case 3:r.publicKey=(n.value=a.sent(),n.thumbprint=u.Convert.ToBase64(i),n);return[2]}}))}))};t.prototype.toString=function(){return __awaiter(this,arguments,void 0,(function(t){if(t===void 0){t="pem"}return __generator(this,(function(t){return[2,_d(this,bd,"f").toSSH()]}))}))};Object.defineProperty(t.prototype,"commonName",{get:function(){return _d(this,bd,"f").principals.join("_")||_d(this,bd,"f").keyId||_d(this,bd,"f").certType},enumerable:false,configurable:true});t.prototype.downloadAsPub=function(t){return __awaiter(this,void 0,void 0,(function(){var e,i;return __generator(this,(function(r){switch(r.label){case 0:i=(e=c.certSSH).asPub;return[4,this.toString()];case 1:i.apply(e,[r.sent(),t||[this.commonName,"cert"].join("-")]);return[2]}}))}))};return t}();t("bm",Ed);bd=new WeakMap}}}));
|
|
135
|
+
//# sourceMappingURL=p-kq9wAWxW.system.js.map
|