4 Commits

Author SHA1 Message Date
SET
608ccbc1bb Generate key data before download is requested.
Once ExportKeyStreamResource::handleRequest is entered, a 'Save As'
dialog will be opened by the browser, even if key data is empty. This
may happen if passphrase is wrong.

If key data is generated before the download is actually requested, we
can check if there is anything to push to browser and prevent the
download request.
2020-11-25 22:05:38 +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
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
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