Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

jose-node-esm-runtime

Package Overview
Dependencies
Maintainers
1
Versions
132
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jose-node-esm-runtime - npm Package Compare versions

Comparing version 4.9.3 to 4.10.0

31

dist/node/esm/key/import.js

@@ -36,14 +36,8 @@ import { decode as decodeBase64URL, encodeBase64, decodeBase64 } from '../runtime/base64url.js';

}
else {
let numberOfDigits = bytes[position] & 0x7f;
position++;
else if (length === 0x80) {
length = 0;
for (let i = 0; i < numberOfDigits; i++) {
length = length * 256 + bytes[position];
position++;
}
}
if (length === 0x80) {
length = 0;
while (bytes[position + length] !== 0 || bytes[position + length + 1] !== 0) {
if (length > bytes.byteLength) {
throw new TypeError('invalid indefinite form length');
}
length++;

@@ -58,2 +52,11 @@ }

}
else {
let numberOfDigits = bytes[position] & 0x7f;
position++;
length = 0;
for (let i = 0; i < numberOfDigits; i++) {
length = length * 256 + bytes[position];
position++;
}
}
const byteLength = position + length;

@@ -85,3 +88,9 @@ return {

}
const spki = getSPKI(x509);
let spki;
try {
spki = getSPKI(x509);
}
catch (cause) {
throw new TypeError('failed to parse the X.509 certificate', { cause });
}
return importPublic(spki, alg, options);

@@ -88,0 +97,0 @@ }

@@ -79,2 +79,8 @@ import { isCloudflareWorkers } from '../runtime/env.js';

}
case 'EdDSA': {
if (key.algorithm.name !== 'Ed25519' && key.algorithm.name !== 'Ed448') {
throw unusable('Ed25519 or Ed448');
}
break;
}
case 'ES256':

@@ -120,6 +126,13 @@ case 'ES384':

}
case 'ECDH':
if (!isAlgorithm(key.algorithm, 'ECDH'))
throw unusable('ECDH');
case 'ECDH': {
switch (key.algorithm.name) {
case 'ECDH':
case 'X25519':
case 'X448':
break;
default:
throw unusable('ECDH, X25519, or X448');
}
break;
}
case 'PBES2-HS256+A128KW':

@@ -126,0 +139,0 @@ case 'PBES2-HS384+A192KW':

{
"name": "jose-node-esm-runtime",
"version": "4.9.3",
"version": "4.10.0",
"homepage": "https://github.com/panva/jose",

@@ -5,0 +5,0 @@ "repository": "panva/jose",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc