mirror of https://github.com/MISP/MISP
Small fix to the pgp key validation tool
- doesn't break on completely invalid keys anymorepull/712/head
parent
f7f3142a91
commit
f9da3f2d2c
|
@ -1 +1 @@
|
|||
{"major":2, "minor":3, "hotfix":146}
|
||||
{"major":2, "minor":3, "hotfix":147}
|
|
@ -383,9 +383,9 @@ class User extends AppModel {
|
|||
));
|
||||
foreach ($users as $k => $user) {
|
||||
$gpg = new Crypt_GPG(array('homedir' => Configure::read('GnuPG.homedir'), 'binary' => (Configure::read('GnuPG.binary') ? Configure::read('GnuPG.binary') : '/usr/bin/gpg')));
|
||||
try {
|
||||
$key = $gpg->importKey($user['User']['gpgkey']);
|
||||
$gpg->addEncryptKey($key['fingerprint']); // use the key that was given in the import
|
||||
try {
|
||||
$enc = $gpg->encrypt('test', true);
|
||||
} catch (Exception $e){
|
||||
$results[$user['User']['id']][0] = true;
|
||||
|
|
Loading…
Reference in New Issue