mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 06:29:28 -07:00
chore: npm audit fix
This commit is contained in:
parent
2baf4ccbe3
commit
f99092bce6
7 changed files with 51 additions and 36 deletions
15
dist/doip.core.js
vendored
15
dist/doip.core.js
vendored
|
@ -12929,6 +12929,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
const subtleDigest = `SHA-${algorithm.slice(-3)}`;
|
||||
return new Uint8Array(await crypto$1.subtle.digest(subtleDigest, data));
|
||||
};
|
||||
var digest$1 = digest;
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
const decoder = new TextDecoder();
|
||||
|
@ -13191,6 +13192,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
var isDisjoint$1 = isDisjoint;
|
||||
|
||||
function isObjectLike(value) {
|
||||
return typeof value === 'object' && value !== null;
|
||||
|
@ -13429,6 +13431,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
asymmetricTypeCheck(alg, key, usage);
|
||||
}
|
||||
};
|
||||
var checkKeyType$1 = checkKeyType;
|
||||
|
||||
function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
|
||||
if (joseHeader.crit !== undefined && protectedHeader.crit === undefined) {
|
||||
|
@ -13473,6 +13476,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
}
|
||||
return new Set(algorithms);
|
||||
};
|
||||
var validateAlgorithms$1 = validateAlgorithms;
|
||||
|
||||
function subtleDsa(alg, algorithm) {
|
||||
const hash = `SHA-${alg.slice(-3)}`;
|
||||
|
@ -13525,6 +13529,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
return false;
|
||||
}
|
||||
};
|
||||
var verify$1 = verify;
|
||||
|
||||
async function flattenedVerify(jws, key, options) {
|
||||
var _a;
|
||||
|
@ -13556,7 +13561,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
throw new JWSInvalid('JWS Protected Header is invalid');
|
||||
}
|
||||
}
|
||||
if (!isDisjoint(parsedProt, jws.header)) {
|
||||
if (!isDisjoint$1(parsedProt, jws.header)) {
|
||||
throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');
|
||||
}
|
||||
const joseHeader = {
|
||||
|
@ -13575,7 +13580,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
if (typeof alg !== 'string' || !alg) {
|
||||
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
||||
}
|
||||
const algorithms = options && validateAlgorithms('algorithms', options.algorithms);
|
||||
const algorithms = options && validateAlgorithms$1('algorithms', options.algorithms);
|
||||
if (algorithms && !algorithms.has(alg)) {
|
||||
throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed');
|
||||
}
|
||||
|
@ -13592,7 +13597,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
key = await key(parsedProt, jws);
|
||||
resolvedKey = true;
|
||||
}
|
||||
checkKeyType(alg, key, 'verify');
|
||||
checkKeyType$1(alg, key, 'verify');
|
||||
const data = concat(encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : ''), encoder.encode('.'), typeof jws.payload === 'string' ? encoder.encode(jws.payload) : jws.payload);
|
||||
let signature;
|
||||
try {
|
||||
|
@ -13601,7 +13606,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
catch (_c) {
|
||||
throw new JWSInvalid('Failed to base64url decode the signature');
|
||||
}
|
||||
const verified = await verify(alg, key, signature, data);
|
||||
const verified = await verify$1(alg, key, signature, data);
|
||||
if (!verified) {
|
||||
throw new JWSSignatureVerificationFailed();
|
||||
}
|
||||
|
@ -13693,7 +13698,7 @@ var doip = (function (exports, openpgp$2, fetcher) {
|
|||
throw new JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported');
|
||||
}
|
||||
const data = encoder.encode(JSON.stringify(components));
|
||||
return encode(await digest(digestAlgorithm, data));
|
||||
return encode(await digest$1(digestAlgorithm, data));
|
||||
}
|
||||
|
||||
const decode = decode$1;
|
||||
|
|
2
dist/doip.core.min.js
vendored
2
dist/doip.core.min.js
vendored
File diff suppressed because one or more lines are too long
15
dist/doip.fetchers.js
vendored
15
dist/doip.fetchers.js
vendored
|
@ -6117,6 +6117,7 @@ var doipFetchers = (function (exports) {
|
|||
const subtleDigest = `SHA-${algorithm.slice(-3)}`;
|
||||
return new Uint8Array(await crypto$1.subtle.digest(subtleDigest, data));
|
||||
};
|
||||
var digest$1 = digest;
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
const decoder = new TextDecoder();
|
||||
|
@ -6379,6 +6380,7 @@ var doipFetchers = (function (exports) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
var isDisjoint$1 = isDisjoint;
|
||||
|
||||
function isObjectLike(value) {
|
||||
return typeof value === 'object' && value !== null;
|
||||
|
@ -6617,6 +6619,7 @@ var doipFetchers = (function (exports) {
|
|||
asymmetricTypeCheck(alg, key, usage);
|
||||
}
|
||||
};
|
||||
var checkKeyType$1 = checkKeyType;
|
||||
|
||||
function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
|
||||
if (joseHeader.crit !== undefined && protectedHeader.crit === undefined) {
|
||||
|
@ -6661,6 +6664,7 @@ var doipFetchers = (function (exports) {
|
|||
}
|
||||
return new Set(algorithms);
|
||||
};
|
||||
var validateAlgorithms$1 = validateAlgorithms;
|
||||
|
||||
function subtleDsa(alg, algorithm) {
|
||||
const hash = `SHA-${alg.slice(-3)}`;
|
||||
|
@ -6713,6 +6717,7 @@ var doipFetchers = (function (exports) {
|
|||
return false;
|
||||
}
|
||||
};
|
||||
var verify$1 = verify;
|
||||
|
||||
async function flattenedVerify(jws, key, options) {
|
||||
var _a;
|
||||
|
@ -6744,7 +6749,7 @@ var doipFetchers = (function (exports) {
|
|||
throw new JWSInvalid('JWS Protected Header is invalid');
|
||||
}
|
||||
}
|
||||
if (!isDisjoint(parsedProt, jws.header)) {
|
||||
if (!isDisjoint$1(parsedProt, jws.header)) {
|
||||
throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');
|
||||
}
|
||||
const joseHeader = {
|
||||
|
@ -6763,7 +6768,7 @@ var doipFetchers = (function (exports) {
|
|||
if (typeof alg !== 'string' || !alg) {
|
||||
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
||||
}
|
||||
const algorithms = options && validateAlgorithms('algorithms', options.algorithms);
|
||||
const algorithms = options && validateAlgorithms$1('algorithms', options.algorithms);
|
||||
if (algorithms && !algorithms.has(alg)) {
|
||||
throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed');
|
||||
}
|
||||
|
@ -6780,7 +6785,7 @@ var doipFetchers = (function (exports) {
|
|||
key = await key(parsedProt, jws);
|
||||
resolvedKey = true;
|
||||
}
|
||||
checkKeyType(alg, key, 'verify');
|
||||
checkKeyType$1(alg, key, 'verify');
|
||||
const data = concat(encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : ''), encoder.encode('.'), typeof jws.payload === 'string' ? encoder.encode(jws.payload) : jws.payload);
|
||||
let signature;
|
||||
try {
|
||||
|
@ -6789,7 +6794,7 @@ var doipFetchers = (function (exports) {
|
|||
catch (_c) {
|
||||
throw new JWSInvalid('Failed to base64url decode the signature');
|
||||
}
|
||||
const verified = await verify(alg, key, signature, data);
|
||||
const verified = await verify$1(alg, key, signature, data);
|
||||
if (!verified) {
|
||||
throw new JWSSignatureVerificationFailed();
|
||||
}
|
||||
|
@ -6881,7 +6886,7 @@ var doipFetchers = (function (exports) {
|
|||
throw new JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported');
|
||||
}
|
||||
const data = encoder.encode(JSON.stringify(components));
|
||||
return encode$1(await digest(digestAlgorithm, data));
|
||||
return encode$1(await digest$1(digestAlgorithm, data));
|
||||
}
|
||||
|
||||
const decode$1 = decode$2;
|
||||
|
|
2
dist/doip.fetchers.min.js
vendored
2
dist/doip.fetchers.min.js
vendored
File diff suppressed because one or more lines are too long
15
dist/doip.fetchers.minimal.js
vendored
15
dist/doip.fetchers.minimal.js
vendored
|
@ -6103,6 +6103,7 @@ var doipFetchers = (function (exports) {
|
|||
const subtleDigest = `SHA-${algorithm.slice(-3)}`;
|
||||
return new Uint8Array(await crypto$1.subtle.digest(subtleDigest, data));
|
||||
};
|
||||
var digest$1 = digest;
|
||||
|
||||
const encoder = new TextEncoder();
|
||||
const decoder = new TextDecoder();
|
||||
|
@ -6365,6 +6366,7 @@ var doipFetchers = (function (exports) {
|
|||
}
|
||||
return true;
|
||||
};
|
||||
var isDisjoint$1 = isDisjoint;
|
||||
|
||||
function isObjectLike(value) {
|
||||
return typeof value === 'object' && value !== null;
|
||||
|
@ -6603,6 +6605,7 @@ var doipFetchers = (function (exports) {
|
|||
asymmetricTypeCheck(alg, key, usage);
|
||||
}
|
||||
};
|
||||
var checkKeyType$1 = checkKeyType;
|
||||
|
||||
function validateCrit(Err, recognizedDefault, recognizedOption, protectedHeader, joseHeader) {
|
||||
if (joseHeader.crit !== undefined && protectedHeader.crit === undefined) {
|
||||
|
@ -6647,6 +6650,7 @@ var doipFetchers = (function (exports) {
|
|||
}
|
||||
return new Set(algorithms);
|
||||
};
|
||||
var validateAlgorithms$1 = validateAlgorithms;
|
||||
|
||||
function subtleDsa(alg, algorithm) {
|
||||
const hash = `SHA-${alg.slice(-3)}`;
|
||||
|
@ -6699,6 +6703,7 @@ var doipFetchers = (function (exports) {
|
|||
return false;
|
||||
}
|
||||
};
|
||||
var verify$1 = verify;
|
||||
|
||||
async function flattenedVerify(jws, key, options) {
|
||||
var _a;
|
||||
|
@ -6730,7 +6735,7 @@ var doipFetchers = (function (exports) {
|
|||
throw new JWSInvalid('JWS Protected Header is invalid');
|
||||
}
|
||||
}
|
||||
if (!isDisjoint(parsedProt, jws.header)) {
|
||||
if (!isDisjoint$1(parsedProt, jws.header)) {
|
||||
throw new JWSInvalid('JWS Protected and JWS Unprotected Header Parameter names must be disjoint');
|
||||
}
|
||||
const joseHeader = {
|
||||
|
@ -6749,7 +6754,7 @@ var doipFetchers = (function (exports) {
|
|||
if (typeof alg !== 'string' || !alg) {
|
||||
throw new JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');
|
||||
}
|
||||
const algorithms = options && validateAlgorithms('algorithms', options.algorithms);
|
||||
const algorithms = options && validateAlgorithms$1('algorithms', options.algorithms);
|
||||
if (algorithms && !algorithms.has(alg)) {
|
||||
throw new JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter not allowed');
|
||||
}
|
||||
|
@ -6766,7 +6771,7 @@ var doipFetchers = (function (exports) {
|
|||
key = await key(parsedProt, jws);
|
||||
resolvedKey = true;
|
||||
}
|
||||
checkKeyType(alg, key, 'verify');
|
||||
checkKeyType$1(alg, key, 'verify');
|
||||
const data = concat(encoder.encode((_a = jws.protected) !== null && _a !== void 0 ? _a : ''), encoder.encode('.'), typeof jws.payload === 'string' ? encoder.encode(jws.payload) : jws.payload);
|
||||
let signature;
|
||||
try {
|
||||
|
@ -6775,7 +6780,7 @@ var doipFetchers = (function (exports) {
|
|||
catch (_c) {
|
||||
throw new JWSInvalid('Failed to base64url decode the signature');
|
||||
}
|
||||
const verified = await verify(alg, key, signature, data);
|
||||
const verified = await verify$1(alg, key, signature, data);
|
||||
if (!verified) {
|
||||
throw new JWSSignatureVerificationFailed();
|
||||
}
|
||||
|
@ -6867,7 +6872,7 @@ var doipFetchers = (function (exports) {
|
|||
throw new JOSENotSupported('"kty" (Key Type) Parameter missing or unsupported');
|
||||
}
|
||||
const data = encoder.encode(JSON.stringify(components));
|
||||
return encode$1(await digest(digestAlgorithm, data));
|
||||
return encode$1(await digest$1(digestAlgorithm, data));
|
||||
}
|
||||
|
||||
const decode$1 = decode$2;
|
||||
|
|
2
dist/doip.fetchers.minimal.min.js
vendored
2
dist/doip.fetchers.minimal.min.js
vendored
File diff suppressed because one or more lines are too long
36
package-lock.json
generated
36
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "doipjs",
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "doipjs",
|
||||
"version": "2.0.0-rc.1",
|
||||
"version": "2.0.0",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
"@openpgp/hkp-client": "^0.0.3",
|
||||
|
@ -1673,12 +1673,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/braces": {
|
||||
"version": "3.0.2",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
|
||||
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
|
||||
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"fill-range": "^7.0.1"
|
||||
"fill-range": "^7.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
|
@ -3233,9 +3233,9 @@
|
|||
}
|
||||
},
|
||||
"node_modules/fill-range": {
|
||||
"version": "7.0.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
|
||||
"integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
|
||||
"version": "7.1.1",
|
||||
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
|
||||
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
|
||||
"devOptional": true,
|
||||
"dependencies": {
|
||||
"to-regex-range": "^5.0.1"
|
||||
|
@ -3303,9 +3303,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/follow-redirects": {
|
||||
"version": "1.15.5",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.5.tgz",
|
||||
"integrity": "sha512-vSFWUON1B+yAw1VN4xMfxgn5fTUiaOzAJCKBwIIgT/+7CuGy9+r+5gITvP62j3RmaD5Ph65UaERdOSRGUzZtgw==",
|
||||
"version": "1.15.6",
|
||||
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz",
|
||||
"integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
|
@ -4313,9 +4313,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"node_modules/jose": {
|
||||
"version": "4.15.4",
|
||||
"resolved": "https://registry.npmjs.org/jose/-/jose-4.15.4.tgz",
|
||||
"integrity": "sha512-W+oqK4H+r5sITxfxpSU+MMdr/YSWGvgZMQDIsNoBDGGy4i7GBPTtvFKibQzW06n3U3TqHjhvBJsirShsEJ6eeQ==",
|
||||
"version": "4.15.9",
|
||||
"resolved": "https://registry.npmjs.org/jose/-/jose-4.15.9.tgz",
|
||||
"integrity": "sha512-1vUQX+IdDMVPj4k8kOxgUqlcK518yluMuGZwqlr44FS1ppZB/5GWh4rZG89erpOBOJjU/OBsnCVFfapsRz6nEA==",
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/panva"
|
||||
}
|
||||
|
@ -7232,9 +7232,9 @@
|
|||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.16.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz",
|
||||
"integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==",
|
||||
"version": "8.18.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz",
|
||||
"integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue