jose 5.0.2 → 5.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -9,7 +9,7 @@ function isCloudflareWorkers() {
|
|
|
9
9
|
let USER_AGENT;
|
|
10
10
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
11
11
|
const NAME = 'jose';
|
|
12
|
-
const VERSION = 'v5.
|
|
12
|
+
const VERSION = 'v5.1.1';
|
|
13
13
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
14
14
|
}
|
|
15
15
|
class RemoteJWKSet extends LocalJWKSet {
|
|
@@ -12,7 +12,7 @@ function isCloudflareWorkers() {
|
|
|
12
12
|
let USER_AGENT;
|
|
13
13
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
14
14
|
const NAME = 'jose';
|
|
15
|
-
const VERSION = 'v5.
|
|
15
|
+
const VERSION = 'v5.1.1';
|
|
16
16
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
17
17
|
}
|
|
18
18
|
class RemoteJWKSet extends local_js_1.LocalJWKSet {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.decrypt = exports.encrypt = void 0;
|
|
4
4
|
const node_crypto_1 = require("node:crypto");
|
|
5
|
+
const node_util_1 = require("node:util");
|
|
5
6
|
const check_key_length_js_1 = require("./check_key_length.js");
|
|
6
7
|
const webcrypto_js_1 = require("./webcrypto.js");
|
|
7
8
|
const crypto_key_js_1 = require("../lib/crypto_key.js");
|
|
@@ -14,6 +15,7 @@ const checkKey = (key, alg) => {
|
|
|
14
15
|
}
|
|
15
16
|
(0, check_key_length_js_1.default)(key, alg);
|
|
16
17
|
};
|
|
18
|
+
const RSA1_5 = (0, node_util_1.deprecate)(() => node_crypto_1.constants.RSA_PKCS1_PADDING, 'The RSA1_5 "alg" (JWE Algorithm) is deprecated and will be removed in the next major revision.');
|
|
17
19
|
const resolvePadding = (alg) => {
|
|
18
20
|
switch (alg) {
|
|
19
21
|
case 'RSA-OAEP':
|
|
@@ -22,7 +24,7 @@ const resolvePadding = (alg) => {
|
|
|
22
24
|
case 'RSA-OAEP-512':
|
|
23
25
|
return node_crypto_1.constants.RSA_PKCS1_OAEP_PADDING;
|
|
24
26
|
case 'RSA1_5':
|
|
25
|
-
return
|
|
27
|
+
return RSA1_5();
|
|
26
28
|
default:
|
|
27
29
|
return undefined;
|
|
28
30
|
}
|
|
@@ -9,7 +9,7 @@ function isCloudflareWorkers() {
|
|
|
9
9
|
let USER_AGENT;
|
|
10
10
|
if (typeof navigator === 'undefined' || !navigator.userAgent?.startsWith?.('Mozilla/5.0 ')) {
|
|
11
11
|
const NAME = 'jose';
|
|
12
|
-
const VERSION = 'v5.
|
|
12
|
+
const VERSION = 'v5.1.1';
|
|
13
13
|
USER_AGENT = `${NAME}/${VERSION}`;
|
|
14
14
|
}
|
|
15
15
|
class RemoteJWKSet extends LocalJWKSet {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeyObject, publicEncrypt, constants, privateDecrypt } from 'node:crypto';
|
|
2
|
+
import { deprecate } from 'node:util';
|
|
2
3
|
import checkKeyLength from './check_key_length.js';
|
|
3
4
|
import { isCryptoKey } from './webcrypto.js';
|
|
4
5
|
import { checkEncCryptoKey } from '../lib/crypto_key.js';
|
|
@@ -11,6 +12,7 @@ const checkKey = (key, alg) => {
|
|
|
11
12
|
}
|
|
12
13
|
checkKeyLength(key, alg);
|
|
13
14
|
};
|
|
15
|
+
const RSA1_5 = deprecate(() => constants.RSA_PKCS1_PADDING, 'The RSA1_5 "alg" (JWE Algorithm) is deprecated and will be removed in the next major revision.');
|
|
14
16
|
const resolvePadding = (alg) => {
|
|
15
17
|
switch (alg) {
|
|
16
18
|
case 'RSA-OAEP':
|
|
@@ -19,7 +21,7 @@ const resolvePadding = (alg) => {
|
|
|
19
21
|
case 'RSA-OAEP-512':
|
|
20
22
|
return constants.RSA_PKCS1_OAEP_PADDING;
|
|
21
23
|
case 'RSA1_5':
|
|
22
|
-
return
|
|
24
|
+
return RSA1_5();
|
|
23
25
|
default:
|
|
24
26
|
return undefined;
|
|
25
27
|
}
|
package/package.json
CHANGED