diff --git a/package-lock.json b/package-lock.json index 5b9d8d9..0889ece 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,14 @@ "version": "1.0.0", "license": "ISC", "dependencies": { + "@peculiar/x509": "^1.5.2", "axios": "^0.21.4", "body-parser": "^1.19.0", "cors": "^2.8.5", "dayjs": "^1.10.7", - "dcc-utils": "^0.2.0", + "dcc-utils": "^0.3.0", "express": "^4.17.1", + "isomorphic-webcrypto": "^2.3.8", "jsrsasign": "^10.4.0", "mock-fs": "^5.1.1" }, @@ -3216,6 +3218,125 @@ "node": ">= 8" } }, + "node_modules/@peculiar/asn1-cms": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.0.38.tgz", + "integrity": "sha512-9ZPki4qr2SIwD6y9d7Fgi4tnL51cCEqIltHvr7muIO78itM4VxovrbOOWEbNc2a+nJyac0ubVLil3+/xebo6jQ==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "@peculiar/asn1-x509-attr": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-cms/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-csr": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.0.38.tgz", + "integrity": "sha512-0Yw0Qzbj61gWpXupkga4Ajv49RIwsgNwnfIh3smRVrz7dz1w+F3XpHisJczkX/kATIl7mgPP/8dPGXa7xNAONg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-csr/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-ecc": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.0.38.tgz", + "integrity": "sha512-ooaxfw7mlzFjLbCF9GPnYzZXEpPijuqHPNRExoCQ6Kd1xikuLgC0ARUc1JSpKQU41tTS1o1y6QnqEgmOxCkAWQ==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-ecc/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-pfx": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.0.38.tgz", + "integrity": "sha512-Q7+nk0LrAmIRZizXfdNKtmYKaQyiDVYHizkaXsFwzn1CbcfAKonVWLGdaSlbSpk7dNEY5v2iZ+giG3CkgnUlmw==", + "dependencies": { + "@peculiar/asn1-cms": "^2.0.38", + "@peculiar/asn1-pkcs8": "^2.0.38", + "@peculiar/asn1-rsa": "^2.0.38", + "@peculiar/asn1-schema": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-pfx/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-pkcs8": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.0.38.tgz", + "integrity": "sha512-FIlnwL/bLkGECPyMpD9HI95CdHTt7rSPjG3FSioiosF38thxE73oI/p3okUZsLUeZaAAjAoLHnakObx/CKPnwg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-pkcs8/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-pkcs9": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.0.38.tgz", + "integrity": "sha512-aX2ianKE6CK8kLYRNq+DLbZTDeYxcXrB+b7ukC+LA0TlRx8VS3/zekA5n4HizTmK4oineKzkYnmRzsjF3X15jg==", + "dependencies": { + "@peculiar/asn1-cms": "^2.0.38", + "@peculiar/asn1-pfx": "^2.0.38", + "@peculiar/asn1-pkcs8": "^2.0.38", + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "@peculiar/asn1-x509-attr": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-pkcs9/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-rsa": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.0.38.tgz", + "integrity": "sha512-oH0Pw9ytOUJurvqBRAwpr1e87EfMUfySmeGSujWMUtdyYbuylmUZjVsUEZJEFfCV16uFwmuQ9P84jXFBTHiH7g==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-rsa/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, "node_modules/@peculiar/asn1-schema": { "version": "2.0.38", "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.0.38.tgz", @@ -3232,6 +3353,47 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, + "node_modules/@peculiar/asn1-x509": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.0.38.tgz", + "integrity": "sha512-10aK9fSxlc1DK9nEcwh+WPFNhAheXSE9RbI5MyS7FdBhgq+Mz4Z9JqFfaBZm1Qp+5mPtUMOP6cXVo7aaYlgq7A==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "asn1js": "^2.1.1", + "ipaddr.js": "^2.0.1", + "pvtsutils": "^1.2.0", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-x509-attr": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.0.38.tgz", + "integrity": "sha512-xjnQeijEZLPUN4/3uX/Fe41p/Lu6+Da8bU5erVn9M16Fi6GOiTiyra2eiYuzKpR3bUFbEOLHV3n+Xqn9NLiOIg==", + "dependencies": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + } + }, + "node_modules/@peculiar/asn1-x509-attr/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, + "node_modules/@peculiar/asn1-x509/node_modules/ipaddr.js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==", + "engines": { + "node": ">= 10" + } + }, + "node_modules/@peculiar/asn1-x509/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, "node_modules/@peculiar/json-schema": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", @@ -3268,6 +3430,29 @@ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" }, + "node_modules/@peculiar/x509": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.5.2.tgz", + "integrity": "sha512-GUDkI+sPUO6HNWgNULEUtH95Ud0gBIdc5hVS/OS3Nj0/KGJnAX+fsy1ef8NfeL9WrCjG1YLmzKl99RsePo7eIA==", + "dependencies": { + "@peculiar/asn1-cms": "^2.0.38", + "@peculiar/asn1-csr": "^2.0.38", + "@peculiar/asn1-ecc": "^2.0.38", + "@peculiar/asn1-pkcs9": "^2.0.38", + "@peculiar/asn1-rsa": "^2.0.38", + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "pvtsutils": "^1.2.1", + "reflect-metadata": "^0.1.13", + "tslib": "^2.3.1", + "tsyringe": "^4.6.0" + } + }, + "node_modules/@peculiar/x509/node_modules/tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + }, "node_modules/@react-native-community/cli": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-6.0.1.tgz", @@ -4877,6 +5062,14 @@ "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz", "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==" }, + "node_modules/asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "dependencies": { + "safer-buffer": "~2.1.0" + } + }, "node_modules/asn1js": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-2.1.1.tgz", @@ -5966,14 +6159,6 @@ "node": ">=0.6" } }, - "node_modules/bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==", - "engines": { - "node": "*" - } - }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -6959,50 +7144,21 @@ } }, "node_modules/cose-js": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.6.0.tgz", - "integrity": "sha512-iggu0022Enn9mdqDzecvmKZE/909XYe1i7JeAEoRU4xC5s2OMZm159xbqDdFZDSZebyfYwsbLX/jSAvw0wGHyw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.7.0.tgz", + "integrity": "sha512-RlmJ3JGHgjIano/YOWqFITiz6URVSdn0KnNaopmzC0koup+M9TR13tQ+C2BpG9D8UVdw70cjJjmjuruZXABWPA==", "dependencies": { - "aes-cbc-mac": "^1.0.0", + "aes-cbc-mac": "^1.0.1", "any-promise": "^1.3.0", - "cbor": "^3.0.3", + "cbor": "^7.0.6", "elliptic": "^6.4.0", - "node-hkdf-sync": "^1.0.0" + "node-hkdf-sync": "^1.0.0", + "node-rsa": "^1.1.1" }, "engines": { "node": ">=8.0" } }, - "node_modules/cose-js/node_modules/cbor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-3.0.3.tgz", - "integrity": "sha512-+UY2FhD8w4GCp8QzP2a3eW0NRTFh2BaXn6t/sVYtGzKJAl0LL8nwma7qzIwmojq7jMF94X5DVfBUeIj8BBHBqA==", - "dependencies": { - "bignumber.js": "^4.0", - "commander": "^2.11", - "json-text-sequence": "^0.1", - "nofilter": "^0.0.3" - }, - "bin": { - "cbor2comment": "bin/cbor2comment", - "cbor2diag": "bin/cbor2diag", - "cbor2json": "bin/cbor2json", - "json2cbor": "bin/json2cbor" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cose-js/node_modules/commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "node_modules/cose-js/node_modules/nofilter": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-0.0.3.tgz", - "integrity": "sha1-JB40IHgXeoaTowQ+g/N1Z+J2QQw=" - }, "node_modules/cosette": { "version": "0.6.5", "resolved": "https://registry.npmjs.org/cosette/-/cosette-0.6.5.tgz", @@ -7164,17 +7320,19 @@ "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==" }, "node_modules/dcc-utils": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dcc-utils/-/dcc-utils-0.2.0.tgz", - "integrity": "sha512-7/iRHspOw7hJb37SnsOEvaCbqQSd3Vd3dlj3scg0TJc6Rv2XNmmjivhFZ5ncqKB8yry5C2in78WoP2uS9UJGrw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dcc-utils/-/dcc-utils-0.3.0.tgz", + "integrity": "sha512-5gC0LpCzrvLMkmR6ti+Vpt5NhgSdr8xM2TGiWQp0/5NWNCiPo/oM5g08bHP5SsFaJQUsTxDWIhtHMna0o02fLQ==", "dependencies": { "base45": "^3.0.0", "cbor": "^7.0.6", "certlogic-js": "^0.8.0", - "cose-js": "^0.6.0", + "cose-js": "^0.7.0", "cosette": "^0.6.5", "jimp": "^0.16.1", - "jsqr": "^1.4.0" + "jsqr": "^1.4.0", + "jsrsasign": "^10.4.1", + "jsrsasign-util": "^1.0.5" } }, "node_modules/debug": { @@ -7305,11 +7463,6 @@ "node": ">=0.4.0" } }, - "node_modules/delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=" - }, "node_modules/denodeify": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", @@ -12996,14 +13149,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "node_modules/json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", - "dependencies": { - "delimit-stream": "0.1.0" - } - }, "node_modules/json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -13016,6 +13161,11 @@ "json5": "lib/cli.js" } }, + "node_modules/jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==" + }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -13044,13 +13194,22 @@ "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" }, "node_modules/jsrsasign": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.4.0.tgz", - "integrity": "sha512-C8qLhiAssh/b74KJpGhWuFGG9cFhJqMCVuuHXRibb3Z5vPuAW0ue0jUirpoExCdpdhv4nD3sZ1DAwJURYJTm9g==", + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.4.1.tgz", + "integrity": "sha512-g2CP2nb8xKdmfZhuHaJEz1zVYTsZc+lUjLFvgbMX35/cUALK0G15sQfCbCpDg/UivkjCNlq0lV6FxCfPhv0shw==", "funding": { "url": "https://github.com/kjur/jsrsasign#donations" } }, + "node_modules/jsrsasign-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/jsrsasign-util/-/jsrsasign-util-1.0.5.tgz", + "integrity": "sha512-e5Kp8aaT5GH2c5X8j4uaJruYmT4GcnaGb47nw8m60YqPywtnOtTISZ9hZgtZ3a+jh7B27bU2LCf3Y32wZyfhtQ==", + "dependencies": { + "jsonc-parser": ">= 0.0.1", + "jsrsasign": ">= 4.8.2" + } + }, "node_modules/keyv": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/keyv/-/keyv-3.1.0.tgz", @@ -14147,6 +14306,14 @@ "integrity": "sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA==", "devOptional": true }, + "node_modules/node-rsa": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-1.1.1.tgz", + "integrity": "sha512-Jd4cvbJMryN21r5HgxQOpMEqv+ooke/korixNNK3mGqfGJmy0M77WDDzo/05969+OkMy3XW1UuZsSmW9KQm7Fw==", + "dependencies": { + "asn1": "^0.2.4" + } + }, "node_modules/node-stream-zip": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz", @@ -15263,11 +15430,11 @@ } }, "node_modules/pvtsutils": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.2.0.tgz", - "integrity": "sha512-IDefMJEQl7HX0FP2hIKJFnAR11klP1js2ixCrOaMhe3kXFK6RQ2ABUCuwWaaD4ib0hSbh2fGTICvWJJhDfNecA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.2.1.tgz", + "integrity": "sha512-Q867jEr30lBR2YSFFLZ0/XsEvpweqH6Kj096wmlRAFXrdRGPCNq2iz9B5Tk085EZ+OBZyYAVA5UhPkjSHGrUzQ==", "dependencies": { - "tslib": "^2.2.0" + "tslib": "^2.3.1" } }, "node_modules/pvtsutils/node_modules/tslib": { @@ -15553,6 +15720,11 @@ "node": ">=8.10.0" } }, + "node_modules/reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -17421,8 +17593,7 @@ "node_modules/tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "node_modules/tsutils": { "version": "3.21.0", @@ -17439,6 +17610,17 @@ "typescript": ">=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta" } }, + "node_modules/tsyringe": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.6.0.tgz", + "integrity": "sha512-BMQAZamSfEmIQzH8WJeRu1yZGQbPSDuI9g+yEiKZFIcO46GPZuMOC2d0b52cVBdw1d++06JnDSIIZvEnogMdAw==", + "dependencies": { + "tslib": "^1.9.3" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -20723,6 +20905,139 @@ "fastq": "^1.6.0" } }, + "@peculiar/asn1-cms": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-cms/-/asn1-cms-2.0.38.tgz", + "integrity": "sha512-9ZPki4qr2SIwD6y9d7Fgi4tnL51cCEqIltHvr7muIO78itM4VxovrbOOWEbNc2a+nJyac0ubVLil3+/xebo6jQ==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "@peculiar/asn1-x509-attr": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-csr": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-csr/-/asn1-csr-2.0.38.tgz", + "integrity": "sha512-0Yw0Qzbj61gWpXupkga4Ajv49RIwsgNwnfIh3smRVrz7dz1w+F3XpHisJczkX/kATIl7mgPP/8dPGXa7xNAONg==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-ecc": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-ecc/-/asn1-ecc-2.0.38.tgz", + "integrity": "sha512-ooaxfw7mlzFjLbCF9GPnYzZXEpPijuqHPNRExoCQ6Kd1xikuLgC0ARUc1JSpKQU41tTS1o1y6QnqEgmOxCkAWQ==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-pfx": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pfx/-/asn1-pfx-2.0.38.tgz", + "integrity": "sha512-Q7+nk0LrAmIRZizXfdNKtmYKaQyiDVYHizkaXsFwzn1CbcfAKonVWLGdaSlbSpk7dNEY5v2iZ+giG3CkgnUlmw==", + "requires": { + "@peculiar/asn1-cms": "^2.0.38", + "@peculiar/asn1-pkcs8": "^2.0.38", + "@peculiar/asn1-rsa": "^2.0.38", + "@peculiar/asn1-schema": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-pkcs8": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs8/-/asn1-pkcs8-2.0.38.tgz", + "integrity": "sha512-FIlnwL/bLkGECPyMpD9HI95CdHTt7rSPjG3FSioiosF38thxE73oI/p3okUZsLUeZaAAjAoLHnakObx/CKPnwg==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-pkcs9": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-pkcs9/-/asn1-pkcs9-2.0.38.tgz", + "integrity": "sha512-aX2ianKE6CK8kLYRNq+DLbZTDeYxcXrB+b7ukC+LA0TlRx8VS3/zekA5n4HizTmK4oineKzkYnmRzsjF3X15jg==", + "requires": { + "@peculiar/asn1-cms": "^2.0.38", + "@peculiar/asn1-pfx": "^2.0.38", + "@peculiar/asn1-pkcs8": "^2.0.38", + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "@peculiar/asn1-x509-attr": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-rsa": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-rsa/-/asn1-rsa-2.0.38.tgz", + "integrity": "sha512-oH0Pw9ytOUJurvqBRAwpr1e87EfMUfySmeGSujWMUtdyYbuylmUZjVsUEZJEFfCV16uFwmuQ9P84jXFBTHiH7g==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "@peculiar/asn1-schema": { "version": "2.0.38", "resolved": "https://registry.npmjs.org/@peculiar/asn1-schema/-/asn1-schema-2.0.38.tgz", @@ -20741,6 +21056,48 @@ } } }, + "@peculiar/asn1-x509": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509/-/asn1-x509-2.0.38.tgz", + "integrity": "sha512-10aK9fSxlc1DK9nEcwh+WPFNhAheXSE9RbI5MyS7FdBhgq+Mz4Z9JqFfaBZm1Qp+5mPtUMOP6cXVo7aaYlgq7A==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "asn1js": "^2.1.1", + "ipaddr.js": "^2.0.1", + "pvtsutils": "^1.2.0", + "tslib": "^2.3.0" + }, + "dependencies": { + "ipaddr.js": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-2.0.1.tgz", + "integrity": "sha512-1qTgH9NG+IIJ4yfKs2e6Pp1bZg8wbDbKHT21HrLIeYBTRLgMYKnMTPAuI3Lcs61nfx5h1xlXnbJtH1kX5/d/ng==" + }, + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, + "@peculiar/asn1-x509-attr": { + "version": "2.0.38", + "resolved": "https://registry.npmjs.org/@peculiar/asn1-x509-attr/-/asn1-x509-attr-2.0.38.tgz", + "integrity": "sha512-xjnQeijEZLPUN4/3uX/Fe41p/Lu6+Da8bU5erVn9M16Fi6GOiTiyra2eiYuzKpR3bUFbEOLHV3n+Xqn9NLiOIg==", + "requires": { + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "asn1js": "^2.1.1", + "tslib": "^2.3.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "@peculiar/json-schema": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/@peculiar/json-schema/-/json-schema-1.1.12.tgz", @@ -20775,6 +21132,31 @@ } } }, + "@peculiar/x509": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/@peculiar/x509/-/x509-1.5.2.tgz", + "integrity": "sha512-GUDkI+sPUO6HNWgNULEUtH95Ud0gBIdc5hVS/OS3Nj0/KGJnAX+fsy1ef8NfeL9WrCjG1YLmzKl99RsePo7eIA==", + "requires": { + "@peculiar/asn1-cms": "^2.0.38", + "@peculiar/asn1-csr": "^2.0.38", + "@peculiar/asn1-ecc": "^2.0.38", + "@peculiar/asn1-pkcs9": "^2.0.38", + "@peculiar/asn1-rsa": "^2.0.38", + "@peculiar/asn1-schema": "^2.0.38", + "@peculiar/asn1-x509": "^2.0.38", + "pvtsutils": "^1.2.1", + "reflect-metadata": "^0.1.13", + "tslib": "^2.3.1", + "tsyringe": "^4.6.0" + }, + "dependencies": { + "tslib": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", + "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" + } + } + }, "@react-native-community/cli": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/@react-native-community/cli/-/cli-6.0.1.tgz", @@ -22097,6 +22479,14 @@ "resolved": "https://registry.npmjs.org/asmcrypto.js/-/asmcrypto.js-0.22.0.tgz", "integrity": "sha512-usgMoyXjMbx/ZPdzTSXExhMPur2FTdz/Vo5PVx2gIaBcdAAJNOFlsdgqveM8Cff7W0v+xrf9BwjOV26JSAF9qA==" }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, "asn1js": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/asn1js/-/asn1js-2.1.1.tgz", @@ -23088,11 +23478,6 @@ "optional": true, "peer": true }, - "bignumber.js": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-4.1.0.tgz", - "integrity": "sha512-eJzYkFYy9L4JzXsbymsFn3p54D+llV27oTQ+ziJG7WFRheJcNZilgVXMG0LoZtlQSKBsJdWtLFqOD0u+U0jZKA==" - }, "binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -23855,38 +24240,16 @@ } }, "cose-js": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.6.0.tgz", - "integrity": "sha512-iggu0022Enn9mdqDzecvmKZE/909XYe1i7JeAEoRU4xC5s2OMZm159xbqDdFZDSZebyfYwsbLX/jSAvw0wGHyw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/cose-js/-/cose-js-0.7.0.tgz", + "integrity": "sha512-RlmJ3JGHgjIano/YOWqFITiz6URVSdn0KnNaopmzC0koup+M9TR13tQ+C2BpG9D8UVdw70cjJjmjuruZXABWPA==", "requires": { - "aes-cbc-mac": "^1.0.0", + "aes-cbc-mac": "^1.0.1", "any-promise": "^1.3.0", - "cbor": "^3.0.3", + "cbor": "^7.0.6", "elliptic": "^6.4.0", - "node-hkdf-sync": "^1.0.0" - }, - "dependencies": { - "cbor": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/cbor/-/cbor-3.0.3.tgz", - "integrity": "sha512-+UY2FhD8w4GCp8QzP2a3eW0NRTFh2BaXn6t/sVYtGzKJAl0LL8nwma7qzIwmojq7jMF94X5DVfBUeIj8BBHBqA==", - "requires": { - "bignumber.js": "^4.0", - "commander": "^2.11", - "json-text-sequence": "^0.1", - "nofilter": "^0.0.3" - } - }, - "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" - }, - "nofilter": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/nofilter/-/nofilter-0.0.3.tgz", - "integrity": "sha1-JB40IHgXeoaTowQ+g/N1Z+J2QQw=" - } + "node-hkdf-sync": "^1.0.0", + "node-rsa": "^1.1.1" } }, "cosette": { @@ -24023,17 +24386,19 @@ "integrity": "sha512-P6twpd70BcPK34K26uJ1KT3wlhpuOAPoMwJzpsIWUxHZ7wpmbdZL/hQqBDfz7hGurYSa5PhzdhDHtt319hL3ig==" }, "dcc-utils": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/dcc-utils/-/dcc-utils-0.2.0.tgz", - "integrity": "sha512-7/iRHspOw7hJb37SnsOEvaCbqQSd3Vd3dlj3scg0TJc6Rv2XNmmjivhFZ5ncqKB8yry5C2in78WoP2uS9UJGrw==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/dcc-utils/-/dcc-utils-0.3.0.tgz", + "integrity": "sha512-5gC0LpCzrvLMkmR6ti+Vpt5NhgSdr8xM2TGiWQp0/5NWNCiPo/oM5g08bHP5SsFaJQUsTxDWIhtHMna0o02fLQ==", "requires": { "base45": "^3.0.0", "cbor": "^7.0.6", "certlogic-js": "^0.8.0", - "cose-js": "^0.6.0", + "cose-js": "^0.7.0", "cosette": "^0.6.5", "jimp": "^0.16.1", - "jsqr": "^1.4.0" + "jsqr": "^1.4.0", + "jsrsasign": "^10.4.1", + "jsrsasign-util": "^1.0.5" } }, "debug": { @@ -24140,11 +24505,6 @@ "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", "dev": true }, - "delimit-stream": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/delimit-stream/-/delimit-stream-0.1.0.tgz", - "integrity": "sha1-m4MZR3wOX4rrPONXrjBfwl6hzSs=" - }, "denodeify": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz", @@ -28497,14 +28857,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json-text-sequence": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/json-text-sequence/-/json-text-sequence-0.1.1.tgz", - "integrity": "sha1-py8hfcSvxGKf/1/rME3BvVGi89I=", - "requires": { - "delimit-stream": "0.1.0" - } - }, "json5": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", @@ -28514,6 +28866,11 @@ "minimist": "^1.2.0" } }, + "jsonc-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", + "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==" + }, "jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -28537,9 +28894,18 @@ "integrity": "sha512-dxLob7q65Xg2DvstYkRpkYtmKm2sPJ9oFhrhmudT1dZvNFFTlroai3AWSpLey/w5vMcLBXRgOJsbXpdN9HzU/A==" }, "jsrsasign": { - "version": "10.4.0", - "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.4.0.tgz", - "integrity": "sha512-C8qLhiAssh/b74KJpGhWuFGG9cFhJqMCVuuHXRibb3Z5vPuAW0ue0jUirpoExCdpdhv4nD3sZ1DAwJURYJTm9g==" + "version": "10.4.1", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.4.1.tgz", + "integrity": "sha512-g2CP2nb8xKdmfZhuHaJEz1zVYTsZc+lUjLFvgbMX35/cUALK0G15sQfCbCpDg/UivkjCNlq0lV6FxCfPhv0shw==" + }, + "jsrsasign-util": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/jsrsasign-util/-/jsrsasign-util-1.0.5.tgz", + "integrity": "sha512-e5Kp8aaT5GH2c5X8j4uaJruYmT4GcnaGb47nw8m60YqPywtnOtTISZ9hZgtZ3a+jh7B27bU2LCf3Y32wZyfhtQ==", + "requires": { + "jsonc-parser": ">= 0.0.1", + "jsrsasign": ">= 4.8.2" + } }, "keyv": { "version": "3.1.0", @@ -29491,6 +29857,14 @@ "integrity": "sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA==", "devOptional": true }, + "node-rsa": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/node-rsa/-/node-rsa-1.1.1.tgz", + "integrity": "sha512-Jd4cvbJMryN21r5HgxQOpMEqv+ooke/korixNNK3mGqfGJmy0M77WDDzo/05969+OkMy3XW1UuZsSmW9KQm7Fw==", + "requires": { + "asn1": "^0.2.4" + } + }, "node-stream-zip": { "version": "1.15.0", "resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz", @@ -30364,11 +30738,11 @@ } }, "pvtsutils": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.2.0.tgz", - "integrity": "sha512-IDefMJEQl7HX0FP2hIKJFnAR11klP1js2ixCrOaMhe3kXFK6RQ2ABUCuwWaaD4ib0hSbh2fGTICvWJJhDfNecA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/pvtsutils/-/pvtsutils-1.2.1.tgz", + "integrity": "sha512-Q867jEr30lBR2YSFFLZ0/XsEvpweqH6Kj096wmlRAFXrdRGPCNq2iz9B5Tk085EZ+OBZyYAVA5UhPkjSHGrUzQ==", "requires": { - "tslib": "^2.2.0" + "tslib": "^2.3.1" }, "dependencies": { "tslib": { @@ -30586,6 +30960,11 @@ "picomatch": "^2.2.1" } }, + "reflect-metadata": { + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", + "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==" + }, "regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -32074,8 +32453,7 @@ "tslib": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" }, "tsutils": { "version": "3.21.0", @@ -32086,6 +32464,14 @@ "tslib": "^1.8.1" } }, + "tsyringe": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/tsyringe/-/tsyringe-4.6.0.tgz", + "integrity": "sha512-BMQAZamSfEmIQzH8WJeRu1yZGQbPSDuI9g+yEiKZFIcO46GPZuMOC2d0b52cVBdw1d++06JnDSIIZvEnogMdAw==", + "requires": { + "tslib": "^1.9.3" + } + }, "type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", diff --git a/package.json b/package.json index f4f9603..e425b5d 100644 --- a/package.json +++ b/package.json @@ -10,12 +10,14 @@ "author": "", "license": "ISC", "dependencies": { + "@peculiar/x509": "^1.5.2", "axios": "^0.21.4", "body-parser": "^1.19.0", "cors": "^2.8.5", "dayjs": "^1.10.7", - "dcc-utils": "^0.2.0", + "dcc-utils": "^0.3.0", "express": "^4.17.1", + "isomorphic-webcrypto": "^2.3.8", "jsrsasign": "^10.4.0", "mock-fs": "^5.1.1" }, diff --git a/src/Services/SettingsDownloader/CertificateDownloader.ts b/src/Services/SettingsDownloader/CertificateDownloader.ts index 06aa647..7d37e7a 100644 --- a/src/Services/SettingsDownloader/CertificateDownloader.ts +++ b/src/Services/SettingsDownloader/CertificateDownloader.ts @@ -1,5 +1,17 @@ import fs from 'fs/promises'; import axios, { AxiosResponse } from 'axios'; +import { X509Certificate, PublicKey } from '@peculiar/x509'; +import crypto from 'isomorphic-webcrypto'; + +interface CertificateData { + serialNumber: string, + subject:string, + issuer: string, + notBefore: any, + notAfter: any, + signatureAlgorithm: any, + fingerprint:any +} export class CertificateDownloader{ // static instance: CertificateDownloader; @@ -9,10 +21,11 @@ export class CertificateDownloader{ private readonly keyStorage = './certificate_collection.json'; private readonly timeSpan = 86400000; // private readonly timeSpan = 1; - private certificatesCollection:{kid:string,certificate:string}[] = []; + // private certificatesCollection:{kid:string,certificate:string}[] = []; + private certificatesCollection: { [key: string]: string; } = {}; private currentValidKids:string[] = []; - public async getCertificates(): Promise<{kid:string,certificate:string}[]> { + public async getCertificates(): Promise<{ [key: string]: string; }> { let data = '{}'; try { const file = await fs.open(this.keyStorage,'r'); @@ -38,14 +51,14 @@ export class CertificateDownloader{ private async getAllCertificate(): Promise { let exit = false; let headers = {}; - this.certificatesCollection = []; + this.certificatesCollection = {}; while(!exit){ const response:AxiosResponse = await axios.get(this.baseUrl+this.updateApi,{headers}); headers = {'X-RESUME-TOKEN': response.headers['x-resume-token']}; const currentKid:string = response.headers['x-kid']; if(this.currentValidKids.includes(currentKid)){ const cert = {kid:currentKid, certificate: response.data}; - this.certificatesCollection.push(cert); + this.certificatesCollection[currentKid] = await parseCertificate(response.data); } exit = (response.status !== 200); } @@ -62,6 +75,21 @@ export class CertificateDownloader{ this.currentValidKids = await resp.data as string[]; } catch (error) { console.log('could not get keyChild ', error); + }parseCertificate + } + + private async parseCertificate(certificate:string):Promise{ + const result:CertificateData = { + serialNumber: '', + subject: 'UNKNOWN', + issuer: 'UNKNOWN', + notBefore: '2020-01-01', + notAfter: '2030-01-01', + signatureAlgorithm: '', + fingerprint: '', + } + try{ + const cert = new X509Certificate(certificate); } } } \ No newline at end of file