Release new version
This commit is contained in:
parent
798ac529df
commit
6c1738ff34
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "openpgp",
|
||||
"version": "4.2.1",
|
||||
"version": "4.2.2",
|
||||
"license": "LGPL-3.0+",
|
||||
"homepage": "https://openpgpjs.org/",
|
||||
"authors": [
|
||||
|
|
47
dist/compat/openpgp.js
vendored
47
dist/compat/openpgp.js
vendored
|
@ -29673,7 +29673,7 @@ exports.default = {
|
|||
* @memberof module:config
|
||||
* @property {String} versionstring A version string to be included in armored messages
|
||||
*/
|
||||
versionstring: "OpenPGP.js v4.2.1",
|
||||
versionstring: "OpenPGP.js v4.2.2",
|
||||
/**
|
||||
* @memberof module:config
|
||||
* @property {String} commentstring A comment string to be included in armored messages
|
||||
|
@ -38486,6 +38486,7 @@ exports.default = {
|
|||
plaintext: 0,
|
||||
/** Not implemented! */
|
||||
idea: 1,
|
||||
'3des': 2,
|
||||
tripledes: 2,
|
||||
cast5: 3,
|
||||
blowfish: 4,
|
||||
|
@ -39600,26 +39601,16 @@ var read = exports.read = function () {
|
|||
return packetlist.read(data);
|
||||
|
||||
case 7:
|
||||
if (!packetlist.filterByTag(_enums2.default.packet.signature).some(function (signature) {
|
||||
return signature.revocationKeyClass !== null;
|
||||
})) {
|
||||
_context46.next = 9;
|
||||
break;
|
||||
}
|
||||
|
||||
throw new Error('This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.');
|
||||
|
||||
case 9:
|
||||
keyIndex = packetlist.indexOfTag(_enums2.default.packet.publicKey, _enums2.default.packet.secretKey);
|
||||
|
||||
if (!(keyIndex.length === 0)) {
|
||||
_context46.next = 12;
|
||||
_context46.next = 10;
|
||||
break;
|
||||
}
|
||||
|
||||
throw new Error('No key packet found');
|
||||
|
||||
case 12:
|
||||
case 10:
|
||||
for (i = 0; i < keyIndex.length; i++) {
|
||||
oneKeyList = packetlist.slice(keyIndex[i], keyIndex[i + 1]);
|
||||
|
||||
|
@ -39631,27 +39622,27 @@ var read = exports.read = function () {
|
|||
err.push(e);
|
||||
}
|
||||
}
|
||||
_context46.next = 18;
|
||||
_context46.next = 16;
|
||||
break;
|
||||
|
||||
case 15:
|
||||
_context46.prev = 15;
|
||||
case 13:
|
||||
_context46.prev = 13;
|
||||
_context46.t0 = _context46['catch'](3);
|
||||
|
||||
err.push(_context46.t0);
|
||||
|
||||
case 18:
|
||||
case 16:
|
||||
if (err.length) {
|
||||
result.err = err;
|
||||
}
|
||||
return _context46.abrupt('return', result);
|
||||
|
||||
case 20:
|
||||
case 18:
|
||||
case 'end':
|
||||
return _context46.stop();
|
||||
}
|
||||
}
|
||||
}, _callee46, this, [[3, 15]]);
|
||||
}, _callee46, this, [[3, 13]]);
|
||||
}));
|
||||
|
||||
return function read(_x90) {
|
||||
|
@ -40743,6 +40734,7 @@ Key.prototype.packetlist2structure = function (packetlist) {
|
|||
continue;
|
||||
}
|
||||
if (packetlist[i].issuerKeyId.equals(primaryKeyId)) {
|
||||
checkRevocationKey(packetlist[i], primaryKeyId);
|
||||
user.selfCertifications.push(packetlist[i]);
|
||||
} else {
|
||||
user.otherCertifications.push(packetlist[i]);
|
||||
|
@ -40756,6 +40748,7 @@ Key.prototype.packetlist2structure = function (packetlist) {
|
|||
}
|
||||
break;
|
||||
case _enums2.default.signature.key:
|
||||
checkRevocationKey(packetlist[i], primaryKeyId);
|
||||
this.directSignatures.push(packetlist[i]);
|
||||
break;
|
||||
case _enums2.default.signature.subkey_binding:
|
||||
|
@ -40763,6 +40756,7 @@ Key.prototype.packetlist2structure = function (packetlist) {
|
|||
_util2.default.print_debug('Dropping subkey binding signature without preceding subkey packet');
|
||||
continue;
|
||||
}
|
||||
checkRevocationKey(packetlist[i], primaryKeyId);
|
||||
subKey.bindingSignatures.push(packetlist[i]);
|
||||
break;
|
||||
case _enums2.default.signature.key_revocation:
|
||||
|
@ -43315,6 +43309,18 @@ function getExpirationTime(keyPacket, signature) {
|
|||
return expirationTime ? new Date(expirationTime) : Infinity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if signature has revocation key sub packet (not supported by OpenPGP.js)
|
||||
* and throw error if found
|
||||
* @param {module:packet.Signature} signature The certificate or signature to check
|
||||
* @param {type/keyid} keyId Check only certificates or signatures from a certain issuer key ID
|
||||
*/
|
||||
function checkRevocationKey(signature, keyId) {
|
||||
if (signature.revocationKeyClass !== null && signature.issuerKeyId.equals(keyId)) {
|
||||
throw new Error('This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.');
|
||||
}
|
||||
}
|
||||
|
||||
},{"./config":342,"./crypto":357,"./encoding/armor":374,"./enums":376,"./packet":388,"./util":415,"babel-runtime/core-js/object/assign":21,"babel-runtime/core-js/object/get-prototype-of":26,"babel-runtime/core-js/object/values":28,"babel-runtime/core-js/promise":29,"babel-runtime/helpers/asyncToGenerator":33,"babel-runtime/helpers/slicedToArray":38,"babel-runtime/regenerator":41}],380:[function(_dereq_,module,exports){
|
||||
'use strict';
|
||||
|
||||
|
@ -47828,6 +47834,9 @@ function pako_zlib(constructor) {
|
|||
obj.push(value, _pako2.default.Z_SYNC_FLUSH);
|
||||
return obj.result;
|
||||
}
|
||||
}, function () {
|
||||
obj.push([], _pako2.default.Z_FINISH);
|
||||
return obj.result;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
4
dist/compat/openpgp.min.js
vendored
4
dist/compat/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/compat/openpgp.worker.min.js
vendored
2
dist/compat/openpgp.worker.min.js
vendored
|
@ -1,2 +1,2 @@
|
|||
/*! OpenPGP.js v4.2.1 - 2018-11-06 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
/*! OpenPGP.js v4.2.2 - 2018-12-07 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
!function(){return function e(n,r,t){function o(a,f){if(!r[a]){if(!n[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=r[a]={exports:{}};n[a][0].call(s.exports,function(e){return o(n[a][1][e]||e)},s,s.exports,e,n,r,t)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}}()({1:[function(e,n,r){self.window=self,importScripts("openpgp.min.js");var t=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,t.util.getTransferables(e.data))}t.crypto.random.randomBuffer.init(i,function(){return o.length||self.postMessage({event:"request-seed",amount:i}),new Promise(function(e){o.push(e)})}),self.onmessage=function(e){var n,r=e.data||{};switch(r.event){case"configure":n=r.config,Object.keys(n).forEach(function(e){t.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));t.crypto.random.randomBuffer.set(e)}(r.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,r){if("function"!=typeof t[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});r=t.packet.clone.parseClonedPackets(r,n),t.util.restoreStreams(r),t[n](r).then(function(n){a({id:e,event:"method-return",data:t.packet.clone.clonePackets(n)})}).catch(function(n){t.util.print_debug_error(n),a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(r.id,r.event,r.options||{})}}},{}]},{},[1]);
|
24
dist/openpgp.js
vendored
24
dist/openpgp.js
vendored
|
@ -23782,7 +23782,7 @@ exports.default = {
|
|||
* @memberof module:config
|
||||
* @property {String} versionstring A version string to be included in armored messages
|
||||
*/
|
||||
versionstring: "OpenPGP.js v4.2.1",
|
||||
versionstring: "OpenPGP.js v4.2.2",
|
||||
/**
|
||||
* @memberof module:config
|
||||
* @property {String} commentstring A comment string to be included in armored messages
|
||||
|
@ -30219,6 +30219,7 @@ exports.default = {
|
|||
plaintext: 0,
|
||||
/** Not implemented! */
|
||||
idea: 1,
|
||||
'3des': 2,
|
||||
tripledes: 2,
|
||||
cast5: 3,
|
||||
blowfish: 4,
|
||||
|
@ -31140,6 +31141,7 @@ Key.prototype.packetlist2structure = function (packetlist) {
|
|||
continue;
|
||||
}
|
||||
if (packetlist[i].issuerKeyId.equals(primaryKeyId)) {
|
||||
checkRevocationKey(packetlist[i], primaryKeyId);
|
||||
user.selfCertifications.push(packetlist[i]);
|
||||
} else {
|
||||
user.otherCertifications.push(packetlist[i]);
|
||||
|
@ -31153,6 +31155,7 @@ Key.prototype.packetlist2structure = function (packetlist) {
|
|||
}
|
||||
break;
|
||||
case _enums2.default.signature.key:
|
||||
checkRevocationKey(packetlist[i], primaryKeyId);
|
||||
this.directSignatures.push(packetlist[i]);
|
||||
break;
|
||||
case _enums2.default.signature.subkey_binding:
|
||||
|
@ -31160,6 +31163,7 @@ Key.prototype.packetlist2structure = function (packetlist) {
|
|||
_util2.default.print_debug('Dropping subkey binding signature without preceding subkey packet');
|
||||
continue;
|
||||
}
|
||||
checkRevocationKey(packetlist[i], primaryKeyId);
|
||||
subKey.bindingSignatures.push(packetlist[i]);
|
||||
break;
|
||||
case _enums2.default.signature.key_revocation:
|
||||
|
@ -32248,9 +32252,6 @@ async function read(data) {
|
|||
try {
|
||||
const packetlist = new _packet2.default.List();
|
||||
await packetlist.read(data);
|
||||
if (packetlist.filterByTag(_enums2.default.packet.signature).some(signature => signature.revocationKeyClass !== null)) {
|
||||
throw new Error('This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.');
|
||||
}
|
||||
const keyIndex = packetlist.indexOfTag(_enums2.default.packet.publicKey, _enums2.default.packet.secretKey);
|
||||
if (keyIndex.length === 0) {
|
||||
throw new Error('No key packet found');
|
||||
|
@ -32640,6 +32641,18 @@ function getExpirationTime(keyPacket, signature) {
|
|||
return expirationTime ? new Date(expirationTime) : Infinity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if signature has revocation key sub packet (not supported by OpenPGP.js)
|
||||
* and throw error if found
|
||||
* @param {module:packet.Signature} signature The certificate or signature to check
|
||||
* @param {type/keyid} keyId Check only certificates or signatures from a certain issuer key ID
|
||||
*/
|
||||
function checkRevocationKey(signature, keyId) {
|
||||
if (signature.revocationKeyClass !== null && signature.issuerKeyId.equals(keyId)) {
|
||||
throw new Error('This key is intended to be revoked with an authorized key, which OpenPGP.js does not support.');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the preferred signature hash algorithm of a key
|
||||
* @param {module:key.Key} key (optional) the key to get preferences from
|
||||
|
@ -35297,6 +35310,9 @@ function pako_zlib(constructor, options = {}) {
|
|||
obj.push(value, _pako2.default.Z_SYNC_FLUSH);
|
||||
return obj.result;
|
||||
}
|
||||
}, () => {
|
||||
obj.push([], _pako2.default.Z_FINISH);
|
||||
return obj.result;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
4
dist/openpgp.min.js
vendored
4
dist/openpgp.min.js
vendored
File diff suppressed because one or more lines are too long
2
dist/openpgp.worker.min.js
vendored
2
dist/openpgp.worker.min.js
vendored
|
@ -1,2 +1,2 @@
|
|||
/*! OpenPGP.js v4.2.1 - 2018-11-06 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
/*! OpenPGP.js v4.2.2 - 2018-12-07 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
|
||||
!function(){return function e(n,r,t){function o(a,f){if(!r[a]){if(!n[a]){var u="function"==typeof require&&require;if(!f&&u)return u(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var s=r[a]={exports:{}};n[a][0].call(s.exports,function(e){return o(n[a][1][e]||e)},s,s.exports,e,n,r,t)}return r[a].exports}for(var i="function"==typeof require&&require,a=0;a<t.length;a++)o(t[a]);return o}}()({1:[function(e,n,r){self.window=self,importScripts("openpgp.min.js");var t=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,t.util.getTransferables(e.data))}t.crypto.random.randomBuffer.init(i,function(){return o.length||self.postMessage({event:"request-seed",amount:i}),new Promise(function(e){o.push(e)})}),self.onmessage=function(e){var n,r=e.data||{};switch(r.event){case"configure":n=r.config,Object.keys(n).forEach(function(e){t.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));t.crypto.random.randomBuffer.set(e)}(r.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,r){if("function"!=typeof t[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});r=t.packet.clone.parseClonedPackets(r,n),t.util.restoreStreams(r),t[n](r).then(function(n){a({id:e,event:"method-return",data:t.packet.clone.clonePackets(n)})}).catch(function(n){t.util.print_debug_error(n),a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(r.id,r.event,r.options||{})}}},{}]},{},[1]);
|
2
npm-shrinkwrap.json
generated
2
npm-shrinkwrap.json
generated
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "openpgp",
|
||||
"version": "4.2.1",
|
||||
"version": "4.2.2",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "openpgp",
|
||||
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
||||
"version": "4.2.1",
|
||||
"version": "4.2.2",
|
||||
"license": "LGPL-3.0+",
|
||||
"homepage": "https://openpgpjs.org/",
|
||||
"engines": {
|
||||
|
|
Loading…
Reference in New Issue
Block a user