Skip to content

Commit

Permalink
Release new version
Browse files Browse the repository at this point in the history
  • Loading branch information
twiss committed Jul 21, 2020
1 parent 14f244a commit 34b0928
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 89 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openpgp",
"version": "4.10.6",
"version": "4.10.7",
"license": "LGPL-3.0+",
"homepage": "https://openpgpjs.org/",
"authors": [
Expand Down
88 changes: 60 additions & 28 deletions dist/compat/openpgp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! OpenPGP.js v4.10.6 - 2020-07-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.10.7 - 2020-07-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(_dereq_,module,exports){
(function (global){
"use strict";
Expand Down Expand Up @@ -31493,7 +31493,7 @@ exports.default = {
* @memberof module:config
* @property {String} versionstring A version string to be included in armored messages
*/
versionstring: "OpenPGP.js v4.10.6",
versionstring: "OpenPGP.js v4.10.7",
/**
* @memberof module:config
* @property {String} commentstring A comment string to be included in armored messages
Expand Down Expand Up @@ -60625,7 +60625,7 @@ function WKD() {

WKD.prototype.lookup = function () {
var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(options) {
var fetch, _$exec, _$exec2, localPart, domain, localEncoded, urlAdvanced, urlDirect;
var fetch, _$exec, _$exec2, localPart, domain, localEncoded, urlAdvanced, urlDirect, response, rawBytes;

return _regenerator2.default.wrap(function _callee$(_context) {
while (1) {
Expand Down Expand Up @@ -60659,36 +60659,68 @@ WKD.prototype.lookup = function () {
localEncoded = _context.t0.encodeZBase32.call(_context.t0, _context.t1);
urlAdvanced = 'https://openpgpkey.' + domain + '/.well-known/openpgpkey/' + domain + '/hu/' + localEncoded;
urlDirect = 'https://' + domain + '/.well-known/openpgpkey/hu/' + localEncoded;
return _context.abrupt('return', fetch(urlAdvanced).then(function (response) {
if (response.status === 200) {
return response.arrayBuffer();
}
}).then(function (publicKey) {
if (publicKey) {
return publicKey;
} else {
return fetch(urlDirect).then(function (response) {
if (response.status === 200) {
return response.arrayBuffer();
}
});
}
}).then(function (publicKey) {
if (publicKey) {
var rawBytes = new Uint8Array(publicKey);
if (options.rawBytes) {
return rawBytes;
}
return keyMod.read(rawBytes);
}
}));
response = void 0;
_context.prev = 14;
_context.next = 17;
return fetch(urlAdvanced);

case 14:
case 17:
response = _context.sent;

if (!(response.status !== 200)) {
_context.next = 20;
break;
}

throw new Error('Advanced WKD lookup failed: ' + response.statusText);

case 20:
_context.next = 30;
break;

case 22:
_context.prev = 22;
_context.t2 = _context['catch'](14);

_util2.default.print_debug_error(_context.t2);
_context.next = 27;
return fetch(urlDirect);

case 27:
response = _context.sent;

if (!(response.status !== 200)) {
_context.next = 30;
break;
}

throw new Error('Direct WKD lookup failed: ' + response.statusText);

case 30:
_context.t3 = Uint8Array;
_context.next = 33;
return response.arrayBuffer();

case 33:
_context.t4 = _context.sent;
rawBytes = new _context.t3(_context.t4);

if (!options.rawBytes) {
_context.next = 37;
break;
}

return _context.abrupt('return', rawBytes);

case 37:
return _context.abrupt('return', keyMod.read(rawBytes));

case 38:
case 'end':
return _context.stop();
}
}
}, _callee, this);
}, _callee, this, [[14, 22]]);
}));

return function (_x) {
Expand Down
4 changes: 2 additions & 2 deletions dist/compat/openpgp.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/compat/openpgp.worker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! OpenPGP.js v4.10.6 - 2020-07-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.10.7 - 2020-07-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
// GPG4Browsers - An OpenPGP implementation in javascript
Expand Down
2 changes: 1 addition & 1 deletion dist/compat/openpgp.worker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 19 additions & 23 deletions dist/lightweight/openpgp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! OpenPGP.js v4.10.6 - 2020-07-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.10.7 - 2020-07-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
"use strict";
Expand Down Expand Up @@ -20665,7 +20665,7 @@ exports.default = {
* @memberof module:config
* @property {String} versionstring A version string to be included in armored messages
*/
versionstring: "OpenPGP.js v4.10.6",
versionstring: "OpenPGP.js v4.10.7",
/**
* @memberof module:config
* @property {String} commentstring A comment string to be included in armored messages
Expand Down Expand Up @@ -39719,29 +39719,25 @@ WKD.prototype.lookup = async function (options) {
const urlAdvanced = `https://openpgpkey.${domain}/.well-known/openpgpkey/${domain}/hu/${localEncoded}`;
const urlDirect = `https://${domain}/.well-known/openpgpkey/hu/${localEncoded}`;

return fetch(urlAdvanced).then(function (response) {
if (response.status === 200) {
return response.arrayBuffer();
}
}).then(function (publicKey) {
if (publicKey) {
return publicKey;
} else {
return fetch(urlDirect).then(function (response) {
if (response.status === 200) {
return response.arrayBuffer();
}
});
let response;
try {
response = await fetch(urlAdvanced);
if (response.status !== 200) {
throw new Error('Advanced WKD lookup failed: ' + response.statusText);
}
}).then(function (publicKey) {
if (publicKey) {
const rawBytes = new Uint8Array(publicKey);
if (options.rawBytes) {
return rawBytes;
}
return keyMod.read(rawBytes);
} catch (err) {
_util2.default.print_debug_error(err);
response = await fetch(urlDirect);
if (response.status !== 200) {
throw new Error('Direct WKD lookup failed: ' + response.statusText);
}
});
}

const rawBytes = new Uint8Array((await response.arrayBuffer()));
if (options.rawBytes) {
return rawBytes;
}
return keyMod.read(rawBytes);
};

exports.default = WKD;
Expand Down
4 changes: 2 additions & 2 deletions dist/lightweight/openpgp.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/lightweight/openpgp.worker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! OpenPGP.js v4.10.6 - 2020-07-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.10.7 - 2020-07-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
// GPG4Browsers - An OpenPGP implementation in javascript
Expand Down
2 changes: 1 addition & 1 deletion dist/lightweight/openpgp.worker.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 19 additions & 23 deletions dist/openpgp.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! OpenPGP.js v4.10.6 - 2020-07-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.10.7 - 2020-07-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.openpgp = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
"use strict";
Expand Down Expand Up @@ -25052,7 +25052,7 @@ exports.default = {
* @memberof module:config
* @property {String} versionstring A version string to be included in armored messages
*/
versionstring: "OpenPGP.js v4.10.6",
versionstring: "OpenPGP.js v4.10.7",
/**
* @memberof module:config
* @property {String} commentstring A comment string to be included in armored messages
Expand Down Expand Up @@ -44106,29 +44106,25 @@ WKD.prototype.lookup = async function (options) {
const urlAdvanced = `https://openpgpkey.${domain}/.well-known/openpgpkey/${domain}/hu/${localEncoded}`;
const urlDirect = `https://${domain}/.well-known/openpgpkey/hu/${localEncoded}`;

return fetch(urlAdvanced).then(function (response) {
if (response.status === 200) {
return response.arrayBuffer();
}
}).then(function (publicKey) {
if (publicKey) {
return publicKey;
} else {
return fetch(urlDirect).then(function (response) {
if (response.status === 200) {
return response.arrayBuffer();
}
});
let response;
try {
response = await fetch(urlAdvanced);
if (response.status !== 200) {
throw new Error('Advanced WKD lookup failed: ' + response.statusText);
}
}).then(function (publicKey) {
if (publicKey) {
const rawBytes = new Uint8Array(publicKey);
if (options.rawBytes) {
return rawBytes;
}
return keyMod.read(rawBytes);
} catch (err) {
_util2.default.print_debug_error(err);
response = await fetch(urlDirect);
if (response.status !== 200) {
throw new Error('Direct WKD lookup failed: ' + response.statusText);
}
});
}

const rawBytes = new Uint8Array((await response.arrayBuffer()));
if (options.rawBytes) {
return rawBytes;
}
return keyMod.read(rawBytes);
};

exports.default = WKD;
Expand Down
4 changes: 2 additions & 2 deletions dist/openpgp.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/openpgp.worker.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! OpenPGP.js v4.10.6 - 2020-07-14 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
/*! OpenPGP.js v4.10.7 - 2020-07-21 - this is LGPL licensed code, see LICENSE/our website https://openpgpjs.org/ for more information. */
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function (global){
// GPG4Browsers - An OpenPGP implementation in javascript
Expand Down
Loading

0 comments on commit 34b0928

Please sign in to comment.