Release new version
This commit is contained in:
parent
046fae963f
commit
b3077235f9
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"version": "2.5.5",
|
"version": "2.5.6",
|
||||||
"license": "LGPL-3.0+",
|
"license": "LGPL-3.0+",
|
||||||
"homepage": "http://openpgpjs.org/",
|
"homepage": "http://openpgpjs.org/",
|
||||||
"authors": [
|
"authors": [
|
||||||
|
|
41
dist/openpgp.js
vendored
41
dist/openpgp.js
vendored
|
@ -4534,9 +4534,10 @@ CleartextMessage.prototype.getSigningKeyIds = function () {
|
||||||
/**
|
/**
|
||||||
* Sign the cleartext message
|
* Sign the cleartext message
|
||||||
* @param {Array<module:key~Key>} privateKeys private keys with decrypted secret key data for signing
|
* @param {Array<module:key~Key>} privateKeys private keys with decrypted secret key data for signing
|
||||||
|
* @return {module:message~CleartextMessage} new cleartext message with signed content
|
||||||
*/
|
*/
|
||||||
CleartextMessage.prototype.sign = function (privateKeys) {
|
CleartextMessage.prototype.sign = function (privateKeys) {
|
||||||
this.signature = this.signDetached(privateKeys);
|
return new CleartextMessage(this.text, this.signDetached(privateKeys));
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -4839,7 +4840,7 @@ exports.default = {
|
||||||
tolerant: true, // ignore unsupported/unrecognizable packets instead of throwing an error
|
tolerant: true, // ignore unsupported/unrecognizable packets instead of throwing an error
|
||||||
show_version: true,
|
show_version: true,
|
||||||
show_comment: true,
|
show_comment: true,
|
||||||
versionstring: "OpenPGP.js v2.5.5",
|
versionstring: "OpenPGP.js v2.5.6",
|
||||||
commentstring: "https://openpgpjs.org",
|
commentstring: "https://openpgpjs.org",
|
||||||
keyserver: "https://keyserver.ubuntu.com",
|
keyserver: "https://keyserver.ubuntu.com",
|
||||||
node_store: './openpgp.store'
|
node_store: './openpgp.store'
|
||||||
|
@ -15740,7 +15741,7 @@ function decrypt(_ref6) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Signs a cleartext message.
|
* Signs a cleartext message.
|
||||||
* @param {String} data cleartext input to be signed
|
* @param {String | Uint8Array} data cleartext input to be signed
|
||||||
* @param {Key|Array<Key>} privateKeys array of keys or single key with decrypted secret key data to sign cleartext
|
* @param {Key|Array<Key>} privateKeys array of keys or single key with decrypted secret key data to sign cleartext
|
||||||
* @param {Boolean} armor (optional) if the return value should be ascii armored or the message object
|
* @param {Boolean} armor (optional) if the return value should be ascii armored or the message object
|
||||||
* @param {Boolean} detached (optional) if the return value should contain a detached signature
|
* @param {Boolean} detached (optional) if the return value should contain a detached signature
|
||||||
|
@ -15757,7 +15758,7 @@ function sign(_ref7) {
|
||||||
var _ref7$detached = _ref7.detached;
|
var _ref7$detached = _ref7.detached;
|
||||||
var detached = _ref7$detached === undefined ? false : _ref7$detached;
|
var detached = _ref7$detached === undefined ? false : _ref7$detached;
|
||||||
|
|
||||||
checkString(data);
|
checkData(data);
|
||||||
privateKeys = toArray(privateKeys);
|
privateKeys = toArray(privateKeys);
|
||||||
|
|
||||||
if (asyncProxy) {
|
if (asyncProxy) {
|
||||||
|
@ -15767,24 +15768,29 @@ function sign(_ref7) {
|
||||||
|
|
||||||
var result = {};
|
var result = {};
|
||||||
return execute(function () {
|
return execute(function () {
|
||||||
|
var message;
|
||||||
|
|
||||||
var cleartextMessage = new cleartext.CleartextMessage(data);
|
if (_util2.default.isString(data)) {
|
||||||
|
message = new cleartext.CleartextMessage(data);
|
||||||
|
} else {
|
||||||
|
message = messageLib.fromBinary(data);
|
||||||
|
}
|
||||||
|
|
||||||
if (detached) {
|
if (detached) {
|
||||||
var signature = cleartextMessage.signDetached(privateKeys);
|
var signature = message.signDetached(privateKeys);
|
||||||
if (armor) {
|
if (armor) {
|
||||||
result.signature = signature.armor();
|
result.signature = signature.armor();
|
||||||
} else {
|
} else {
|
||||||
result.signature = signature;
|
result.signature = signature;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cleartextMessage.sign(privateKeys);
|
message = message.sign(privateKeys);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (armor) {
|
if (armor) {
|
||||||
result.data = cleartextMessage.armor();
|
result.data = message.armor();
|
||||||
} else {
|
} else {
|
||||||
result.message = cleartextMessage;
|
result.message = message;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}, 'Error signing cleartext message');
|
}, 'Error signing cleartext message');
|
||||||
|
@ -15805,7 +15811,7 @@ function verify(_ref8) {
|
||||||
var _ref8$signature = _ref8.signature;
|
var _ref8$signature = _ref8.signature;
|
||||||
var signature = _ref8$signature === undefined ? null : _ref8$signature;
|
var signature = _ref8$signature === undefined ? null : _ref8$signature;
|
||||||
|
|
||||||
checkCleartextMessage(message);
|
checkCleartextOrMessage(message);
|
||||||
publicKeys = toArray(publicKeys);
|
publicKeys = toArray(publicKeys);
|
||||||
|
|
||||||
if (asyncProxy) {
|
if (asyncProxy) {
|
||||||
|
@ -15815,8 +15821,11 @@ function verify(_ref8) {
|
||||||
|
|
||||||
var result = {};
|
var result = {};
|
||||||
return execute(function () {
|
return execute(function () {
|
||||||
|
if (cleartext.CleartextMessage.prototype.isPrototypeOf(message)) {
|
||||||
result.data = message.getText();
|
result.data = message.getText();
|
||||||
|
} else {
|
||||||
|
result.data = message.getLiteralData();
|
||||||
|
}
|
||||||
if (signature) {
|
if (signature) {
|
||||||
//detached signature
|
//detached signature
|
||||||
result.signatures = message.verifyDetached(signature, publicKeys);
|
result.signatures = message.verifyDetached(signature, publicKeys);
|
||||||
|
@ -15849,7 +15858,7 @@ function encryptSessionKey(_ref9) {
|
||||||
var publicKeys = _ref9.publicKeys;
|
var publicKeys = _ref9.publicKeys;
|
||||||
var passwords = _ref9.passwords;
|
var passwords = _ref9.passwords;
|
||||||
|
|
||||||
checkbinary(data);checkString(algorithm, 'algorithm');publicKeys = toArray(publicKeys);passwords = toArray(passwords);
|
checkBinary(data);checkString(algorithm, 'algorithm');publicKeys = toArray(publicKeys);passwords = toArray(passwords);
|
||||||
|
|
||||||
if (asyncProxy) {
|
if (asyncProxy) {
|
||||||
// use web worker if available
|
// use web worker if available
|
||||||
|
@ -15907,7 +15916,7 @@ function checkString(data, name) {
|
||||||
throw new Error('Parameter [' + (name || 'data') + '] must be of type String');
|
throw new Error('Parameter [' + (name || 'data') + '] must be of type String');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function checkbinary(data, name) {
|
function checkBinary(data, name) {
|
||||||
if (!_util2.default.isUint8Array(data)) {
|
if (!_util2.default.isUint8Array(data)) {
|
||||||
throw new Error('Parameter [' + (name || 'data') + '] must be of type Uint8Array');
|
throw new Error('Parameter [' + (name || 'data') + '] must be of type Uint8Array');
|
||||||
}
|
}
|
||||||
|
@ -15922,9 +15931,9 @@ function checkMessage(message) {
|
||||||
throw new Error('Parameter [message] needs to be of type Message');
|
throw new Error('Parameter [message] needs to be of type Message');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function checkCleartextMessage(message) {
|
function checkCleartextOrMessage(message) {
|
||||||
if (!cleartext.CleartextMessage.prototype.isPrototypeOf(message)) {
|
if (!cleartext.CleartextMessage.prototype.isPrototypeOf(message) && !messageLib.Message.prototype.isPrototypeOf(message)) {
|
||||||
throw new Error('Parameter [message] needs to be of type CleartextMessage');
|
throw new Error('Parameter [message] needs to be of type Message or CleartextMessage');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
12
dist/openpgp.min.js
vendored
12
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 +1 @@
|
||||||
/*! OpenPGP.js v2.5.5 - 2017-07-06 - this is LGPL licensed code, see LICENSE/our website http://openpgpjs.org/ for more information. */!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a){for(var b in a)h.config[b]=a[b]}function e(a){a instanceof Uint8Array||(a=new Uint8Array(a)),h.crypto.random.randomBuffer.set(a)}function f(a,b,c){return"function"!=typeof h[b]?void g({id:a,event:"method-return",err:"Unknown Worker Event"}):(c=h.packet.clone.parseClonedPackets(c,b),void h[b](c).then(function(b){g({id:a,event:"method-return",data:h.packet.clone.clonePackets(b)})})["catch"](function(b){g({id:a,event:"method-return",err:b.message})}))}function g(a){h.crypto.random.randomBuffer.size<i&&self.postMessage({event:"request-seed"}),self.postMessage(a,h.util.getTransferables.call(h.util,a.data))}self.window={},importScripts("openpgp.min.js");var h=window.openpgp,i=4e4,j=6e4;h.crypto.random.randomBuffer.init(j),self.onmessage=function(a){var b=a.data||{};switch(b.event){case"configure":d(b.config);break;case"seed-random":e(b.buf);break;default:f(b.id,b.event,b.options||{})}}},{}]},{},[1]);
|
/*! OpenPGP.js v2.5.6 - 2017-07-13 - this is LGPL licensed code, see LICENSE/our website http://openpgpjs.org/ for more information. */!function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){function d(a){for(var b in a)h.config[b]=a[b]}function e(a){a instanceof Uint8Array||(a=new Uint8Array(a)),h.crypto.random.randomBuffer.set(a)}function f(a,b,c){return"function"!=typeof h[b]?void g({id:a,event:"method-return",err:"Unknown Worker Event"}):(c=h.packet.clone.parseClonedPackets(c,b),void h[b](c).then(function(b){g({id:a,event:"method-return",data:h.packet.clone.clonePackets(b)})})["catch"](function(b){g({id:a,event:"method-return",err:b.message})}))}function g(a){h.crypto.random.randomBuffer.size<i&&self.postMessage({event:"request-seed"}),self.postMessage(a,h.util.getTransferables.call(h.util,a.data))}self.window={},importScripts("openpgp.min.js");var h=window.openpgp,i=4e4,j=6e4;h.crypto.random.randomBuffer.init(j),self.onmessage=function(a){var b=a.data||{};switch(b.event){case"configure":d(b.config);break;case"seed-random":e(b.buf);break;default:f(b.id,b.event,b.options||{})}}},{}]},{},[1]);
|
2
npm-shrinkwrap.json
generated
2
npm-shrinkwrap.json
generated
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"version": "2.5.5",
|
"version": "2.5.6",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"asmcrypto-lite": {
|
"asmcrypto-lite": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "openpgp",
|
"name": "openpgp",
|
||||||
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
"description": "OpenPGP.js is a Javascript implementation of the OpenPGP protocol. This is defined in RFC 4880.",
|
||||||
"version": "2.5.5",
|
"version": "2.5.6",
|
||||||
"license": "LGPL-3.0+",
|
"license": "LGPL-3.0+",
|
||||||
"homepage": "http://openpgpjs.org/",
|
"homepage": "http://openpgpjs.org/",
|
||||||
"engines": {
|
"engines": {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user