Browse Source

Enigma: Upgrade to OpenPGP.js v5.0

pull/8212/head
Aleksander Machniak 4 years ago
parent
commit
aa43406a06
  1. 1
      CHANGELOG.md
  2. 9
      jsdeps.json
  3. 15
      plugins/enigma/enigma.js

1
CHANGELOG.md

@ -11,6 +11,7 @@
- Newmail_notifier: Improved the notification sound (#8155)
- Add option to control links handling behavior on html to text conversion (#6485)
- Disable the default spellchecker option using spell.roundcube.net (#8182)
- Enigma: Upgrade to OpenPGP.js v5.0
- Fix locked SQLite database for the CLI tools (#8035)
- Fix size of Mailvelope iframe for PGP-inlined mail, again (#8126)
- Fix handling of group names with @ character in autocomplete and contacts widget (#8098)

9
jsdeps.json

@ -62,14 +62,13 @@
{
"lib": "openpgp",
"name": "OpenPGP.js",
"version": "4.10.9",
"url": "https://raw.githubusercontent.com/openpgpjs/openpgpjs/v$v/dist/openpgp.min.js",
"api_url": "https://api.github.com/repos/openpgpjs/openpgpjs/contents/dist/openpgp.min.js?ref=v$v",
"version": "5.0.0",
"url": "https://cdn.jsdelivr.net/npm/openpgp@$v/dist/openpgp.min.js",
"dest": "plugins/enigma/openpgp.min.js",
"sha1": "c6374455612b2dbb2acfc2d7c85d4b762c9605eb",
"sha1": "0fc8b02e9d26a28280b46fd8d3a1516d9bff21db",
"license": "LGPL",
"copyright": "Copyright (c) OpenPGP Development Team",
"source": "https://github.com/openpgpjs/openpgpjs/blob/v$v/dist/openpgp.js"
"source": "https://cdn.jsdelivr.net/npm/openpgp@$v/dist/openpgp.js"
},
{
"lib": "codemirror",

15
plugins/enigma/enigma.js

@ -180,11 +180,12 @@ rcube_webmail.prototype.enigma_key_create_save = function()
// generate keys
// use OpenPGP.js if browser supports required features
if (window.openpgp && (window.msCrypto || (window.crypto && (window.crypto.getRandomValues || window.crypto.subtle)))) {
if (window.openpgp && window.crypto && window.crypto.getRandomValues) {
lock = this.set_busy(true, 'enigma.keygenerating');
options = {
userIds: users,
passphrase: password
userIDs: users,
passphrase: password,
type: type.substring(0, 3)
};
if (type == 'ecc')
@ -196,8 +197,12 @@ rcube_webmail.prototype.enigma_key_create_save = function()
openpgp.generateKey(options).then(function(keypair) {
// success
var post = {_a: 'import', _keys: keypair.privateKeyArmored, _generated: 1,
_passwd: password, _keyid: keypair.key.primaryKey.getFingerprint()};
var post = {
_a: 'import',
_keys: keypair.privateKey,
_generated: 1,
_passwd: password
};
// send request to server
rcmail.http_post('plugin.enigmakeys', post, lock);

Loading…
Cancel
Save