@protontech/openpgp 6.0.1 → 6.0.2-patch.0

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.
@@ -1,4 +1,4 @@
1
- /*! OpenPGP.js v6.0.1 - 2024-11-25 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
1
+ /*! OpenPGP.js v6.0.2-patch.0 - 2024-11-27 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
2
  const globalThis = typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3
3
 
4
4
  import { createRequire } from 'module';
@@ -1706,7 +1706,7 @@ var config = {
1706
1706
  * @memberof module:config
1707
1707
  * @property {String} versionString A version string to be included in armored messages
1708
1708
  */
1709
- versionString: 'OpenPGP.js 6.0.1',
1709
+ versionString: 'OpenPGP.js 6.0.2-patch.0',
1710
1710
  /**
1711
1711
  * @memberof module:config
1712
1712
  * @property {String} commentString A comment string to be included in armored messages
@@ -9291,7 +9291,11 @@ async function generate$a(algo) {
9291
9291
  seed: b64ToUint8Array(privateKey.d, true)
9292
9292
  };
9293
9293
  } catch (err) {
9294
- if (err.name !== 'NotSupportedError' && err.name !== 'OperationError') { // Temporary (hopefully) fix for WebKit on Linux
9294
+ if (
9295
+ err.name !== 'NotSupportedError' &&
9296
+ err.name !== 'OperationError' && // Temporary (hopefully) fix for WebKit on Linux
9297
+ err.name !== 'SyntaxError' // Temporary fix for Palemoon throwing 'SyntaxError'
9298
+ ) {
9295
9299
  throw err;
9296
9300
  }
9297
9301
  const seed = getRandomBytes(getPayloadSize$1(algo));
@@ -9343,7 +9347,7 @@ async function sign$9(algo, hashAlgo, message, publicKey, privateKey, hashed) {
9343
9347
 
9344
9348
  return { RS: signature };
9345
9349
  } catch (err) {
9346
- if (err.name !== 'NotSupportedError') {
9350
+ if (err.name !== 'NotSupportedError' && err.name !== 'SyntaxError') { // Temporary fix for Palemoon throwing 'SyntaxError'
9347
9351
  throw err;
9348
9352
  }
9349
9353
  const secretKey = util.concatUint8Array([privateKey, publicKey]);
@@ -9389,7 +9393,7 @@ async function verify$9(algo, hashAlgo, { RS }, m, publicKey, hashed) {
9389
9393
  const verified = await webCrypto.verify('Ed25519', key, RS, hashed);
9390
9394
  return verified;
9391
9395
  } catch (err) {
9392
- if (err.name !== 'NotSupportedError') {
9396
+ if (err.name !== 'NotSupportedError' && err.name !== 'SyntaxError') { // Temporary fix for Palemoon throwing 'SyntaxError'
9393
9397
  throw err;
9394
9398
  }
9395
9399
  return verify$a(RS, hashed, publicKey);
package/dist/openpgp.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! OpenPGP.js v6.0.1 - 2024-11-25 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
1
+ /*! OpenPGP.js v6.0.2-patch.0 - 2024-11-27 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
2
2
  var openpgp = (function (exports) {
3
3
  'use strict';
4
4
 
@@ -1705,7 +1705,7 @@ var openpgp = (function (exports) {
1705
1705
  * @memberof module:config
1706
1706
  * @property {String} versionString A version string to be included in armored messages
1707
1707
  */
1708
- versionString: 'OpenPGP.js 6.0.1',
1708
+ versionString: 'OpenPGP.js 6.0.2-patch.0',
1709
1709
  /**
1710
1710
  * @memberof module:config
1711
1711
  * @property {String} commentString A comment string to be included in armored messages
@@ -9284,7 +9284,11 @@ var openpgp = (function (exports) {
9284
9284
  seed: b64ToUint8Array(privateKey.d, true)
9285
9285
  };
9286
9286
  } catch (err) {
9287
- if (err.name !== 'NotSupportedError' && err.name !== 'OperationError') { // Temporary (hopefully) fix for WebKit on Linux
9287
+ if (
9288
+ err.name !== 'NotSupportedError' &&
9289
+ err.name !== 'OperationError' && // Temporary (hopefully) fix for WebKit on Linux
9290
+ err.name !== 'SyntaxError' // Temporary fix for Palemoon throwing 'SyntaxError'
9291
+ ) {
9288
9292
  throw err;
9289
9293
  }
9290
9294
  const seed = getRandomBytes(getPayloadSize$1(algo));
@@ -9336,7 +9340,7 @@ var openpgp = (function (exports) {
9336
9340
 
9337
9341
  return { RS: signature };
9338
9342
  } catch (err) {
9339
- if (err.name !== 'NotSupportedError') {
9343
+ if (err.name !== 'NotSupportedError' && err.name !== 'SyntaxError') { // Temporary fix for Palemoon throwing 'SyntaxError'
9340
9344
  throw err;
9341
9345
  }
9342
9346
  const secretKey = util.concatUint8Array([privateKey, publicKey]);
@@ -9382,7 +9386,7 @@ var openpgp = (function (exports) {
9382
9386
  const verified = await webCrypto.verify('Ed25519', key, RS, hashed);
9383
9387
  return verified;
9384
9388
  } catch (err) {
9385
- if (err.name !== 'NotSupportedError') {
9389
+ if (err.name !== 'NotSupportedError' && err.name !== 'SyntaxError') { // Temporary fix for Palemoon throwing 'SyntaxError'
9386
9390
  throw err;
9387
9391
  }
9388
9392
  return verify$a(RS, hashed, publicKey);