Enigma: Fix key generation in Safari by upgrade to OpenPGP 2.6.2 (#6149)

pull/6175/head
Aleksander Machniak 7 years ago
parent b46cd5de1d
commit 674eac1c1c

@ -72,6 +72,7 @@ CHANGELOG Roundcube Webmail
- Managesieve: Fix missing Save button in Edit Filter Set page of Classic skin (#6154)
- Fix duplicated labels in Test SMTP Config section (#6166)
- Fix PHP Warning: exif_read_data(...): Illegal IFD size (#6169)
- Enigma: Fix key generation in Safari by upgrade to OpenPGP 2.6.2 (#6149)
RELEASE 1.3.4
-------------

@ -62,13 +62,13 @@
{
"lib": "openpgp",
"name": "OpenPGP.js",
"version": "1.6.2",
"url": "https://raw.githubusercontent.com/openpgpjs/openpgpjs/v1.6.2/dist/openpgp.min.js",
"version": "2.6.2",
"url": "https://raw.githubusercontent.com/openpgpjs/openpgpjs/v2.6.2/dist/openpgp.min.js",
"dest": "plugins/enigma/openpgp.min.js",
"sha1": "de75af6883019f490f69211e506377c84f49a85b",
"sha1": "cce0087eb20328453b9378a2b01cc6339cef97b2",
"license": "LGPL",
"copyright": "Copyright (c) OpenPGP Development Team",
"source": "https://github.com/openpgpjs/openpgpjs/blob/v1.6.2/dist/openpgp.js"
"source": "https://github.com/openpgpjs/openpgpjs/blob/v2.6.2/dist/openpgp.js"
},
{
"lib": "codemirror",

@ -130,7 +130,7 @@ rcube_webmail.prototype.enigma_key_create_save = function()
size = $('#key-size').val();
$('[name="identity[]"]:checked').each(function() {
users.push(this.value);
users.push({name: $(this).data('name') || '', email: $(this).data('email')});
});
// validate the form
@ -155,11 +155,11 @@ rcube_webmail.prototype.enigma_key_create_save = function()
lock = this.set_busy(true, 'enigma.keygenerating');
options = {
numBits: size,
userId: users,
userIds: users,
passphrase: password
};
openpgp.generateKeyPair(options).then(function(keypair) {
openpgp.generateKey(options).then(function(keypair) {
// success
var post = {_a: 'import', _keys: keypair.privateKeyArmored, _generated: 1,
_passwd: password, _keyid: keypair.key.primaryKey.fingerprint};
@ -168,6 +168,7 @@ rcube_webmail.prototype.enigma_key_create_save = function()
rcmail.http_post('plugin.enigmakeys', post, lock);
}, function(error) {
// failure
console.error(error);
rcmail.set_busy(false, null, lock);
rcmail.display_message(rcmail.get_label('enigma.keygenerateerror'), 'error');
});

@ -754,7 +754,8 @@ class enigma_ui
$checkbox = new html_checkbox(array('name' => 'identity[]'));
foreach ((array) $identities as $idx => $ident) {
$name = empty($ident['name']) ? ($ident['email']) : $ident['ident'];
$identities[$idx] = html::tag('li', null, html::label(null, $checkbox->show($name, array('value' => $name)) . rcube::Q($name)));
$attr = array('value' => $idx, 'data-name' => $ident['name'], 'data-email' => $ident['email']);
$identities[$idx] = html::tag('li', null, html::label(null, $checkbox->show($idx, $attr) . rcube::Q($name)));
}
$table->add('title', html::label('key-name', rcube::Q($this->enigma->gettext('newkeyident'))));

Loading…
Cancel
Save