From bb80cdf5a6157ca1f3a276e12e9faae9a4739cb7 Mon Sep 17 00:00:00 2001
From: dh_ackergaul <dh_ackergaul@dh-software.de>
Date: Di, 23 Jun 2026 11:16:18 +0200
Subject: [PATCH] Update emvheya - 23.6.2026, 11:16:10 [JD]
---
manufacturer/_furnview/furnplan-web/node_modules/jose/dist/webapi/key/import.js | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 57 insertions(+), 0 deletions(-)
diff --git a/manufacturer/_furnview/furnplan-web/node_modules/jose/dist/webapi/key/import.js b/manufacturer/_furnview/furnplan-web/node_modules/jose/dist/webapi/key/import.js
new file mode 100644
index 0000000..b64bb79
--- /dev/null
+++ b/manufacturer/_furnview/furnplan-web/node_modules/jose/dist/webapi/key/import.js
@@ -0,0 +1,57 @@
+import { decode as decodeBase64URL } from '../util/base64url.js';
+import { fromSPKI, fromPKCS8, fromX509 } from '../lib/asn1.js';
+import { jwkToKey } from '../lib/jwk_to_key.js';
+import { JOSENotSupported } from '../util/errors.js';
+import { isObject } from '../lib/type_checks.js';
+export async function importSPKI(spki, alg, options) {
+ if (typeof spki !== 'string' || spki.indexOf('-----BEGIN PUBLIC KEY-----') !== 0) {
+ throw new TypeError('"spki" must be SPKI formatted string');
+ }
+ return fromSPKI(spki, alg, options);
+}
+export async function importX509(x509, alg, options) {
+ if (typeof x509 !== 'string' || x509.indexOf('-----BEGIN CERTIFICATE-----') !== 0) {
+ throw new TypeError('"x509" must be X.509 formatted string');
+ }
+ return fromX509(x509, alg, options);
+}
+export async function importPKCS8(pkcs8, alg, options) {
+ if (typeof pkcs8 !== 'string' || pkcs8.indexOf('-----BEGIN PRIVATE KEY-----') !== 0) {
+ throw new TypeError('"pkcs8" must be PKCS#8 formatted string');
+ }
+ return fromPKCS8(pkcs8, alg, options);
+}
+export async function importJWK(jwk, alg, options) {
+ if (!isObject(jwk)) {
+ throw new TypeError('JWK must be an object');
+ }
+ let ext;
+ alg ??= jwk.alg;
+ ext ??= options?.extractable ?? jwk.ext;
+ switch (jwk.kty) {
+ case 'oct':
+ if (typeof jwk.k !== 'string' || !jwk.k) {
+ throw new TypeError('missing "k" (Key Value) Parameter value');
+ }
+ return decodeBase64URL(jwk.k);
+ case 'RSA':
+ if ('oth' in jwk && jwk.oth !== undefined) {
+ throw new JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');
+ }
+ return jwkToKey({ ...jwk, alg, ext });
+ case 'AKP': {
+ if (typeof jwk.alg !== 'string' || !jwk.alg) {
+ throw new TypeError('missing "alg" (Algorithm) Parameter value');
+ }
+ if (alg !== undefined && alg !== jwk.alg) {
+ throw new TypeError('JWK alg and alg option value mismatch');
+ }
+ return jwkToKey({ ...jwk, ext });
+ }
+ case 'EC':
+ case 'OKP':
+ return jwkToKey({ ...jwk, alg, ext });
+ default:
+ throw new JOSENotSupported('Unsupported "kty" (Key Type) Parameter value');
+ }
+}
--
Gitblit v1.9.3