Release new version

This commit is contained in:
Daniel Huigens 2019-05-16 16:23:36 +02:00
parent 5987e99c5b
commit 72e3b491d7
9 changed files with 126 additions and 106 deletions

View File

@ -1,6 +1,6 @@
{
"name": "openpgp",
"version": "4.5.1",
"version": "4.5.2",
"license": "LGPL-3.0+",
"homepage": "https://openpgpjs.org/",
"authors": [

112
dist/compat/openpgp.js vendored
View File

@ -31823,7 +31823,7 @@ exports.default = {
* @memberof module:config
* @property {String} versionstring A version string to be included in armored messages
*/
versionstring: "OpenPGP.js v4.5.1",
versionstring: "OpenPGP.js v4.5.2",
/**
* @memberof module:config
* @property {String} commentstring A comment string to be included in armored messages
@ -31845,7 +31845,14 @@ exports.default = {
* @memberof module:config
* @property {Integer} max_userid_length
*/
max_userid_length: 1024 * 5
max_userid_length: 1024 * 5,
/**
* Contains notatations that are considered "known". Known notations do not trigger
* validation error when the notation is marked as critical.
* @memberof module:config
* @property {Array} known_notations
*/
known_notations: ["preferred-email-encoding@pgp.com", "pka-address@gnupg.org"]
}; // GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
@ -53360,10 +53367,6 @@ var _slicedToArray2 = _dereq_('babel-runtime/helpers/slicedToArray');
var _slicedToArray3 = _interopRequireDefault(_slicedToArray2);
var _entries = _dereq_('babel-runtime/core-js/object/entries');
var _entries2 = _interopRequireDefault(_entries);
var _regenerator = _dereq_('babel-runtime/regenerator');
var _regenerator2 = _interopRequireDefault(_regenerator);
@ -53400,6 +53403,10 @@ var _util = _dereq_('../util');
var _util2 = _interopRequireDefault(_util);
var _config = _dereq_('../config');
var _config2 = _interopRequireDefault(_config);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
@ -53413,6 +53420,33 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @constructor
* @param {Date} date the creation date of the signature
*/
// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
* @requires web-stream-tools
* @requires packet/packet
* @requires type/keyid
* @requires type/mpi
* @requires crypto
* @requires enums
* @requires util
*/
function Signature() {
var date = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : new Date();
@ -53441,7 +53475,7 @@ function Signature() {
this.revocationKeyAlgorithm = null;
this.revocationKeyFingerprint = null;
this.issuerKeyId = new _keyid2.default();
this.notation = null;
this.notations = [];
this.preferredHashAlgorithms = null;
this.preferredCompressionAlgorithms = null;
this.keyServerPreferences = null;
@ -53472,33 +53506,6 @@ function Signature() {
* @param {Integer} len length of the packet or the remaining length of bytes at position
* @returns {module:packet.Signature} object representation
*/
// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
* @requires web-stream-tools
* @requires packet/packet
* @requires type/keyid
* @requires type/mpi
* @requires crypto
* @requires enums
* @requires util
*/
Signature.prototype.read = function (bytes) {
var i = 0;
this.version = bytes[i++];
@ -53673,22 +53680,20 @@ Signature.prototype.write_hashed_sub_packets = function () {
bytes = _util2.default.concat([bytes, this.revocationKeyFingerprint]);
arr.push(write_sub_packet(sub.revocation_key, bytes));
}
if (this.notation !== null) {
(0, _entries2.default)(this.notation).forEach(function (_ref3) {
var _ref4 = (0, _slicedToArray3.default)(_ref3, 2),
name = _ref4[0],
value = _ref4[1];
this.notations.forEach(function (_ref3) {
var _ref4 = (0, _slicedToArray3.default)(_ref3, 2),
name = _ref4[0],
value = _ref4[1];
bytes = [new Uint8Array([0x80, 0, 0, 0])];
// 2 octets of name length
bytes.push(_util2.default.writeNumber(name.length, 2));
// 2 octets of value length
bytes.push(_util2.default.writeNumber(value.length, 2));
bytes.push(_util2.default.str_to_Uint8Array(name + value));
bytes = _util2.default.concat(bytes);
arr.push(write_sub_packet(sub.notation_data, bytes));
});
}
bytes = [new Uint8Array([0x80, 0, 0, 0])];
// 2 octets of name length
bytes.push(_util2.default.writeNumber(name.length, 2));
// 2 octets of value length
bytes.push(_util2.default.writeNumber(value.length, 2));
bytes.push(_util2.default.str_to_Uint8Array(name + value));
bytes = _util2.default.concat(bytes);
arr.push(write_sub_packet(sub.notation_data, bytes));
});
if (this.preferredHashAlgorithms !== null) {
bytes = _util2.default.str_to_Uint8Array(_util2.default.Uint8Array_to_str(this.preferredHashAlgorithms));
arr.push(write_sub_packet(sub.preferred_hash_algorithms, bytes));
@ -53898,8 +53903,11 @@ Signature.prototype.read_sub_packet = function (bytes) {
var name = _util2.default.Uint8Array_to_str(bytes.subarray(mypos, mypos + m));
var value = _util2.default.Uint8Array_to_str(bytes.subarray(mypos + m, mypos + m + n));
this.notation = this.notation || {};
this.notation[name] = value;
this.notations.push([name, value]);
if (critical && _config2.default.known_notations.indexOf(name) === -1) {
throw new Error("Unknown critical notation: " + name);
}
} else {
_util2.default.print_debug("Unsupported notation flag " + bytes[mypos]);
}
@ -54301,7 +54309,7 @@ Signature.prototype.postCloneTypeFix = function () {
exports.default = Signature;
},{"../crypto":366,"../enums":385,"../type/keyid.js":420,"../type/mpi.js":421,"../util":424,"./packet":401,"babel-runtime/core-js/object/entries":26,"babel-runtime/helpers/asyncToGenerator":36,"babel-runtime/helpers/slicedToArray":41,"babel-runtime/regenerator":44,"web-stream-tools":346}],409:[function(_dereq_,module,exports){
},{"../config":351,"../crypto":366,"../enums":385,"../type/keyid.js":420,"../type/mpi.js":421,"../util":424,"./packet":401,"babel-runtime/helpers/asyncToGenerator":36,"babel-runtime/helpers/slicedToArray":41,"babel-runtime/regenerator":44,"web-stream-tools":346}],409:[function(_dereq_,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! OpenPGP.js v4.5.1 - 2019-05-06 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.5.2 - 2019-05-16 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
!function(){return function e(n,t,r){function o(a,f){if(!t[a]){if(!n[a]){var s="function"==typeof require&&require;if(!f&&s)return s(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[a]={exports:{}};n[a][0].call(c.exports,function(e){return o(n[a][1][e]||e)},c,c.exports,e,n,t,r)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}}()({1:[function(e,n,t){self.window=self,importScripts("openpgp.min.js");var r=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,r.util.getTransferables(e.data,!0))}r.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,t=e.data||{};switch(t.event){case"configure":n=t.config,Object.keys(n).forEach(function(e){r.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));r.crypto.random.randomBuffer.set(e)}(t.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,t){if("function"!=typeof r[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});r.util.restoreStreams(t),t=r.packet.clone.parseClonedPackets(t,n),r[n](t).then(function(n){a({id:e,event:"method-return",data:r.packet.clone.clonePackets(n)})}).catch(function(n){r.util.print_debug_error(n),a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(t.id,t.event,t.options||{})}},postMessage({event:"loaded"})},{}]},{},[1]);

102
dist/openpgp.js vendored
View File

@ -25364,7 +25364,7 @@ exports.default = {
* @memberof module:config
* @property {String} versionstring A version string to be included in armored messages
*/
versionstring: "OpenPGP.js v4.5.1",
versionstring: "OpenPGP.js v4.5.2",
/**
* @memberof module:config
* @property {String} commentstring A comment string to be included in armored messages
@ -25386,7 +25386,14 @@ exports.default = {
* @memberof module:config
* @property {Integer} max_userid_length
*/
max_userid_length: 1024 * 5
max_userid_length: 1024 * 5,
/**
* Contains notatations that are considered "known". Known notations do not trigger
* validation error when the notation is marked as critical.
* @memberof module:config
* @property {Array} known_notations
*/
known_notations: ["preferred-email-encoding@pgp.com", "pka-address@gnupg.org"]
}; // GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
@ -39069,6 +39076,10 @@ var _util = require('../util');
var _util2 = _interopRequireDefault(_util);
var _config = require('../config');
var _config2 = _interopRequireDefault(_config);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
@ -39082,6 +39093,33 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
* @constructor
* @param {Date} date the creation date of the signature
*/
// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
* @requires web-stream-tools
* @requires packet/packet
* @requires type/keyid
* @requires type/mpi
* @requires crypto
* @requires enums
* @requires util
*/
function Signature(date = new Date()) {
this.tag = _enums2.default.packet.signature;
this.version = 4;
@ -39108,7 +39146,7 @@ function Signature(date = new Date()) {
this.revocationKeyAlgorithm = null;
this.revocationKeyFingerprint = null;
this.issuerKeyId = new _keyid2.default();
this.notation = null;
this.notations = [];
this.preferredHashAlgorithms = null;
this.preferredCompressionAlgorithms = null;
this.keyServerPreferences = null;
@ -39139,33 +39177,6 @@ function Signature(date = new Date()) {
* @param {Integer} len length of the packet or the remaining length of bytes at position
* @returns {module:packet.Signature} object representation
*/
// GPG4Browsers - An OpenPGP implementation in javascript
// Copyright (C) 2011 Recurity Labs GmbH
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 3.0 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
/**
* @requires web-stream-tools
* @requires packet/packet
* @requires type/keyid
* @requires type/mpi
* @requires crypto
* @requires enums
* @requires util
*/
Signature.prototype.read = function (bytes) {
let i = 0;
this.version = bytes[i++];
@ -39291,18 +39302,16 @@ Signature.prototype.write_hashed_sub_packets = function () {
bytes = _util2.default.concat([bytes, this.revocationKeyFingerprint]);
arr.push(write_sub_packet(sub.revocation_key, bytes));
}
if (this.notation !== null) {
Object.entries(this.notation).forEach(([name, value]) => {
bytes = [new Uint8Array([0x80, 0, 0, 0])];
// 2 octets of name length
bytes.push(_util2.default.writeNumber(name.length, 2));
// 2 octets of value length
bytes.push(_util2.default.writeNumber(value.length, 2));
bytes.push(_util2.default.str_to_Uint8Array(name + value));
bytes = _util2.default.concat(bytes);
arr.push(write_sub_packet(sub.notation_data, bytes));
});
}
this.notations.forEach(([name, value]) => {
bytes = [new Uint8Array([0x80, 0, 0, 0])];
// 2 octets of name length
bytes.push(_util2.default.writeNumber(name.length, 2));
// 2 octets of value length
bytes.push(_util2.default.writeNumber(value.length, 2));
bytes.push(_util2.default.str_to_Uint8Array(name + value));
bytes = _util2.default.concat(bytes);
arr.push(write_sub_packet(sub.notation_data, bytes));
});
if (this.preferredHashAlgorithms !== null) {
bytes = _util2.default.str_to_Uint8Array(_util2.default.Uint8Array_to_str(this.preferredHashAlgorithms));
arr.push(write_sub_packet(sub.preferred_hash_algorithms, bytes));
@ -39508,8 +39517,11 @@ Signature.prototype.read_sub_packet = function (bytes, trusted = true) {
const name = _util2.default.Uint8Array_to_str(bytes.subarray(mypos, mypos + m));
const value = _util2.default.Uint8Array_to_str(bytes.subarray(mypos + m, mypos + m + n));
this.notation = this.notation || {};
this.notation[name] = value;
this.notations.push([name, value]);
if (critical && _config2.default.known_notations.indexOf(name) === -1) {
throw new Error("Unknown critical notation: " + name);
}
} else {
_util2.default.print_debug("Unsupported notation flag " + bytes[mypos]);
}
@ -39801,7 +39813,7 @@ Signature.prototype.postCloneTypeFix = function () {
exports.default = Signature;
},{"../crypto":95,"../enums":114,"../type/keyid.js":149,"../type/mpi.js":150,"../util":153,"./packet":130,"web-stream-tools":76}],138:[function(require,module,exports){
},{"../config":80,"../crypto":95,"../enums":114,"../type/keyid.js":149,"../type/mpi.js":150,"../util":153,"./packet":130,"web-stream-tools":76}],138:[function(require,module,exports){
'use strict';
Object.defineProperty(exports, "__esModule", {

4
dist/openpgp.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
/*! OpenPGP.js v4.5.1 - 2019-05-06 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.5.2 - 2019-05-16 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
!function(){return function e(n,t,r){function o(a,f){if(!t[a]){if(!n[a]){var s="function"==typeof require&&require;if(!f&&s)return s(a,!0);if(i)return i(a,!0);var u=new Error("Cannot find module '"+a+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[a]={exports:{}};n[a][0].call(c.exports,function(e){return o(n[a][1][e]||e)},c,c.exports,e,n,t,r)}return t[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}}()({1:[function(e,n,t){self.window=self,importScripts("openpgp.min.js");var r=window.openpgp,o=[],i=6e4;function a(e){self.postMessage(e,r.util.getTransferables(e.data,!0))}r.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,t=e.data||{};switch(t.event){case"configure":n=t.config,Object.keys(n).forEach(function(e){r.config[e]=n[e]});break;case"seed-random":!function(e){e instanceof Uint8Array||(e=new Uint8Array(e));r.crypto.random.randomBuffer.set(e)}(t.buf);var i=o;o=[];for(var f=0;f<i.length;f++)i[f]();break;default:!function(e,n,t){if("function"!=typeof r[n])return void a({id:e,event:"method-return",err:"Unknown Worker Event"});r.util.restoreStreams(t),t=r.packet.clone.parseClonedPackets(t,n),r[n](t).then(function(n){a({id:e,event:"method-return",data:r.packet.clone.clonePackets(n)})}).catch(function(n){r.util.print_debug_error(n),a({id:e,event:"method-return",err:n.message,stack:n.stack})})}(t.id,t.event,t.options||{})}},postMessage({event:"loaded"})},{}]},{},[1]);

2
npm-shrinkwrap.json generated
View File

@ -1,6 +1,6 @@
{
"name": "openpgp",
"version": "4.5.1",
"version": "4.5.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -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.5.1",
"version": "4.5.2",
"license": "LGPL-3.0+",
"homepage": "https://openpgpjs.org/",
"engines": {