Commit Graph

9 Commits

Author SHA1 Message Date
SET
b68bee813d Allow to export private keys.
Using a workaround that validates passphrase for a secret key.

With GnuPG 2.2.23 and GpgME 1.1.15, a secret key can be exported when the right
passphrase is provided. With a bad passphrase, application crashes.

See https://dev.gnupg.org/T5151

Application may validate a passphrase before invoking engine. Until it is
hopefully fixed in upstream and available in mainstream.
2020-11-24 22:19:27 +01:00
SET
b761c366f7 Merge branch 'master' into TestExportPrivateKeys 2020-11-24 20:13:23 +01:00
SET
e56d1bd6eb Fix download code.
We need not check request::continuation() for stream resource.
2020-11-23 22:03:28 +01:00
SET
e14a5c19f4 Log GpgME errors.
In file WT_APP_ROOT/gpgme.log.

Independently of usual Wt logging.
2020-11-23 22:02:55 +01:00
SET
82b8810f62 Allow exporting secret keys.
Requests the passphrase with a popup.

As from GPGME 1.15.0, the loopback pinentry is functional when exporting secret keys. It works fine when the exact passphrase is provided. If it's a wrong passphrase, GPGME does not generate an ::Error, but the app crashes with 'free(): double free detected in tcache 2'.

Hence, this patch cannot be committed to master.

Status : dangerous
Result : works and works not
Reason : a wrong passphrase means a crash
2020-11-20 22:41:29 +01:00
SET
0e9cc34ac0 Prefer key fingerprints anywhere.
During delete process, keys were identified by Key::keyID().
It seems that collisions are possible; so use fingerprints instead.
2020-11-15 20:55:05 +01:00
SET
e312ac1efd Allow exporting public keys.
Secret keys cannot be exported because the loopback pinentry mechanism
fails to work.
2020-11-15 20:32:12 +01:00
SET
a721bb0225 Use common code formatting style. 2020-11-14 14:46:28 +01:00
SET
bb4df1423a Move all keyring management functions to a separate class.
KeyringIO imports, creates and deletes keys. Everything is declared
private in this class, and it can be called by K7Main only.
2020-11-14 10:58:45 +01:00