@microsoft/ccf-app 7.0.0-dev5 → 7.0.0-dev9
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/package.json +8 -5
- package/polyfill.js +52 -12
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/ccf-app",
|
|
3
|
-
"
|
|
3
|
+
"repository": {
|
|
4
|
+
"type": "git",
|
|
5
|
+
"url": "https://github.com/microsoft/ccf"
|
|
6
|
+
},
|
|
7
|
+
"version": "7.0.0-dev9",
|
|
4
8
|
"description": "CCF app support package",
|
|
5
9
|
"main": "index.js",
|
|
6
10
|
"files": [
|
|
@@ -20,15 +24,14 @@
|
|
|
20
24
|
"devDependencies": {
|
|
21
25
|
"@types/chai": "^5.0.0",
|
|
22
26
|
"@types/mocha": "^10.0.0",
|
|
23
|
-
"@types/node": "^
|
|
27
|
+
"@types/node": "^25.0.2",
|
|
24
28
|
"@types/node-forge": "^1.0.0",
|
|
25
29
|
"chai": "^6.0.1",
|
|
26
|
-
"colors": "1.4.0",
|
|
27
30
|
"cross-env": "^10.0.0",
|
|
28
31
|
"get-func-name": "3.0.0",
|
|
29
|
-
"mocha": "^11.
|
|
32
|
+
"mocha": "^11.7.5",
|
|
30
33
|
"node-forge": "^1.2.0",
|
|
31
|
-
"ts-node": "^10.
|
|
34
|
+
"ts-node": "^10.9.2",
|
|
32
35
|
"typedoc": "^0.28.10",
|
|
33
36
|
"typescript": "^5.9.2"
|
|
34
37
|
},
|
package/polyfill.js
CHANGED
|
@@ -384,8 +384,14 @@ class CCFPolyfill {
|
|
|
384
384
|
const jwk = key.export({
|
|
385
385
|
format: "jwk",
|
|
386
386
|
});
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
const jwkWithKid = {
|
|
388
|
+
kty: jwk.kty,
|
|
389
|
+
crv: jwk.crv,
|
|
390
|
+
x: jwk.x,
|
|
391
|
+
y: jwk.y,
|
|
392
|
+
kid: kid,
|
|
393
|
+
};
|
|
394
|
+
return jwkWithKid;
|
|
389
395
|
},
|
|
390
396
|
pemToJwk(pem, kid) {
|
|
391
397
|
const key = jscrypto.createPrivateKey({
|
|
@@ -394,8 +400,15 @@ class CCFPolyfill {
|
|
|
394
400
|
const jwk = key.export({
|
|
395
401
|
format: "jwk",
|
|
396
402
|
});
|
|
397
|
-
|
|
398
|
-
|
|
403
|
+
const jwkWithKid = {
|
|
404
|
+
kty: jwk.kty,
|
|
405
|
+
crv: jwk.crv,
|
|
406
|
+
x: jwk.x,
|
|
407
|
+
y: jwk.y,
|
|
408
|
+
d: jwk.d,
|
|
409
|
+
kid: kid,
|
|
410
|
+
};
|
|
411
|
+
return jwkWithKid;
|
|
399
412
|
},
|
|
400
413
|
pubRsaPemToJwk(pem, kid) {
|
|
401
414
|
const key = jscrypto.createPublicKey({
|
|
@@ -404,8 +417,13 @@ class CCFPolyfill {
|
|
|
404
417
|
const jwk = key.export({
|
|
405
418
|
format: "jwk",
|
|
406
419
|
});
|
|
407
|
-
|
|
408
|
-
|
|
420
|
+
const jwkWithKid = {
|
|
421
|
+
kty: jwk.kty,
|
|
422
|
+
n: jwk.n,
|
|
423
|
+
e: jwk.e,
|
|
424
|
+
kid: kid,
|
|
425
|
+
};
|
|
426
|
+
return jwkWithKid;
|
|
409
427
|
},
|
|
410
428
|
rsaPemToJwk(pem, kid) {
|
|
411
429
|
const key = jscrypto.createPrivateKey({
|
|
@@ -414,8 +432,19 @@ class CCFPolyfill {
|
|
|
414
432
|
const jwk = key.export({
|
|
415
433
|
format: "jwk",
|
|
416
434
|
});
|
|
417
|
-
|
|
418
|
-
|
|
435
|
+
const jwkWithKid = {
|
|
436
|
+
kty: jwk.kty,
|
|
437
|
+
n: jwk.n,
|
|
438
|
+
e: jwk.e,
|
|
439
|
+
d: jwk.d,
|
|
440
|
+
p: jwk.p,
|
|
441
|
+
q: jwk.q,
|
|
442
|
+
dp: jwk.dp,
|
|
443
|
+
dq: jwk.dq,
|
|
444
|
+
qi: jwk.qi,
|
|
445
|
+
kid: kid,
|
|
446
|
+
};
|
|
447
|
+
return jwkWithKid;
|
|
419
448
|
},
|
|
420
449
|
pubEddsaPemToJwk(pem, kid) {
|
|
421
450
|
const key = jscrypto.createPublicKey({
|
|
@@ -424,8 +453,13 @@ class CCFPolyfill {
|
|
|
424
453
|
const jwk = key.export({
|
|
425
454
|
format: "jwk",
|
|
426
455
|
});
|
|
427
|
-
|
|
428
|
-
|
|
456
|
+
const jwkWithKid = {
|
|
457
|
+
kty: jwk.kty,
|
|
458
|
+
crv: jwk.crv,
|
|
459
|
+
x: jwk.x,
|
|
460
|
+
kid: kid,
|
|
461
|
+
};
|
|
462
|
+
return jwkWithKid;
|
|
429
463
|
},
|
|
430
464
|
eddsaPemToJwk(pem, kid) {
|
|
431
465
|
const key = jscrypto.createPrivateKey({
|
|
@@ -434,8 +468,14 @@ class CCFPolyfill {
|
|
|
434
468
|
const jwk = key.export({
|
|
435
469
|
format: "jwk",
|
|
436
470
|
});
|
|
437
|
-
|
|
438
|
-
|
|
471
|
+
const jwkWithKid = {
|
|
472
|
+
kty: jwk.kty,
|
|
473
|
+
crv: jwk.crv,
|
|
474
|
+
x: jwk.x,
|
|
475
|
+
d: jwk.d,
|
|
476
|
+
kid: kid,
|
|
477
|
+
};
|
|
478
|
+
return jwkWithKid;
|
|
439
479
|
},
|
|
440
480
|
pubJwkToPem(jwk) {
|
|
441
481
|
const key = jscrypto.createPublicKey({
|